eubnara commented on code in PR #8691:
URL: https://github.com/apache/hadoop/pull/8691#discussion_r4663322357


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestResourceLocalizationService.java:
##########
@@ -818,6 +822,76 @@ public void testLocalizerRunnerException() throws 
Exception {
     }
   }
 
+  @Test
+  @Timeout(value = 10)
+  @SuppressWarnings("unchecked") // mocked generics
+  public void testDownloadingResourcesCleanedUpWhenDispatchFails()
+      throws Exception {
+    Dispatcher dispatcher = mock(Dispatcher.class);

Review Comment:
   Done. The test now uses a real DrainDispatcher with the flag set before
   run(), and the extra imports and @SuppressWarnings are gone. Note that
   rls.init(conf) is called because the cleanup now synchronizes on
   localizerTracker.privLocalizers, which is created in serviceInit; with
   the mocked LocalDirsHandlerService no directories are created.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to