-
Notifications
You must be signed in to change notification settings - Fork 19
Fix/flaky test #387
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/flaky test #387
Conversation
|
@andrejridzik Did this test fail consistently for you? Or at least consistently enough that you will have a good indication of whether or not things would be fixed. I cannot reproduce it at all and it now also not failing in CI... which leaves me at a loss. If you can reproduce it consistently, I would appreciate it if you could try and see if the test also fails for you on this branch. edit: reproduced on CI now. Though not consistently which may make it hard to track down. Either way at least I know it's still present. |
34f2f55 to
1073726
Compare
andrejridzik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still getting majority of failures with this setup. However, I was able to achieve 0% failure rate (n=100) when these two conditions are met:
- sleep duration set to
10**-1 - sleep moved to other location -> after
file1.unlink()
Note: I got failure rate 11% when setting the sleep to 10**-2
| os.makedirs(backup_dir) | ||
| create_test_files(original_dir, ["file1.txt", "file2.txt"]) | ||
| backup() | ||
| file1.unlink() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some experiments and got most reliable results when adding the sleep after this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... Perhaps we'll need both. I'll move the sleep to where you suggested it and see if that's good enough for CI too (because clearly behavior of CI/CD doesn't match your environment 1:1)
1073726 to
3e44254
Compare
|
Needed both sleeps. I think should be good to go now @andrejridzik ? |
Change
Working on #378. No changes so far, other than refactoring and using
Path.write_textinstead ofio.write.Setting up PR to test flakiness in CI, as I can't reproduce failures locally.
How to Test
Checklist
Related Issues