Skip to content

Commit

Permalink
Merge pull request #230 from ably/fix-rtn10b
Browse files Browse the repository at this point in the history
Fix RTN10b.
  • Loading branch information
tcard committed Feb 18, 2016
2 parents b152d92 + 1496e5e commit f75097e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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

0 comments on commit f75097e

Please sign in to comment.