mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Replace PRAGMA call by Rust busy_timeout function
This commit is contained in:
parent
88ac29abfe
commit
a5403eb05f
@ -993,6 +993,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_concurrent_transactions_busy_commit() {
|
||||
use std::time::Duration;
|
||||
let tmp = TempDir::new("locked").unwrap();
|
||||
let path = tmp.path().join("transactions.db3");
|
||||
|
||||
@ -1004,8 +1005,8 @@ mod test {
|
||||
let mut db1 = Connection::open(&path).unwrap();
|
||||
let mut db2 = Connection::open(&path).unwrap();
|
||||
|
||||
db1.execute_batch("PRAGMA busy_timeout = 0;").unwrap();
|
||||
db2.execute_batch("PRAGMA busy_timeout = 0;").unwrap();
|
||||
db1.busy_timeout(Duration::from_millis(0)).unwrap();
|
||||
db2.busy_timeout(Duration::from_millis(0)).unwrap();
|
||||
|
||||
{
|
||||
let tx1 = db1.transaction().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user