Commit 524f3b4 1 parent 2018e41 commit 524f3b4 Copy full SHA for 524f3b4
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -108,17 +108,19 @@ class ConnectionPoolTestCase: BaseTestCase {
108
108
109
109
func testThatConnectionPoolCanExecuteReadOnlyClosure( ) throws {
110
110
// Given
111
+ let connection = try Connection ( storageLocation: storageLocation)
112
+ try TestTables . createAndPopulateAgentsTable ( using: connection)
111
113
let pool = ConnectionPool ( storageLocation: storageLocation)
112
114
113
115
var count : Int ?
114
116
115
117
// When
116
118
try pool. execute { connection in
117
- count = try connection. query ( " SELECT count(*) FROM sqlite_master where type = 'table' " )
119
+ count = try connection. query ( " SELECT count(*) FROM agents " )
118
120
}
119
121
120
122
// Then
121
- XCTAssertEqual ( count, 0 )
123
+ XCTAssertGreaterThanOrEqual ( count ?? - 1 , 0 )
122
124
}
123
125
124
126
func testThatConnectionPoolFailsToExecuteWriteClosure( ) {
You can’t perform that action at this time.
0 commit comments