jbonofre opened a new pull request, #3006: URL: https://github.com/apache/karaf/pull/3006
## Problem `LogTest` fails randomly with `IllegalStateException: Unrecognized configuration` (e.g. in the CI run of #2999, `setGetDebugAndClear` and `setGetDebugAndClearAlias`). `log:set` ends with `cfg.update()`, which ConfigAdmin and pax-logging apply asynchronously. `assertSetLevel` ran `log:get` right after `log:set`, so it could read the logging configuration while pax-logging was reconfiguring, or still see the previous level. The `Thread.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:list` and `ld` are aliases defined in `shell.init.script`, not command services. `executeAlias` waited 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 - `assertSetLevel` polls `log:get` and `log:list` (up to 30 seconds) until the new level is visible, treating the transient exception as "not applied yet". - Alias calls (`log:list`, `ld`) no longer wait for a command service. Only `LogTest` is changed; `LogServiceImpl` is untouched. ## Testing `itests/test` compiles. I did not run `LogTest` locally. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
