-
Notifications
You must be signed in to change notification settings - Fork 206
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
[BUG] Flaky test in DataFileLoaderTest #3470
Comments
@daixba , Could you take a look at this flaky test? |
Sure, I will work on this. I have seen this before, it's strange that it does not fail all the time and I can't reproduce this failure in my local. My best guess is that there is no enough 'time' before the 'expected invoke' to happen due in the github ci instance. |
Recently failing test running on Java 11:
|
The Flaky issue (DataFileLoaderTest.java:222) regarding flush() wanted but not invoked is because there was
in the test code to generate random number of test records. However, I just noticed that the 0 is inclusive for nextInt() method, hence, there is a small chance that the total records is 0. In which case, the flush() was not invoked. I have run the test again and again and confirm that only when total == 0, the test failed. I was trying to fix this issue by adding at least 1 to the total count. However, this test was already modified. Let's see if this issue still exists. |
Yes, roughly 1 out of 10 times that condition should occur, so I think that is likely the fix. For the future, would be nice to have had a separate PR so that such a nice fix is not blocked by other PR comments. |
Resolved by #3592. |
Describe the bug
Example failure:
https://github.com/opensearch-project/data-prepper/actions/runs/6470850267/job/17567944366?pr=3469
To Reproduce
This is flaky, so this might require some investigation.
Expected behavior
This test should consistently pass.
The text was updated successfully, but these errors were encountered: