@@ -54,7 +54,7 @@ class HTTPClientTests: XCTestCase {
54
54
let httpBin = HttpBin ( )
55
55
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
56
56
defer {
57
- try ! httpClient. syncShutdown ( )
57
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
58
58
httpBin. shutdown ( )
59
59
}
60
60
@@ -67,7 +67,8 @@ class HTTPClientTests: XCTestCase {
67
67
let elg = MultiThreadedEventLoopGroup ( numberOfThreads: 8 )
68
68
let httpClient = HTTPClient ( eventLoopGroupProvider: . shared( elg) )
69
69
defer {
70
- try ! elg. syncShutdownGracefully ( )
70
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
71
+ XCTAssertNoThrow ( try elg. syncShutdownGracefully ( ) )
71
72
httpBin. shutdown ( )
72
73
}
73
74
@@ -85,7 +86,7 @@ class HTTPClientTests: XCTestCase {
85
86
let httpBin = HttpBin ( )
86
87
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
87
88
defer {
88
- try ! httpClient. syncShutdown ( )
89
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
89
90
httpBin. shutdown ( )
90
91
}
91
92
@@ -102,7 +103,7 @@ class HTTPClientTests: XCTestCase {
102
103
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew,
103
104
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
104
105
defer {
105
- try ! httpClient. syncShutdown ( )
106
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
106
107
httpBin. shutdown ( )
107
108
}
108
109
@@ -115,7 +116,7 @@ class HTTPClientTests: XCTestCase {
115
116
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew,
116
117
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
117
118
defer {
118
- try ! httpClient. syncShutdown ( )
119
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
119
120
httpBin. shutdown ( )
120
121
}
121
122
@@ -136,7 +137,7 @@ class HTTPClientTests: XCTestCase {
136
137
configuration: HTTPClient . Configuration ( certificateVerification: . none, followRedirects: true ) )
137
138
138
139
defer {
139
- try ! httpClient. syncShutdown ( )
140
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
140
141
httpBin. shutdown ( )
141
142
httpsBin. shutdown ( )
142
143
}
@@ -154,7 +155,7 @@ class HTTPClientTests: XCTestCase {
154
155
configuration: HTTPClient . Configuration ( certificateVerification: . none, followRedirects: true ) )
155
156
156
157
defer {
157
- try ! httpClient. syncShutdown ( )
158
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
158
159
httpBin. shutdown ( )
159
160
}
160
161
@@ -176,7 +177,7 @@ class HTTPClientTests: XCTestCase {
176
177
let httpBin = HttpBin ( )
177
178
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
178
179
defer {
179
- try ! httpClient. syncShutdown ( )
180
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
180
181
httpBin. shutdown ( )
181
182
}
182
183
@@ -187,7 +188,7 @@ class HTTPClientTests: XCTestCase {
187
188
func testMultipleContentLengthHeaders( ) throws {
188
189
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
189
190
defer {
190
- try ! httpClient. syncShutdown ( )
191
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
191
192
}
192
193
let httpBin = HttpBin ( )
193
194
defer {
@@ -208,7 +209,7 @@ class HTTPClientTests: XCTestCase {
208
209
let httpBin = HttpBin ( )
209
210
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
210
211
defer {
211
- try ! httpClient. syncShutdown ( )
212
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
212
213
httpBin. shutdown ( )
213
214
}
214
215
@@ -226,7 +227,7 @@ class HTTPClientTests: XCTestCase {
226
227
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
227
228
228
229
defer {
229
- try ! httpClient. syncShutdown ( )
230
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
230
231
httpBin. shutdown ( )
231
232
}
232
233
@@ -242,7 +243,7 @@ class HTTPClientTests: XCTestCase {
242
243
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew, configuration: HTTPClient . Configuration ( timeout: HTTPClient . Configuration. Timeout ( read: . milliseconds( 150 ) ) ) )
243
244
244
245
defer {
245
- try ! httpClient. syncShutdown ( )
246
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
246
247
httpBin. shutdown ( )
247
248
}
248
249
@@ -258,7 +259,7 @@ class HTTPClientTests: XCTestCase {
258
259
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
259
260
260
261
defer {
261
- try ! httpClient. syncShutdown ( )
262
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
262
263
httpBin. shutdown ( )
263
264
}
264
265
@@ -274,7 +275,7 @@ class HTTPClientTests: XCTestCase {
274
275
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
275
276
276
277
defer {
277
- try ! httpClient. syncShutdown ( )
278
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
278
279
httpBin. shutdown ( )
279
280
}
280
281
@@ -300,7 +301,7 @@ class HTTPClientTests: XCTestCase {
300
301
configuration: . init( proxy: . server( host: " localhost " , port: httpBin. port) )
301
302
)
302
303
defer {
303
- try ! httpClient. syncShutdown ( )
304
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
304
305
httpBin. shutdown ( )
305
306
}
306
307
let res = try httpClient. get ( url: " http://test/ok " ) . wait ( )
@@ -317,7 +318,7 @@ class HTTPClientTests: XCTestCase {
317
318
)
318
319
)
319
320
defer {
320
- try ! httpClient. syncShutdown ( )
321
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
321
322
httpBin. shutdown ( )
322
323
}
323
324
let res = try httpClient. get ( url: " https://test/ok " ) . wait ( )
@@ -328,7 +329,7 @@ class HTTPClientTests: XCTestCase {
328
329
let httpBin = HttpBin ( )
329
330
let httpClient = HTTPClient ( eventLoopGroupProvider: . createNew)
330
331
defer {
331
- try ! httpClient. syncShutdown ( )
332
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
332
333
httpBin. shutdown ( )
333
334
}
334
335
@@ -354,7 +355,7 @@ class HTTPClientTests: XCTestCase {
354
355
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
355
356
356
357
defer {
357
- try ! httpClient. syncShutdown ( )
358
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
358
359
httpBin. shutdown ( )
359
360
}
360
361
@@ -371,7 +372,7 @@ class HTTPClientTests: XCTestCase {
371
372
configuration: HTTPClient . Configuration ( certificateVerification: . none, ignoreUncleanSSLShutdown: true ) )
372
373
373
374
defer {
374
- try ! httpClient. syncShutdown ( )
375
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
375
376
httpBin. shutdown ( )
376
377
}
377
378
@@ -389,7 +390,7 @@ class HTTPClientTests: XCTestCase {
389
390
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
390
391
391
392
defer {
392
- try ! httpClient. syncShutdown ( )
393
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
393
394
httpBin. shutdown ( )
394
395
}
395
396
@@ -407,7 +408,7 @@ class HTTPClientTests: XCTestCase {
407
408
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
408
409
409
410
defer {
410
- try ! httpClient. syncShutdown ( )
411
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
411
412
httpBin. shutdown ( )
412
413
}
413
414
@@ -423,7 +424,7 @@ class HTTPClientTests: XCTestCase {
423
424
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
424
425
425
426
defer {
426
- try ! httpClient. syncShutdown ( )
427
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
427
428
httpBin. shutdown ( )
428
429
}
429
430
@@ -440,7 +441,7 @@ class HTTPClientTests: XCTestCase {
440
441
configuration: HTTPClient . Configuration ( certificateVerification: . none, ignoreUncleanSSLShutdown: true ) )
441
442
442
443
defer {
443
- try ! httpClient. syncShutdown ( )
444
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
444
445
httpBin. shutdown ( )
445
446
}
446
447
@@ -457,7 +458,7 @@ class HTTPClientTests: XCTestCase {
457
458
configuration: HTTPClient . Configuration ( certificateVerification: . none) )
458
459
459
460
defer {
460
- try ! httpClient. syncShutdown ( )
461
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
461
462
httpBin. shutdown ( )
462
463
}
463
464
@@ -474,7 +475,7 @@ class HTTPClientTests: XCTestCase {
474
475
configuration: HTTPClient . Configuration ( certificateVerification: . none, ignoreUncleanSSLShutdown: true ) )
475
476
476
477
defer {
477
- try ! httpClient. syncShutdown ( )
478
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
478
479
httpBin. shutdown ( )
479
480
}
480
481
@@ -491,7 +492,8 @@ class HTTPClientTests: XCTestCase {
491
492
let httpClient = HTTPClient ( eventLoopGroupProvider: . shared( eventLoopGroup) ,
492
493
configuration: HTTPClient . Configuration ( followRedirects: true ) )
493
494
defer {
494
- try ! eventLoopGroup. syncShutdownGracefully ( )
495
+ XCTAssertNoThrow ( try httpClient. syncShutdown ( ) )
496
+ XCTAssertNoThrow ( try eventLoopGroup. syncShutdownGracefully ( ) )
495
497
httpBin. shutdown ( )
496
498
}
497
499
0 commit comments