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
File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
Sources/HummingbirdTesting
Tests/HummingbirdCoreTests Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments