Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Feb 23, 2024
1 parent b967c56 commit 8b651e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/connector/src/parser/debezium/simd_json_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ mod tests {
DataType, Date, Interval, Scalar, ScalarImpl, StructType, Time, Timestamp,
};
use serde_json::Value;
use thiserror_ext::AsReport;

use crate::parser::{
DebeziumParser, EncodingProperties, JsonProperties, ProtocolProperties, SourceColumnDesc,
SourceStreamChunkBuilder, SpecificParserConfig,
};
use crate::source::SourceContextRef;

fn assert_json_eq(parse_result: &Option<ScalarImpl>, json_str: &str) {
if let Some(ScalarImpl::Jsonb(json_val)) = parse_result {
let mut json_string = String::new();
Expand Down Expand Up @@ -494,7 +496,7 @@ mod tests {
} else {
// For f64 overflow, the parsing fails
let e = res.unwrap_err();
assert!(e.to_string().contains("InvalidNumber"), "{i}: {e}");
assert!(e.to_report_string().contains("InvalidNumber"), "{i}: {e}");
}
}
}
Expand Down

0 comments on commit 8b651e2

Please sign in to comment.