From 2429f284b4711f2b8a7c69fd517485e554701217 Mon Sep 17 00:00:00 2001 From: Johannes Weiss Date: Thu, 5 Mar 2020 18:58:54 +0000 Subject: [PATCH] use 3 EventLoops for tests 3 makes it less likely that correlated Channels share an EventLoop so it should shake out more threading bugs... --- Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift | 4 ++-- Tests/AsyncHTTPClientTests/HTTPClientTests.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift index 62e5fe96e..313f13891 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift @@ -164,7 +164,7 @@ enum TemporaryFileHelpers { } internal final class HTTPBin { - let group = MultiThreadedEventLoopGroup(numberOfThreads: 1) + let group = MultiThreadedEventLoopGroup(numberOfThreads: 3) let serverChannel: Channel let isShutdown: NIOAtomic = .makeAtomic(value: false) var connectionCount: NIOAtomic = .makeAtomic(value: 0) @@ -569,7 +569,7 @@ final class CountActiveConnectionsHandler: ChannelInboundHandler { } internal class HttpBinForSSLUncleanShutdown { - let group = MultiThreadedEventLoopGroup(numberOfThreads: 1) + let group = MultiThreadedEventLoopGroup(numberOfThreads: 3) let serverChannel: Channel var port: Int { diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift index 049ce78d4..583a1ccaf 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift @@ -29,7 +29,7 @@ class HTTPClientTests: XCTestCase { override func setUp() { XCTAssertNil(self.group) - self.group = MultiThreadedEventLoopGroup(numberOfThreads: 1) + self.group = MultiThreadedEventLoopGroup(numberOfThreads: 3) } override func tearDown() {