Skip to content

Commit

Permalink
EventLoopGroupProvider.createNew has been deprecated (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler authored Jan 13, 2025
1 parent f7a769b commit 480f29f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions Sources/HummingbirdTesting/LiveTestFramework.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ final class LiveTestFramework<App: ApplicationProtocol>: ApplicationTestFramewor
let client = TestClient(
host: "localhost",
port: port,
configuration: .init(timeout: self.timeout),
eventLoopGroupProvider: .createNew
configuration: .init(timeout: self.timeout)
)
client.connect()
do {
Expand Down
2 changes: 1 addition & 1 deletion Sources/HummingbirdTesting/TestClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct TestClient: Sendable {
host: String,
port: Int,
configuration: Configuration = .init(),
eventLoopGroupProvider: NIOEventLoopGroupProvider
eventLoopGroupProvider: NIOEventLoopGroupProvider = .shared(MultiThreadedEventLoopGroup.singleton)
) {
self.eventLoopGroupProvider = eventLoopGroupProvider
switch eventLoopGroupProvider {
Expand Down
9 changes: 3 additions & 6 deletions Tests/HummingbirdCoreTests/CoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ final class HummingbirdCoreTests: XCTestCase {
let client = TestClient(
host: "localhost",
port: port,
configuration: .init(),
eventLoopGroupProvider: .createNew
configuration: .init()
)
client.connect()
let response = try await client.post("/", body: ByteBuffer(string: "Hello"))
Expand Down Expand Up @@ -144,8 +143,7 @@ final class HummingbirdCoreTests: XCTestCase {
let client = TestClient(
host: "localhost",
port: port,
configuration: .init(),
eventLoopGroupProvider: .createNew
configuration: .init()
)
client.connect()
let response = try await client.post("/", body: ByteBuffer(string: "Hello"))
Expand Down Expand Up @@ -535,8 +533,7 @@ final class HummingbirdCoreTests: XCTestCase {
let client = await TestClient(
host: "localhost",
port: portPromise.wait(),
configuration: .init(),
eventLoopGroupProvider: .createNew
configuration: .init()
)
group.addTask {
do {
Expand Down
3 changes: 1 addition & 2 deletions Tests/HummingbirdCoreTests/TestUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ public func testServer<Value: Sendable>(
let client = TestClient(
host: "localhost",
port: port,
configuration: clientConfiguration,
eventLoopGroupProvider: .createNew
configuration: clientConfiguration
)
client.connect()
let value = try await test(client)
Expand Down

0 comments on commit 480f29f

Please sign in to comment.