You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
JIRA: YARN-11876. Fix AsyncDispatcher crash in TestAppManager.
After upgrading to JUnit 5, the ResourceManager module encounters a crash when running unit tests. Specifically, the failure occurs in the test case TestAppManager#testRMAppSubmitWithQueueChanged.
During application submission, the test changes the queue assignment, which triggers a SchedulerEvent that the AsyncDispatcher cannot handle.
As a result, the dispatcher thread throws an exception and terminates, causing the test JVM to exit abnormally with a SurefireBooterForkException.
Error Details
2025-10-08 07:56:46,833 ERROR [AsyncDispatcher event handler] event.AsyncDispatcher (MarkerIgnoringBase.java:error(159)) - Error in dispatcher thread
java.lang.Exception: No handler registered for class org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.SchedulerEventType
at org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:277)
at org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:162)
at java.lang.Thread.run(Thread.java:750)
This leads to Maven Surefire reporting a forked VM crash:
org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Process Exit Code: 255
Crashed tests: org.apache.hadoop.yarn.server.resourcemanager.TestAppManager
How was this patch tested?
CI.
For code changes:
Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?
This PR fixes an issue that caused the YARN ResourceManager to crash during JUnit tests.
Instead of calling System.exit(-1) on failure, the process now continues safely, ensuring that all assertions are still executed.
This change does not affect the correctness of existing assertions and improves test robustness.
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.
Description of PR
JIRA: YARN-11876. Fix AsyncDispatcher crash in TestAppManager.
After upgrading to
JUnit 5, theResourceManagermodule encounters a crash when running unit tests. Specifically, the failure occurs in the test caseTestAppManager#testRMAppSubmitWithQueueChanged.During application submission, the test changes the queue assignment, which triggers a
SchedulerEventthat the AsyncDispatcher cannot handle.As a result, the dispatcher thread throws an exception and terminates, causing the test JVM to exit abnormally with a
SurefireBooterForkException.This leads to Maven Surefire reporting a forked VM crash:
How was this patch tested?
CI.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?