PR changes
This commit is contained in:
parent
d597722cca
commit
a19c933c37
|
|
@ -18,7 +18,7 @@ import XCTest
|
|||
import Network
|
||||
import NIOCore
|
||||
import NIOEmbedded
|
||||
@testable import NIOTransportServices
|
||||
import NIOTransportServices
|
||||
import NIOConcurrencyHelpers
|
||||
import Foundation
|
||||
|
||||
|
|
@ -384,10 +384,16 @@ final class NIOTSBootstrapTests: XCTestCase {
|
|||
|
||||
func channelActive(context: ChannelHandlerContext) {
|
||||
self.connectionPromise.succeed()
|
||||
context.pipeline.fireChannelActive()
|
||||
}
|
||||
}
|
||||
|
||||
let group = NIOTSEventLoopGroup(loopCount: 1)
|
||||
let group = NIOTSEventLoopGroup()
|
||||
defer {
|
||||
Task {
|
||||
try await group.shutdownGracefully()
|
||||
}
|
||||
}
|
||||
|
||||
let configuratorListenerCounter = NIOLockedValueBox(0)
|
||||
let configuratorConnectionCounter = NIOLockedValueBox(0)
|
||||
|
|
@ -422,8 +428,6 @@ final class NIOTSBootstrapTests: XCTestCase {
|
|||
|
||||
XCTAssertEqual(2, configuratorListenerCounter.withLockedValue { $0 })
|
||||
XCTAssertEqual(1, configuratorConnectionCounter.withLockedValue { $0 })
|
||||
|
||||
try await group.shutdownGracefully()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -245,10 +245,16 @@ final class NIOTSDatagramConnectionChannelTests: XCTestCase {
|
|||
|
||||
func channelActive(context: ChannelHandlerContext) {
|
||||
self.connectionPromise.succeed()
|
||||
context.fireChannelActive()
|
||||
}
|
||||
}
|
||||
|
||||
let group = NIOTSEventLoopGroup(loopCount: 1)
|
||||
let group = NIOTSEventLoopGroup()
|
||||
defer {
|
||||
Task {
|
||||
try await group.shutdownGracefully()
|
||||
}
|
||||
}
|
||||
|
||||
let configuratorListenerCounter = NIOLockedValueBox(0)
|
||||
let configuratorConnectionCounter = NIOLockedValueBox(0)
|
||||
|
|
@ -288,8 +294,6 @@ final class NIOTSDatagramConnectionChannelTests: XCTestCase {
|
|||
|
||||
XCTAssertEqual(2, configuratorListenerCounter.withLockedValue { $0 })
|
||||
XCTAssertEqual(1, configuratorConnectionCounter.withLockedValue { $0 })
|
||||
|
||||
try await group.shutdownGracefully()
|
||||
}
|
||||
|
||||
func testCanExtractTheConnection() throws {
|
||||
|
|
|
|||
Loading…
Reference in New Issue