Reduce flakiness in WildflyTest.testWildflyMetrics(String)#18521
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, duplicate |
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
WildflyTestwaited only for port 8080 to become available before starting metric verification. Local container logs show WildFly can open the Undertow listener beforetestapp.waris deployed and before the server emitsWFLYSRV0025, while several asserted JMX metrics depend on the deployed web application and fully initialized WildFly subsystems. On slower or more loaded CI workers, that readiness gap can leave the JMX metric registration/export cycle racing the application deployment.Fix
WFLYSRV0025server-started log message.Why this addresses the root cause
The
WFLYSRV0025line is emitted after WildFly has deployedtestapp.war, resumed the server, and completed startup, which is the state the metric assertions require. Waiting for this application-level readiness signal removes the race where verification starts while deployment-specific MBeans are still appearing, without relaxing or deleting any metric coverage.Risks / follow-ups
Review the diagnosis and the diff carefully before merging - automated fixes can mask flakiness instead of addressing the root cause.