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

Fix tests trying to contact the real hydra server #805

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

Askaholic
Copy link
Collaborator

This was the cause of some flaky tests when the server went down.

@Askaholic Askaholic requested a review from Sheikah45 July 1, 2021 06:14
@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #805 (386f629) into develop (58c5887) will not change coverage.
The diff coverage is n/a.

Copy link
Member

@Sheikah45 Sheikah45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay I see there was a race condition in terms of the oauth service initialization vs when the first update of the public keys happens.

Although I am confused as to how that happened since the initialization should have only happened after the jwk path was mocked. And I would think that would cause all the tests to fail even if the server wasn't done as it would have different jwks than the one the test cases are signed with.

But overall changes look good, but confused as to why it was flaky in the first place.

@Askaholic
Copy link
Collaborator Author

It's only flaky in that one test test_multiple_contexts because that one doesn't use the lobby_server fixture.

@Askaholic Askaholic merged commit c4ce9b3 into FAForever:develop Jul 2, 2021
@Askaholic Askaholic deleted the mock-hydra-url-in-tests branch July 2, 2021 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants