@@ -15,15 +15,10 @@ class FieldExecutionStrategyTests: XCTestCase {
1515 " sleep " : GraphQLField (
1616 type: GraphQLString,
1717 resolve: { _, _, _, eventLoopGroup, _ in
18- let group = DispatchGroup ( )
19- group. enter ( )
20-
21- DispatchQueue . global ( ) . asyncAfter ( wallDeadline: . now( ) + 0.1 ) {
22- group. leave ( )
18+ eventLoopGroup. next ( ) . makeSucceededVoidFuture ( ) . map {
19+ Thread . sleep ( forTimeInterval: 0.1 )
20+ return " z "
2321 }
24-
25- group. wait ( )
26- return eventLoopGroup. next ( ) . makeSucceededFuture ( " z " )
2722 }
2823 ) ,
2924 " bang " : GraphQLField (
@@ -251,7 +246,7 @@ class FieldExecutionStrategyTests: XCTestCase {
251246 eventLoopGroup: eventLoopGroup
252247 ) . wait ( ) )
253248 XCTAssertEqual ( result. value, multiExpected)
254- // XCTAssertEqualWithAccuracy(1.0, result.seconds, accuracy: 0.5)
249+ // XCTAssertEqualWithAccuracy(1.0, result.seconds, accuracy: 0.5)
255250 }
256251
257252 func testSerialFieldExecutionStrategyWithMultipleFieldErrors( ) throws {
@@ -300,7 +295,7 @@ class FieldExecutionStrategyTests: XCTestCase {
300295 eventLoopGroup: eventLoopGroup
301296 ) . wait ( ) )
302297 XCTAssertEqual ( result. value, multiExpected)
303- // XCTAssertEqualWithAccuracy(0.1, result.seconds, accuracy: 0.25)
298+ // XCTAssertEqualWithAccuracy(0.1, result.seconds, accuracy: 0.25)
304299 }
305300
306301 func testConcurrentDispatchFieldExecutionStrategyWithMultipleFieldErrors( ) throws {
0 commit comments