Skip to content

Commit 81375ef

Browse files
glbrnttLukasa
andauthored
Strict concurrency for NIOTLSTests (#3207)
Co-authored-by: Cory Benfield <[email protected]>
1 parent 27a1897 commit 81375ef

3 files changed

+8
-7
lines changed

Diff for: Package.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ let package = Package(
511511
"NIOTLS",
512512
"NIOFoundationCompat",
513513
"NIOTestUtils",
514-
]
514+
],
515+
swiftSettings: strictConcurrencySettings
515516
),
516517
.testTarget(
517518
name: "NIOWebSocketTests",

Diff for: Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class ApplicationProtocolNegotiationHandlerTests: XCTestCase {
197197
let readCompleteHandler = ReadCompletedHandler()
198198

199199
try channel.pipeline.syncOperations.addHandler(handler)
200-
try channel.pipeline.addHandler(readCompleteHandler).wait()
200+
try channel.pipeline.syncOperations.addHandler(readCompleteHandler)
201201

202202
// Fire in the event.
203203
channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent)
@@ -224,7 +224,7 @@ class ApplicationProtocolNegotiationHandlerTests: XCTestCase {
224224
let readCompleteHandler = ReadCompletedHandler()
225225

226226
try channel.pipeline.syncOperations.addHandler(handler)
227-
try channel.pipeline.addHandler(readCompleteHandler).wait()
227+
try channel.pipeline.syncOperations.addHandler(readCompleteHandler)
228228

229229
// Fire in the event.
230230
channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent)
@@ -254,8 +254,8 @@ class ApplicationProtocolNegotiationHandlerTests: XCTestCase {
254254
let readCompleteHandler = ReadCompletedHandler()
255255

256256
try channel.pipeline.syncOperations.addHandler(handler)
257-
try channel.pipeline.addHandler(DuplicatingReadHandler(embeddedChannel: channel)).wait()
258-
try channel.pipeline.addHandler(readCompleteHandler).wait()
257+
try channel.pipeline.syncOperations.addHandler(DuplicatingReadHandler(embeddedChannel: channel))
258+
try channel.pipeline.syncOperations.addHandler(readCompleteHandler)
259259

260260
// Fire in the event.
261261
channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent)

Diff for: Tests/NIOTLSTests/NIOTypedApplicationProtocolNegotiationHandlerTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ final class NIOTypedApplicationProtocolNegotiationHandlerTests: XCTestCase {
198198
let eventCounterHandler = EventCounterHandler()
199199

200200
try channel.pipeline.syncOperations.addHandler(handler)
201-
try channel.pipeline.addHandler(DuplicatingReadHandler(embeddedChannel: channel)).wait()
202-
try channel.pipeline.addHandler(eventCounterHandler).wait()
201+
try channel.pipeline.syncOperations.addHandler(DuplicatingReadHandler(embeddedChannel: channel))
202+
try channel.pipeline.syncOperations.addHandler(eventCounterHandler)
203203

204204
// Fire in the event.
205205
channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent)

0 commit comments

Comments
 (0)