Browse Source

YARN-10849 Clarify testcase documentation for TestServiceAM#testContainersReleasedWhenPreLaunchFails. Contributed by Szilard Nemeth

Gergely Pollak 3 years ago
parent
commit
44bab51be4

+ 11 - 3
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 class TestServiceAM extends ServiceTestUtils{
     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 {