Fix incorrectly implemented test

Test started executing another statement when previous statement
returned IO the last time and didn't run to completion
This commit is contained in:
Jussi Saurio
2025-10-21 14:00:48 +03:00
parent 1dcfd3d068
commit e9bfb57065

View File

@@ -242,8 +242,10 @@ fn test_schema_reprepare_write() {
}
fn advance(stmt: &mut Statement) -> anyhow::Result<()> {
stmt.step()?;
stmt.run_once()?;
tracing::info!("Advancing statement: {:?}", stmt.get_sql());
while matches!(stmt.step()?, StepResult::IO) {
stmt.run_once()?;
}
Ok(())
}
@@ -268,9 +270,9 @@ fn test_interleaved_transactions() -> anyhow::Result<()> {
tmp_db.connect_limbo(),
];
let mut statement2 = conn[2].prepare("BEGIN")?;
let mut statement0 = conn[0].prepare("BEGIN")?;
let mut statement1 = conn[1].prepare("BEGIN")?;
let mut statement2 = conn[2].prepare("BEGIN")?;
advance(&mut statement2)?;