Skip to content

Ensure connections are always closed in tests#63

Merged
mattheworiordan merged 12 commits into
masterfrom
ensure-connections-are-always-closed-in-tests
Oct 8, 2015
Merged

Ensure connections are always closed in tests#63
mattheworiordan merged 12 commits into
masterfrom
ensure-connections-are-always-closed-in-tests

Conversation

@mattheworiordan

Copy link
Copy Markdown
Member

@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

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
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.
@mattheworiordan mattheworiordan merged commit ab286f2 into master Oct 8, 2015
@mattheworiordan mattheworiordan deleted the ensure-connections-are-always-closed-in-tests branch November 4, 2015 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant