Skip to content

fix(itests): fix flaky SystemShutdownTest by using delayed shutdown#2324

Merged
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/flaky-system-shutdown-test
Mar 14, 2026
Merged

fix(itests): fix flaky SystemShutdownTest by using delayed shutdown#2324
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/flaky-system-shutdown-test

Conversation

@jbonofre
Copy link
Member

The test was intermittently failing with NoSuchObject/Connection refused RMI errors because the async shutdown thread could kill the OSGi framework before PaxExam received the RMI response from the test method.

Use a delayed shutdown (+1 minute) instead of immediate so the command is validated without actually halting the framework during the test. PaxExam's container teardown cleanly terminates the process before the timer fires.

Also increase ALIAS_SERVICE_TIMEOUT from 1ms to 30s so alias-based tests don't fail on loaded CI machines where command service registration takes longer.

The test was intermittently failing with NoSuchObject/Connection refused
RMI errors because the async shutdown thread could kill the OSGi
framework before PaxExam received the RMI response from the test method.

Use a delayed shutdown (+1 minute) instead of immediate so the command
is validated without actually halting the framework during the test.
PaxExam's container teardown cleanly terminates the process before the
timer fires.

Also increase ALIAS_SERVICE_TIMEOUT from 1ms to 30s so alias-based
tests don't fail on loaded CI machines where command service
registration takes longer.
@jbonofre jbonofre merged commit 08dc0a0 into apache:main Mar 14, 2026
2 checks passed
@jbonofre jbonofre deleted the fix/flaky-system-shutdown-test branch March 14, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant