Skip to content

test(cluster): avoid uncaught system exit exceptions - #821

Merged
Leomrlin merged 1 commit into
apache:masterfrom
johntomcat7408-cmyk:fix/701-system-exit-test-logs
Aug 3, 2026
Merged

test(cluster): avoid uncaught system exit exceptions#821
Leomrlin merged 1 commit into
apache:masterfrom
johntomcat7408-cmyk:fix/701-system-exit-test-logs

Conversation

@johntomcat7408-cmyk

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

SystemExitSignalCatcher intercepted System.exit() by throwing an exception. The expected exception escaped the executor thread and appeared as an uncaught error in CI logs.

This change makes the process exit action in ComponentExceptionSupervisor replaceable in tests. The cluster exception tests now capture and assert the exit code without installing a SecurityManager, and SystemExitSignalCatcher is removed. Production behavior is unchanged: the default action still calls System.exit(EXIT_CODE).

Related to #701.

How was this PR tested?

  • Tests have Added for the changes

  • Production environment verified

  • JDK 11: ContainerTest and ComponentUncaughtExceptionHandlerTest

  • Oracle JDK 8u441 on CentOS 7: the same tests

  • Maven Checkstyle and Apache RAT for geaflow-cluster

@johntomcat7408-cmyk

Copy link
Copy Markdown
Contributor Author

The JDK 8 and JDK 11 workflows are waiting for approval. Could a maintainer approve them when convenient?

@Leomrlin Leomrlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Leomrlin
Leomrlin merged commit 6b79587 into apache:master Aug 3, 2026
2 checks passed
@johntomcat7408-cmyk
johntomcat7408-cmyk deleted the fix/701-system-exit-test-logs branch August 3, 2026 14:50
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.

2 participants