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

tests: make provisioner test deterministic #770

Merged

Conversation

chesedo
Copy link
Contributor

@chesedo chesedo commented Mar 29, 2023

Description of change

When the mongo tests ran, the server would restart as part of its startup process. So just give it some time to start up correctly.

How Has This Been Tested (if applicable)?

By running the tests locally

Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

Comment on lines +54 to +57
// Mongo starts up twice. So wait for the first one to finish
sleep(Duration::from_millis(350));
Self::wait_ready(Duration::from_secs(120), &is_ready_cmd);

Copy link
Contributor

Choose a reason for hiding this comment

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

If it only starts twice for mongo, should check the db type before this second wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can. For both DBs this will only run once for all the tests. So I'm not sure if the extra complexity (if statement) is worth it 🤷‍♂️

@chesedo chesedo merged commit ba241c5 into shuttle-hq:main Mar 30, 2023
@chesedo chesedo deleted the feature/eng-511-fix-the-provisioner-ci-failure branch March 30, 2023 13:09
oddgrd pushed a commit to oddgrd/shuttle that referenced this pull request Mar 31, 2023
* tests: make test deterministic

* tests: make test deterministic 2
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