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 test flakiness #1351

Merged
merged 4 commits into from
Nov 25, 2024
Merged

Fix test flakiness #1351

merged 4 commits into from
Nov 25, 2024

Conversation

MichaelChirico
Copy link
Contributor

@MichaelChirico MichaelChirico commented Oct 2, 2023

Closes #1350

Alternatively, we can use a set.seed(), but keeping this test random does make it slightly more interesting.

I also tried with n=150, it fails ~0.05% of the time. I didn't notice a speed difference on n=150/n=200, so I stuck with the safer n=200.

@MichaelChirico
Copy link
Contributor Author

Another option is to deterministically ensure 1:15 are present, e.g. instead of sample.int(15, 100, TRUE), we do c(1:15, sample.int(15, 85, TRUE)).

@topepo
Copy link
Owner

topepo commented Nov 25, 2024

"More interesting" 😄 I set the seed just to keep things more consistent.

Thanks for doing this.

@topepo topepo merged commit 0aadaf2 into topepo:master Nov 25, 2024
7 checks passed
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.

Flaky test on dummyVars
2 participants