ably-ruby
ably-ruby copied to clipboard
Failing test - authUrl JWT tests depend on external host
rspec './spec/acceptance/realtime/auth_spec.rb[1:2:11:4:1]' # Ably::Realtime::Auth using MsgPack protocol when using JWT when JWT token expires client disconnects, a new token is requested via auth_callback and the client gets reconnected
This test intermittently fails possibly because it relies on a 3rd party endpoint echo.ably.io. That is not necessary given we can serve our own web server endpoint.
┆Issue is synchronized with this Jira Story by Unito
For this particular issue the recommendations here is to run a local web server in the test and not to stub out the request. I am on mobile now so can't find other examples where this is done, but this approach has been done in a few places in the tests.
@mattheworiordan Could you link example of how to run local web server?
Agree that running a web server inside the test process would be better.
Just wanted to add that this problem is not unique to ably-ruby; we use echo.ably.io across many of our SDKs and recommend its use in the client library specification.