mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 16:44:19 +01:00
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:
@@ -242,8 +242,10 @@ fn test_schema_reprepare_write() {
|
||||
}
|
||||
|
||||
fn advance(stmt: &mut Statement) -> anyhow::Result<()> {
|
||||
stmt.step()?;
|
||||
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)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user