Skip to content
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

Failing test - authUrl JWT tests depend on external host #188

Open
mattheworiordan opened this issue Aug 5, 2019 · 3 comments
Open

Failing test - authUrl JWT tests depend on external host #188

mattheworiordan opened this issue Aug 5, 2019 · 3 comments
Labels
enhancement New feature or improved functionality. failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug.

Comments

@mattheworiordan
Copy link
Member

mattheworiordan commented Aug 5, 2019

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

@mattheworiordan mattheworiordan added enhancement New feature or improved functionality. failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug. labels Aug 5, 2019
@mattheworiordan
Copy link
Member Author

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.

@piotrpawlik
Copy link

@mattheworiordan Could you link example of how to run local web server?

@sync-by-unito sync-by-unito bot changed the title authUrl JWT tests depend on external host Failing test - authUrl JWT tests depend on external host Mar 9, 2023
@lawrence-forooghian
Copy link
Collaborator

lawrence-forooghian commented Apr 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality. failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug.
Development

No branches or pull requests

4 participants