diff --git a/Package.swift b/Package.swift index 8a23647e8..7d0707ae5 100644 --- a/Package.swift +++ b/Package.swift @@ -511,7 +511,8 @@ let package = Package( "NIOTLS", "NIOFoundationCompat", "NIOTestUtils", - ] + ], + swiftSettings: strictConcurrencySettings ), .testTarget( name: "NIOWebSocketTests", diff --git a/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests.swift b/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests.swift index 498a6f976..ba9349fae 100644 --- a/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests.swift +++ b/Tests/NIOTLSTests/ApplicationProtocolNegotiationHandlerTests.swift @@ -197,7 +197,7 @@ class ApplicationProtocolNegotiationHandlerTests: XCTestCase { let readCompleteHandler = ReadCompletedHandler() try channel.pipeline.syncOperations.addHandler(handler) - try channel.pipeline.addHandler(readCompleteHandler).wait() + try channel.pipeline.syncOperations.addHandler(readCompleteHandler) // Fire in the event. channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent) @@ -224,7 +224,7 @@ class ApplicationProtocolNegotiationHandlerTests: XCTestCase { let readCompleteHandler = ReadCompletedHandler() try channel.pipeline.syncOperations.addHandler(handler) - try channel.pipeline.addHandler(readCompleteHandler).wait() + try channel.pipeline.syncOperations.addHandler(readCompleteHandler) // Fire in the event. channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent) @@ -254,8 +254,8 @@ class ApplicationProtocolNegotiationHandlerTests: XCTestCase { let readCompleteHandler = ReadCompletedHandler() try channel.pipeline.syncOperations.addHandler(handler) - try channel.pipeline.addHandler(DuplicatingReadHandler(embeddedChannel: channel)).wait() - try channel.pipeline.addHandler(readCompleteHandler).wait() + try channel.pipeline.syncOperations.addHandler(DuplicatingReadHandler(embeddedChannel: channel)) + try channel.pipeline.syncOperations.addHandler(readCompleteHandler) // Fire in the event. channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent) diff --git a/Tests/NIOTLSTests/NIOTypedApplicationProtocolNegotiationHandlerTests.swift b/Tests/NIOTLSTests/NIOTypedApplicationProtocolNegotiationHandlerTests.swift index 2e4f22187..154c2d834 100644 --- a/Tests/NIOTLSTests/NIOTypedApplicationProtocolNegotiationHandlerTests.swift +++ b/Tests/NIOTLSTests/NIOTypedApplicationProtocolNegotiationHandlerTests.swift @@ -198,8 +198,8 @@ final class NIOTypedApplicationProtocolNegotiationHandlerTests: XCTestCase { let eventCounterHandler = EventCounterHandler() try channel.pipeline.syncOperations.addHandler(handler) - try channel.pipeline.addHandler(DuplicatingReadHandler(embeddedChannel: channel)).wait() - try channel.pipeline.addHandler(eventCounterHandler).wait() + try channel.pipeline.syncOperations.addHandler(DuplicatingReadHandler(embeddedChannel: channel)) + try channel.pipeline.syncOperations.addHandler(eventCounterHandler) // Fire in the event. channel.pipeline.fireUserInboundEventTriggered(negotiatedEvent)