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

Add explicit test_auth dependencies #3392

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

dbutenhof
Copy link
Member

PBENCH-1130

Several tests in test_auth.py implicitly depended on previous DB init; they were failing occasionally in CI parallel test runs when scheduled without the prior setup.

Resolves #3381

PBENCH-1130

Several tests in `test_auth.py` implicitly depended on previous DB init; they
were failing occasionally in CI parallel test runs when scheduled without the
prior setup.

Resolves distributed-system-analysis#3381
@riya-17
Copy link
Member

riya-17 commented Apr 20, 2023

@dbutenhof why this db_session was not used earlier?

@dbutenhof
Copy link
Member Author

@dbutenhof why this db_session was not used earlier?

I assume it was an oversight when the tests were written. Probably tested by running the entire test file, which succeeded because an earlier test (in normal sequential run order) had initialized the DB. Several of the tests use authentication tokens that end up pulling in the client fixture, which initializes the database (3 or 4 fixtures down).

The problem is that in the CI, we run tests in parallel, out of order; and sometimes, randomly, one of these tests gets run in a sequence without that setup. It's tricky.

@riya-17
Copy link
Member

riya-17 commented Apr 20, 2023

Thanks @dbutenhof

@dbutenhof dbutenhof merged commit a2ad6c2 into distributed-system-analysis:main Apr 20, 2023
@dbutenhof dbutenhof deleted the test branch April 20, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent unit test failure: it'd be great to figure out why and fix it...
3 participants