Skip to content

Commit a8a35ae

Browse files
authored
Attempted fix for integration test failing on CI (#2024)
1 parent a1e857c commit a8a35ae

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/ApolloWebSocket/WebSocketTransport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class WebSocketTransport {
5555

5656
private var subscribers = [String: (Result<JSONObject, Error>) -> Void]()
5757
private var subscriptions : [String: String] = [:]
58-
private let processingQueue = DispatchQueue(label: "com.apollographql.WebSocketTransport")
58+
let processingQueue = DispatchQueue(label: "com.apollographql.WebSocketTransport")
5959

6060
private let sendOperationIdentifiers: Bool
6161
private let reconnectionInterval: TimeInterval

Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ class StarWarsSubscriptionTests: XCTestCase {
334334
// dispatched with a barrier flag to make sure
335335
// this is performed after subscription calls
336336
concurrentQueue.sync(flags: .barrier) {
337-
// dispatched on the processing queue to make sure
337+
// dispatched on the processing queue with barrier flag to make sure
338338
// this is performed after subscribers are processed
339-
self.webSocketTransport.websocket.callbackQueue.async {
339+
self.webSocketTransport.processingQueue.async(flags: .barrier) {
340340
_ = self.client.perform(mutation: CreateReviewForEpisodeMutation(episode: .empire, review: ReviewInput(stars: 5, commentary: "The greatest movie ever!")))
341341
}
342342
}

0 commit comments

Comments
 (0)