Ensure connections are always closed in tests#63
Merged
mattheworiordan merged 12 commits intoOct 8, 2015
Conversation
Previously: - if using a token string for auth, but then following an auth callback a token details object was used, the library continued to use the string literal provided - auth callbacks returning a token string would fail because a tokenDetails object expected the expires field in all cases
stop_reactor will now run connection.close and allow at least 100ms to send the ProtocolMessage before stopping the EM reactor
Previously some errbacks would receive an error as the first argument, and other times as the second. Consistency is important, especially when there are assumptions about how to handle Errors with errbacks, that turn out not to be Errors at all
…f connections during connection
This happens because connections are now closed when a test is complete, which means this can feasibly happen before the CONNECTED message is received from Ably
const_get in 1.9.3 cannot include `::`
Oddly if the connections are closed in descending order of creation encoding errors occur?
One or more messages were being left in the NACK/ACK queue even after they have been processed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@paddybyers FYI, I now close all connections automatically, which unfortunately unearthed a LOT of small issues in the Ruby lib to do with the library shutting down which weirdly, before this, had very little coverage.
So far, it appears that the account limits issue is no longer a problem, see https://travis-ci.org/ably/ably-ruby. Some tests are failing, but those are primarily known problems in realtime. This addresses https://github.com/ably/realtime/issues/296