chore(fuzz): print table name for debugging (#4738)

* chore(fuzz): print table name for debugging

* chore: apply suggestions
This commit is contained in:
Weny Xu
2024-09-19 18:40:10 +09:00
committed by GitHub
parent d0f5b2ad7d
commit 49004391d3
2 changed files with 11 additions and 2 deletions

View File

@@ -257,7 +257,12 @@ async fn execute_failover(ctx: FuzzContext, input: FuzzInput) -> Result<()> {
for (table_ctx, insert_expr) in tables.values() {
let sql = format!("select count(1) as count from {}", table_ctx.name);
let values = count_values(&ctx.greptime, &sql).await?;
assert_eq!(values.count as usize, insert_expr.values_list.len());
let expected_rows = insert_expr.values_list.len() as u64;
assert_eq!(
values.count as u64, expected_rows,
"Expected rows: {}, got: {}, table: {}",
expected_rows, values.count, table_ctx.name
);
}
// Clean up

View File

@@ -323,7 +323,11 @@ async fn execute_failover(ctx: FuzzContext, input: FuzzInput) -> Result<()> {
for (table_ctx, expected_rows) in table_ctxs.iter().zip(affected_rows) {
let sql = format!("select count(1) as count from {}", table_ctx.name);
let values = count_values(&ctx.greptime, &sql).await?;
assert_eq!(values.count as u64, expected_rows);
assert_eq!(
values.count as u64, expected_rows,
"Expected rows: {}, got: {}, table: {}",
expected_rows, values.count, table_ctx.name
);
}
for table_ctx in table_ctxs {