mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-31 15:04:19 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user