@@ -190,86 +190,6 @@ class PostgreSQLConnectionTests: XCTestCase {
190
190
_ = try categories. wait ( )
191
191
}
192
192
193
- // func testNotifyAndListen() throws {
194
- // let completionHandlerExpectation1 = expectation(description: "first completion handler called")
195
- // let completionHandlerExpectation2 = expectation(description: "final completion handler called")
196
- // let notifyConn = try PostgreSQLConnection.makeTest()
197
- // let listenConn = try PostgreSQLConnection.makeTest()
198
- // let channelName = "Fooze"
199
- // let messageText = "Bar"
200
- // let finalMessageText = "Baz"
201
- //
202
- // try listenConn.listen(channelName) { text in
203
- // if text == messageText {
204
- // completionHandlerExpectation1.fulfill()
205
- // } else if text == finalMessageText {
206
- // completionHandlerExpectation2.fulfill()
207
- // }
208
- // }.catch({ err in XCTFail("error \(err)") })
209
- //
210
- // try notifyConn.notify(channelName, message: messageText).wait()
211
- // try notifyConn.notify(channelName, message: finalMessageText).wait()
212
- //
213
- // waitForExpectations(timeout: defaultTimeout)
214
- // notifyConn.close()
215
- // listenConn.close()
216
- // }
217
- //
218
- // func testNotifyAndListenOnMultipleChannels() throws {
219
- // let completionHandlerExpectation1 = expectation(description: "first completion handler called")
220
- // let completionHandlerExpectation2 = expectation(description: "final completion handler called")
221
- // let notifyConn = try PostgreSQLConnection.makeTest()
222
- // let listenConn = try PostgreSQLConnection.makeTest()
223
- // let channelName = "Fooze"
224
- // let channelName2 = "Foozalz"
225
- // let messageText = "Bar"
226
- // let finalMessageText = "Baz"
227
- //
228
- // try listenConn.listen(channelName) { text in
229
- // if text == messageText {
230
- // completionHandlerExpectation1.fulfill()
231
- // }
232
- // }.catch({ err in XCTFail("error \(err)") })
233
- //
234
- // try listenConn.listen(channelName2) { text in
235
- // if text == finalMessageText {
236
- // completionHandlerExpectation2.fulfill()
237
- // }
238
- // }.catch({ err in XCTFail("error \(err)") })
239
- //
240
- // try notifyConn.notify(channelName, message: messageText).wait()
241
- // try notifyConn.notify(channelName2, message: finalMessageText).wait()
242
- //
243
- // waitForExpectations(timeout: defaultTimeout)
244
- // notifyConn.close()
245
- // listenConn.close()
246
- // }
247
- //
248
- // func testUnlisten() throws {
249
- // let unlistenHandlerExpectation = expectation(description: "unlisten completion handler called")
250
- //
251
- // let listenHandlerExpectation = expectation(description: "listen completion handler called")
252
- //
253
- // let notifyConn = try PostgreSQLConnection.makeTest()
254
- // let listenConn = try PostgreSQLConnection.makeTest()
255
- // let channelName = "Foozers"
256
- // let messageText = "Bar"
257
- //
258
- // try listenConn.listen(channelName) { text in
259
- // if text == messageText {
260
- // listenHandlerExpectation.fulfill()
261
- // }
262
- // }.catch({ err in XCTFail("error \(err)") })
263
- //
264
- // try notifyConn.notify(channelName, message: messageText).wait()
265
- // try notifyConn.unlisten(channelName, unlistenHandler: {
266
- // unlistenHandlerExpectation.fulfill()
267
- // }).wait()
268
- // waitForExpectations(timeout: defaultTimeout)
269
- // notifyConn.close()
270
- // listenConn.close()
271
- // }
272
-
273
193
func testURLParsing( ) throws {
274
194
let databaseURL = " postgres://username:password@localhost:5432/database "
275
195
let config = try PostgreSQLDatabaseConfig ( url: databaseURL)
@@ -553,7 +473,22 @@ class PostgreSQLConnectionTests: XCTestCase {
553
473
554
474
static var allTests = [
555
475
( " testVersion " , testVersion) ,
476
+ ( " testUnverifiedSSLConnection " , testUnverifiedSSLConnection) ,
477
+ ( " testSelectTypes " , testSelectTypes) ,
478
+ ( " testStruct " , testStruct) ,
479
+ ( " testNull " , testNull) ,
480
+ ( " testGH24 " , testGH24) ,
481
+ ( " testURLParsing " , testURLParsing) ,
482
+ ( " testGH46 " , testGH46) ,
483
+ ( " testDataDecoder " , testDataDecoder) ,
484
+ ( " testRowDecoder " , testRowDecoder) ,
485
+ ( " testRowCodableNested " , testRowCodableNested) ,
486
+ ( " testRowCodableTypes " , testRowCodableTypes) ,
487
+ ( " testDML " , testDML) ,
488
+ ( " testDMLNestedType " , testDMLNestedType) ,
556
489
( " testTimeTz " , testTimeTz) ,
490
+ ( " testListen " , testListen) ,
491
+ ( " testSum " , testSum) ,
557
492
]
558
493
}
559
494
0 commit comments