mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-06 08:44:23 +01:00
stress: Run integrity check for every iteration
This commit is contained in:
@@ -459,6 +459,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
_ => panic!("Error executing query: {}", e),
|
||||
}
|
||||
}
|
||||
let mut res = conn.query("PRAGMA integrity_check", ()).await.unwrap();
|
||||
if let Some(row) = res.next().await? {
|
||||
let value = row.get_value(0).unwrap();
|
||||
if value != "ok".into() {
|
||||
panic!("integrity check failed: {:?}", value);
|
||||
}
|
||||
} else {
|
||||
panic!("integrity check failed: no rows");
|
||||
}
|
||||
}
|
||||
Ok::<_, Box<dyn std::error::Error + Send + Sync>>(())
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user