Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted fix for integration test failing on CI #2024

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/ApolloWebSocket/WebSocketTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class WebSocketTransport {

private var subscribers = [String: (Result<JSONObject, Error>) -> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!")))
}
}
Expand Down