Skip to content

Commit

Permalink
To be squashed.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcard committed Feb 18, 2016
1 parent 163551e commit 7debb07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ablySpec/RealtimeClientConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,16 @@ class RealtimeClientConnection: QuickSpec {
gotPublishedCallback = true
})

let oldConnectionId = client.connection.id!
// Wait until the message is pushed to Ably first
delay(1.0) {
client.simulateLostConnection()
expect(client.connection.id).to(beNil())
expect(gotPublishedCallback).to(beFalse())
expect(client.connection.id).toEventuallyNot(beNil(), timeout: testTimeout) // Connection ID resetted.
expect(client.connection.id).toNot(equal(oldConnectionId))
expect(gotPublishedCallback).to(beTrue())
}
expect(gotPublishedCallback).toEventually(beTrue(), timeout: testTimeout)
}

}
Expand Down

0 comments on commit 7debb07

Please sign in to comment.