Skip to content

Commit 2429f28

Browse files
committed
use 3 EventLoops for tests
3 makes it less likely that correlated Channels share an EventLoop so it should shake out more threading bugs...
1 parent 9cdd1dc commit 2429f28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ enum TemporaryFileHelpers {
164164
}
165165

166166
internal final class HTTPBin {
167-
let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
167+
let group = MultiThreadedEventLoopGroup(numberOfThreads: 3)
168168
let serverChannel: Channel
169169
let isShutdown: NIOAtomic<Bool> = .makeAtomic(value: false)
170170
var connectionCount: NIOAtomic<Int> = .makeAtomic(value: 0)
@@ -569,7 +569,7 @@ final class CountActiveConnectionsHandler: ChannelInboundHandler {
569569
}
570570

571571
internal class HttpBinForSSLUncleanShutdown {
572-
let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
572+
let group = MultiThreadedEventLoopGroup(numberOfThreads: 3)
573573
let serverChannel: Channel
574574

575575
var port: Int {

Tests/AsyncHTTPClientTests/HTTPClientTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HTTPClientTests: XCTestCase {
2929

3030
override func setUp() {
3131
XCTAssertNil(self.group)
32-
self.group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
32+
self.group = MultiThreadedEventLoopGroup(numberOfThreads: 3)
3333
}
3434

3535
override func tearDown() {

0 commit comments

Comments
 (0)