-
Notifications
You must be signed in to change notification settings - Fork 26
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
RTN15a #244
RTN15a #244
Conversation
Well, I realised right now that what I did here is more about RTN15d. |
client1.connection.on { stateChange in | ||
switch stateChange!.current { | ||
case .Connecting: | ||
channel1.unsubscribe(listener1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listener1
should still work, shouldn't it? Maybe you can instead of failing inside unconditionally, add a condition that it has reached the reconnection. That way we test that previous subscriptions still work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 551d534.
373602a
to
551d534
Compare
@tcard What do you think, should I test this? I think it's a server behaviour. |
@ricardopereira I don't see how we could test that meaningfully. Maybe @mattheworiordan does. |
I think this should be rebased with #228 fixes. |
|
||
waitUntil(timeout: testTimeout) { done in | ||
// Check the queued message | ||
channel1.subscribe { message in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you resubscribing, you have a listener already defined above on line 1322. Also, subscribing after you're connected is not going to work because it's quite possible the message has already been received at this point.
You're right, you can't test that behaviour. We can however test that a connection resume fails i.e. this would happen after connection state is lost. We can test this by changing the connection key explicitly so that a connection cannot be resumed |
4eb1490
to
b274f12
Compare
Rebased with master with changes: b274f12. |
context("connection failures once CONNECTED") { | ||
|
||
// RTN15a | ||
it("should attempt to reconnect immediately and try to restore the connection") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this test is testing the failure condition, this description should reflect that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 6c55525.
LGTM |
@tcard PTAL |
LGTM |
6c55525
to
8bf754d
Compare
No description provided.