@@ -28,11 +28,11 @@ class SubscriptionTests: XCTestCase {
28
28
}
29
29
"""
30
30
31
- let subscriptionResult = try graphqlSubscribe (
31
+ let subscriptionResult = try await graphqlSubscribe (
32
32
schema: schema,
33
33
request: query,
34
34
eventLoopGroup: eventLoopGroup
35
- ) . wait ( )
35
+ ) . get ( )
36
36
guard let subscription = subscriptionResult. stream else {
37
37
XCTFail ( subscriptionResult. errors. description)
38
38
return
@@ -653,7 +653,7 @@ class SubscriptionTests: XCTestCase {
653
653
] ]
654
654
)
655
655
)
656
- wait ( for : [ expectation] , timeout: timeoutDuration)
656
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
657
657
XCTAssertEqual ( results, expected)
658
658
659
659
// Low priority email shouldn't trigger an event
@@ -666,7 +666,7 @@ class SubscriptionTests: XCTestCase {
666
666
unread: true ,
667
667
priority: 2
668
668
) )
669
- wait ( for : [ expectation] , timeout: timeoutDuration)
669
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
670
670
XCTAssertEqual ( results, expected)
671
671
672
672
// Higher priority one should trigger again
@@ -692,7 +692,7 @@ class SubscriptionTests: XCTestCase {
692
692
] ]
693
693
)
694
694
)
695
- wait ( for : [ expectation] , timeout: timeoutDuration)
695
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
696
696
XCTAssertEqual ( results, expected)
697
697
698
698
// So that the Task won't immediately be cancelled since the ConcurrentEventStream is
@@ -754,7 +754,7 @@ class SubscriptionTests: XCTestCase {
754
754
] ]
755
755
)
756
756
)
757
- wait ( for : [ expectation] , timeout: timeoutDuration)
757
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
758
758
XCTAssertEqual ( results, expected)
759
759
760
760
db. stop ( )
@@ -770,7 +770,7 @@ class SubscriptionTests: XCTestCase {
770
770
) )
771
771
772
772
// Ensure that the current result was the one before the db was stopped
773
- wait ( for : [ expectation] , timeout: timeoutDuration)
773
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
774
774
XCTAssertEqual ( results, expected)
775
775
776
776
// So that the Task won't immediately be cancelled since the ConcurrentEventStream is
@@ -917,7 +917,7 @@ class SubscriptionTests: XCTestCase {
917
917
] ]
918
918
)
919
919
)
920
- wait ( for : [ expectation] , timeout: timeoutDuration)
920
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
921
921
XCTAssertEqual ( results, expected)
922
922
923
923
expectation = XCTestExpectation ( )
@@ -936,7 +936,7 @@ class SubscriptionTests: XCTestCase {
936
936
]
937
937
)
938
938
)
939
- wait ( for : [ expectation] , timeout: timeoutDuration)
939
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
940
940
XCTAssertEqual ( results, expected)
941
941
942
942
expectation = XCTestExpectation ( )
@@ -957,7 +957,7 @@ class SubscriptionTests: XCTestCase {
957
957
] ]
958
958
)
959
959
)
960
- wait ( for : [ expectation] , timeout: timeoutDuration)
960
+ await fulfillment ( of : [ expectation] , timeout: timeoutDuration)
961
961
XCTAssertEqual ( results, expected)
962
962
963
963
// So that the Task won't immediately be cancelled since the ConcurrentEventStream is
0 commit comments