-
Notifications
You must be signed in to change notification settings - Fork 149
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] PredictionITTests are being flaky #3550
Comments
My experimentation and Findings:
I reproduced this locally by running:
Many of the tests in PredictionITTests.java failed intermittently with the same stack trace. The key point is that OpenSearchTestCase.removeHeaderWarningAppender()—an @after method—throws a ConcurrentModificationException because multiple threads are concurrently touching a non‐concurrent data structure in Log4j. Even when I run a single test case (i.e., no parallel test classes), this is still failing flakily, indicating some internal thread is modifying the logger registry at the same time causing the ConcurrentModificationException. Because this happens in the teardown method, JUnit sees it as a test failure even though the main test logic has already passed. Potential solution: Adding retry |
Retrying could temporarily reduce failures, but it doesn't guarantee a fix—there's always a chance of failure if threads are modifying the logger at just the wrong moment. Have you considered any other approaches? |
Can you check what other plugins or core do that in this case? Do we need to override this method in our end? |
We cannot override methods annotated with @ After in open search. |
What is the bug?
I observed this test showing flaky behavior, find the workflow here
StackTrace:
How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: