WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 480f29f

Browse files
authored
EventLoopGroupProvider.createNew has been deprecated (#654)
1 parent f7a769b commit 480f29f

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

Sources/HummingbirdTesting/LiveTestFramework.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ final class LiveTestFramework<App: ApplicationProtocol>: ApplicationTestFramewor
6464
let client = TestClient(
6565
host: "localhost",
6666
port: port,
67-
configuration: .init(timeout: self.timeout),
68-
eventLoopGroupProvider: .createNew
67+
configuration: .init(timeout: self.timeout)
6968
)
7069
client.connect()
7170
do {

Sources/HummingbirdTesting/TestClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public struct TestClient: Sendable {
6161
host: String,
6262
port: Int,
6363
configuration: Configuration = .init(),
64-
eventLoopGroupProvider: NIOEventLoopGroupProvider
64+
eventLoopGroupProvider: NIOEventLoopGroupProvider = .shared(MultiThreadedEventLoopGroup.singleton)
6565
) {
6666
self.eventLoopGroupProvider = eventLoopGroupProvider
6767
switch eventLoopGroupProvider {

Tests/HummingbirdCoreTests/CoreTests.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ final class HummingbirdCoreTests: XCTestCase {
8282
let client = TestClient(
8383
host: "localhost",
8484
port: port,
85-
configuration: .init(),
86-
eventLoopGroupProvider: .createNew
85+
configuration: .init()
8786
)
8887
client.connect()
8988
let response = try await client.post("/", body: ByteBuffer(string: "Hello"))
@@ -144,8 +143,7 @@ final class HummingbirdCoreTests: XCTestCase {
144143
let client = TestClient(
145144
host: "localhost",
146145
port: port,
147-
configuration: .init(),
148-
eventLoopGroupProvider: .createNew
146+
configuration: .init()
149147
)
150148
client.connect()
151149
let response = try await client.post("/", body: ByteBuffer(string: "Hello"))
@@ -535,8 +533,7 @@ final class HummingbirdCoreTests: XCTestCase {
535533
let client = await TestClient(
536534
host: "localhost",
537535
port: portPromise.wait(),
538-
configuration: .init(),
539-
eventLoopGroupProvider: .createNew
536+
configuration: .init()
540537
)
541538
group.addTask {
542539
do {

Tests/HummingbirdCoreTests/TestUtils.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ public func testServer<Value: Sendable>(
104104
let client = TestClient(
105105
host: "localhost",
106106
port: port,
107-
configuration: clientConfiguration,
108-
eventLoopGroupProvider: .createNew
107+
configuration: clientConfiguration
109108
)
110109
client.connect()
111110
let value = try await test(client)

0 commit comments

Comments
 (0)