Repository navigation
[itests] Fix flaky LogTest - #3006
Merged
Merged
Conversation
log:set updates the pax-logging configuration asynchronously, so reading it right after can fail with 'Unrecognized configuration' or return the previous level. Wait for the new level to be applied instead of failing right away. log:list and ld are aliases, not command services: don't wait 30 seconds for a service that is never registered on each call.
jbonofre
added a commit
that referenced
this pull request
Oct 16, 2026
log:set updates the pax-logging configuration asynchronously, so reading it right after can fail with 'Unrecognized configuration' or return the previous level. Wait for the new level to be applied instead of failing right away. log:list and ld are aliases, not command services: don't wait 30 seconds for a service that is never registered on each call. (cherry picked from commit fd965a1)
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.
Problem
LogTestfails randomly withIllegalStateException: Unrecognized configuration(e.g. in the CI run of #2999,setGetDebugAndClearandsetGetDebugAndClearAlias).log:setends withcfg.update(), which ConfigAdmin and pax-logging apply asynchronously.assertSetLevelranlog:getright afterlog:set, so it could read the logging configuration while pax-logging was reconfiguring, or still see the previous level. TheThread.sleep(100)was at the end of the helper, too late to help, and the test retry rule hit the same failure again.Also,
log:listandldare aliases defined inshell.init.script, not command services.executeAliaswaited the full 30 seconds (ALIAS_SERVICE_TIMEOUT) for a service that is never registered, on every call. The class took about 127 seconds in that CI run, which also widened the race window.Changes
assertSetLevelpollslog:getandlog:list(up to 30 seconds) until the new level is visible, treating the transient exception as "not applied yet".log:list,ld) no longer wait for a command service.Only
LogTestis changed;LogServiceImplis untouched.Testing
itests/testcompiles. I did not runLogTestlocally.