File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,8 @@ class StatementTests: SQLiteTestCase {
37
37
38
38
/// Check that a statement reset will close the implicit transaction, allowing wal file to checkpoint
39
39
func test_reset_statement( ) throws {
40
- // Remove old test db if any
41
- let path = temporaryFile ( ) + " .sqlite3 "
42
- try ? FileManager . default. removeItem ( atPath: path)
43
- try ? FileManager . default. removeItem ( atPath: path + " -shm " )
44
- try ? FileManager . default. removeItem ( atPath: path + " -wal " )
45
-
46
40
// create new db on disk in wal mode
41
+ let path = temporaryFile ( ) + " .sqlite3 "
47
42
let db = try Connection ( . uri( path) )
48
43
try db. run ( " PRAGMA journal_mode=WAL; " )
49
44
@@ -70,9 +65,7 @@ class StatementTests: SQLiteTestCase {
70
65
// prevents the implicit transaction from closing.
71
66
// https://www.sqlite.org/lang_transaction.html#implicit_versus_explicit_transactions
72
67
let statement = try db. prepare ( " SELECT email FROM users " )
73
- XCTAssert ( try statement. step ( ) )
74
- let blob = statement. row [ 0 ] as Blob
75
- XCTAssertEqual ( " [email protected] " , String ( bytes
: blob
. bytes
, encoding
: . utf8
) !
)
68
+ _ = try statement. step ( )
76
69
77
70
// verify that the transaction is not closed, which prevents wal_checkpoints (both explicit and auto)
78
71
do {
You can’t perform that action at this time.
0 commit comments