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 RTN10b. #230

Merged
merged 1 commit into from
Feb 18, 2016
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
1 change: 1 addition & 0 deletions ably-ios/ARTConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ - (instancetype)initWithRealtime:(ARTRealtime *)realtime {
if (self == [super init]) {
_realtime = realtime;
_eventEmitter = realtime.eventEmitter;
_serial = -1;
}
return self;
}
Expand Down
8 changes: 6 additions & 2 deletions ablySpec/RealtimeClientConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -952,15 +952,19 @@ class RealtimeClientConnection: QuickSpec {
}

// RTN10b
pending("should not update when a message is sent but increments by one when ACK is received") {
it("should not update when a message is sent but increments by one when ACK is received") {
let client = ARTRealtime(options: AblyTests.commonAppSetup())
defer {
client.dispose()
client.close()
}
let channel = client.channels.get("test")

for index in 0...5 {
expect(client.connection.serial).to(equal(-1))
expect(client.connection.state).toEventually(equal(ARTRealtimeConnectionState.Connected), timeout: testTimeout)
expect(client.connection.serial).to(equal(-1))

for index in 0...3 {
waitUntil(timeout: testTimeout) { done in
channel.publish(nil, data: "message", cb: { errorInfo in
expect(errorInfo).to(beNil())
Expand Down