From 345343c68d6115dc4dded127fe06c1130e1e3b8d Mon Sep 17 00:00:00 2001 From: Anthony Miller Date: Tue, 9 Nov 2021 10:53:43 -0800 Subject: [PATCH] Attempted fix for integration test failing on CI --- Sources/ApolloWebSocket/WebSocketTransport.swift | 2 +- .../StarWarsSubscriptionTests.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/ApolloWebSocket/WebSocketTransport.swift b/Sources/ApolloWebSocket/WebSocketTransport.swift index a026926aad..aed9d25bec 100644 --- a/Sources/ApolloWebSocket/WebSocketTransport.swift +++ b/Sources/ApolloWebSocket/WebSocketTransport.swift @@ -55,7 +55,7 @@ public class WebSocketTransport { private var subscribers = [String: (Result) -> Void]() private var subscriptions : [String: String] = [:] - private let processingQueue = DispatchQueue(label: "com.apollographql.WebSocketTransport") + let processingQueue = DispatchQueue(label: "com.apollographql.WebSocketTransport") private let sendOperationIdentifiers: Bool private let reconnectionInterval: TimeInterval diff --git a/Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift b/Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift index 54842108a9..8da86d0f78 100644 --- a/Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift +++ b/Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift @@ -334,9 +334,9 @@ class StarWarsSubscriptionTests: XCTestCase { // dispatched with a barrier flag to make sure // this is performed after subscription calls concurrentQueue.sync(flags: .barrier) { - // dispatched on the processing queue to make sure + // dispatched on the processing queue with barrier flag to make sure // this is performed after subscribers are processed - self.webSocketTransport.websocket.callbackQueue.async { + self.webSocketTransport.processingQueue.async(flags: .barrier) { _ = self.client.perform(mutation: CreateReviewForEpisodeMutation(episode: .empire, review: ReviewInput(stars: 5, commentary: "The greatest movie ever!"))) } }