From 55f37398e4f40d6f96eaab28bf4482c09ea3c67a Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 5 Sep 2025 10:15:55 +0300 Subject: [PATCH] sqlite3: Remove broken sqlite3_checkpoint() test cases They're both using the same database file which is wrong (tests run in parallel). But more importantly, they test almost nothing, and we have a better checkpoint test already. --- sqlite3/tests/compat/mod.rs | 76 ------------------------------------- 1 file changed, 76 deletions(-) diff --git a/sqlite3/tests/compat/mod.rs b/sqlite3/tests/compat/mod.rs index d4aab1688..2608a9cdc 100644 --- a/sqlite3/tests/compat/mod.rs +++ b/sqlite3/tests/compat/mod.rs @@ -162,82 +162,6 @@ mod tests { } } - #[test] - fn test_wal_checkpoint() { - unsafe { - // Test with valid db - let mut db = ptr::null_mut(); - assert_eq!( - sqlite3_open(c"../testing/testing_clone.db".as_ptr(), &mut db), - SQLITE_OK - ); - assert_eq!(sqlite3_wal_checkpoint(db, ptr::null()), SQLITE_OK); - assert_eq!(sqlite3_close(db), SQLITE_OK); - } - } - - #[test] - fn test_wal_checkpoint_v2() { - unsafe { - // Test with valid db - let mut db = ptr::null_mut(); - assert_eq!( - sqlite3_open(c"../testing/testing_clone.db".as_ptr(), &mut db), - SQLITE_OK - ); - - let mut log_size = 0; - let mut checkpoint_count = 0; - - // Test different checkpoint modes - assert_eq!( - sqlite3_wal_checkpoint_v2( - db, - ptr::null(), - SQLITE_CHECKPOINT_PASSIVE, - &mut log_size, - &mut checkpoint_count - ), - SQLITE_OK - ); - - // TODO: uncomment when SQLITE_CHECKPOINT_FULL is supported - // assert_eq!( - // sqlite3_wal_checkpoint_v2( - // db, - // ptr::null(), - // SQLITE_CHECKPOINT_FULL, - // &mut log_size, - // &mut checkpoint_count - // ), - // SQLITE_OK - // ); - - assert_eq!( - sqlite3_wal_checkpoint_v2( - db, - ptr::null(), - SQLITE_CHECKPOINT_RESTART, - &mut log_size, - &mut checkpoint_count - ), - SQLITE_OK - ); - - assert_eq!( - sqlite3_wal_checkpoint_v2( - db, - ptr::null(), - SQLITE_CHECKPOINT_TRUNCATE, - &mut log_size, - &mut checkpoint_count - ), - SQLITE_OK - ); - - assert_eq!(sqlite3_close(db), SQLITE_OK); - } - } #[test] fn test_sqlite3_bind_int() { unsafe {