Reduce flakiness in WildflyTest.testWildflyMetrics(String)#18523
Closed
trask wants to merge 1 commit into
Conversation
…yTest.testWildflyMetrics(String)[2] Automated fix attempt based on Develocity flaky-test analysis.
Member
Author
|
Closing as a duplicate automated flaky-remediation PR. WildflyTest is now recorded as a class-level skip in otelbot/flaky-test-remediation-progress. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated attempt at fixing flakiness in
io.opentelemetry.instrumentation.jmx.rules.WildflyTest.testWildflyMetrics(String)[2].instrumentation/jmx-metrics/library/src/test/java/io/opentelemetry/instrumentation/jmx/rules/WildflyTest.javaFlake history (per UTC day)
Sample failure (from Develocity)
Copilot diagnosis
Root cause
The WildFly JMX test used
Wait.forListeningPorts(8080), which can mark the container as ready as soon as the socket is open. WildFly can open the HTTP port before server startup, deployment processing, and JMX metric MBean registration have fully completed. On slower CI runs, the test could then spend its 60-second metric polling window observing incomplete JMX data and time out without a more specific failure message.Fix
WildflyTestto wait for WildFly'sWFLYSRV0025: ... started in ...startup log message.Why this addresses the root cause
Waiting for WildFly's server-started log line aligns Testcontainers readiness with the app server lifecycle event that follows deployment and service initialization, rather than with the earlier TCP bind. This gives the existing Awaitility-based metric verifier a stable starting point while preserving the original metric coverage.
Risks / follow-ups
jboss/wildfly:10.1.0.Finalimage and the maintained WildFly image when those images are refreshed.Review the diagnosis and the diff carefully before merging - automated fixes can mask flakiness instead of addressing the root cause.