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

Fix 977 #1022

Merged
merged 1 commit into from
Jun 18, 2020
Merged

Fix 977 #1022

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
12 changes: 7 additions & 5 deletions Spec/RealtimeClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1332,22 +1332,24 @@ class RealtimeClient: QuickSpec {
expect(result).to(equal(expectedOrder))
}

it ("subscriber should receive messages in the same order in which they have been sent") {
it("subscriber should receive messages in the same order in which they have been sent") {
let options = AblyTests.commonAppSetup()
let realtime1 = ARTRealtime(options: options)
let realtime2 = ARTRealtime(options: options)
defer {
realtime1.dispose(); realtime1.close();
realtime2.dispose(); realtime2.close();
}

let subscribeChannel = realtime1.channels.get("testing")
let sendChannel = realtime2.channels.get("testing")

waitUntil(timeout: testTimeout) { done in
realtime1.connection.on(.connected) { _ in
subscribeChannel.attach() { _ in
done()
}
}

let subscribeChannel = realtime1.channels.get("testing")
let sendChannel = realtime2.channels.get("testing")

let expectedResults = [Int](1...50)

waitUntil(timeout: testTimeout) { done in
Expand Down