Reduce flakiness in io.opentelemetry.instrumentation.lettuce.v5_1.LettuceSyncClientAuthTest.testAuthCommand()#18497
Closed
trask wants to merge 1 commit into
Conversation
…tuceSyncClientAuthTest.testAuthCommand() Automated fix attempt based on Develocity flaky-test analysis.
Member
Author
|
these library tests should get fixed by #18492 (which was targeting the javaagent tests) |
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.lettuce.v5_1.LettuceSyncClientAuthTest.testAuthCommand().instrumentation/lettuce/lettuce-5.1/library/src/test/java/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceSyncClientAuthTest.javaRecent failed/flaky scans
:instrumentation:lettuce:lettuce-5.1:library:test):instrumentation:lettuce:lettuce-5.1:library:testStableSemconv):instrumentation:lettuce:lettuce-5.1:library:testStableSemconv):instrumentation:lettuce:lettuce-5.1:library:test):instrumentation:lettuce:lettuce-5.1:library:test)Flake history (per UTC day)
Sample failure (from Develocity)
Copilot diagnosis
Root cause
The auth fixture was mutating the inherited static Redis container by adding
--requirepassand then starting it. If another lettuce 5.1 test class had already started that shared container without a password in the same JVM, the later command mutation did not reconfigure the running Redis process, soAUTH passwordfailed with "called without any password configured". I opened two supplied Develocity scan URLs (bqvb4f5tv7dm2andefwa2zriqqnn2); both scan pages were reachable but JS-rendered, and the captured failure lines supplied for both show the same RedisAUTHerror.Fix
newRedisServer()helper for constructing Redis test containers with the existing image, port, logging, and readiness settings.redisServerfinal so tests do not mutate its command configuration.redis-server,--requirepass,password.Why this addresses the root cause
The auth test no longer depends on whether the inherited default container has already been started by another lettuce test class. Its Redis process is created with authentication configured before startup, so the
AUTH passwordcommand exercises the intended authenticated-server path deterministically.Risks / follow-ups
Review the diagnosis and the diff carefully before merging - automated fixes can mask flakiness instead of addressing the root cause.