You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rithin-pullela-aws
changed the title
[BUG] [Flaky Test] PredictionITTests.testPredictionWithDataFrame_BatchRCF is falky
[BUG] [Flaky Test] PredictionITTests are being flaky
Feb 14, 2025
My experimentation and Findings:
From the log it can be seen that there is a race condition:
java.util.ConcurrentModificationException
...
at org.opensearch.common.logging.Loggers.removeAppender(Loggers.java:176)
at org.opensearch.test.OpenSearchTestCase.removeHeaderWarningAppender(OpenSearchTestCase.java:411)
...
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.
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: