diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/TestServiceAM.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/TestServiceAM.java index fa96642affe..c9886584bf2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/TestServiceAM.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/TestServiceAM.java @@ -480,9 +480,17 @@ public void testIPChange() throws TimeoutException, am.stop(); } - // Test to verify that the containers are released and the - // component instance is added to the pending queue when building the launch - // context fails. + /** + This test verifies that the containers are released and the + component instance is added to the pending queue when building the launch + context fails. + Here, we intentionally have an artifact that doesn't have an id. + This will cause TarballProviderService.processArtifact + to throw an IllegalArgumentException because the Path object is + constructed from the id of the artifact. + In case the id is set to null or unset so it is effectively null, + Path.checkPathArg throws an IllegalArgumentException. + **/ @Test(timeout = 30000) public void testContainersReleasedWhenPreLaunchFails() throws Exception {