Skip to content

Commit

Permalink
Add logging to identify flake
Browse files Browse the repository at this point in the history
  • Loading branch information
karencfv committed Mar 1, 2024
1 parent b993768 commit 966e9b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions oximeter/db/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1944,19 +1944,22 @@ mod tests {
let sql = String::from(
"INSERT INTO oximeter.measurements_string (datum) VALUES ('hiya');",
);
client_2.execute_with_body(sql).await.unwrap();
let result = client_2.execute_with_body(sql.clone()).await.unwrap();
info!(log, "Inserted datum to client #2"; "sql" => sql, "result" => result);

// Make sure replicas are synched
let sql = String::from(
"SYSTEM SYNC REPLICA oximeter.measurements_string_local;",
);
client_1.execute_with_body(sql).await.unwrap();
let result = client_1.execute_with_body(sql.clone()).await.unwrap();
info!(log, "Synced replicas via client #1"; "sql" => sql, "result" => result);

// Make sure data exists in the other replica
let sql = String::from(
"SELECT * FROM oximeter.measurements_string FORMAT JSONEachRow;",
);
let result = client_1.execute_with_body(sql).await.unwrap();
let result = client_1.execute_with_body(sql.clone()).await.unwrap();
info!(log, "Retrieved values via client #1"; "sql" => sql, "result" => result.clone());
assert!(result.contains("hiya"));

client_1.wipe_replicated_db().await?;
Expand Down

0 comments on commit 966e9b5

Please sign in to comment.