Fix tx isolation test semantics after #3023

The test now incorrectly takes a shadow snapshot of the DB state
before it is determined that the connection successfully started
a read transaction.

Fix: take the snapshot after we've verified that the read TX started.
This commit is contained in:
Jussi Saurio
2025-09-11 16:44:28 +03:00
parent aeb3c217e1
commit 6a7bead482

View File

@@ -731,10 +731,6 @@ async fn multiple_connections_fuzz(mvcc_enabled: bool) {
let columns = stmt.columns();
let mut rows = stmt.query(()).await.unwrap();
if let Some(tx_id) = *current_tx_id {
shared_shadow_db.take_snapshot_if_not_exists(tx_id);
}
let mut real_rows = Vec::new();
let ok = loop {
match rows.next().await {
@@ -766,6 +762,10 @@ async fn multiple_connections_fuzz(mvcc_enabled: bool) {
continue;
}
if let Some(tx_id) = *current_tx_id {
shared_shadow_db.take_snapshot_if_not_exists(tx_id);
}
real_rows.sort_by_key(|r| r.id);
let mut expected_rows = visible_rows.clone();