This commit is contained in:
gwenn 2020-10-25 12:28:03 +01:00
parent 49325296a9
commit 9c954b8cb5

View File

@ -372,10 +372,13 @@ mod test {
lazy_static! { lazy_static! {
static ref CALLED: AtomicBool = AtomicBool::new(false); static ref CALLED: AtomicBool = AtomicBool::new(false);
} }
db.progress_handler(1, Some(|| { db.progress_handler(
1,
Some(|| {
CALLED.store(true, Ordering::Relaxed); CALLED.store(true, Ordering::Relaxed);
false false
})); }),
);
db.execute_batch("BEGIN; CREATE TABLE foo (t TEXT); COMMIT;") db.execute_batch("BEGIN; CREATE TABLE foo (t TEXT); COMMIT;")
.unwrap(); .unwrap();
assert!(CALLED.load(Ordering::Relaxed)); assert!(CALLED.load(Ordering::Relaxed));