slfan1989 commented on code in PR #4463:
URL: https://github.com/apache/hadoop/pull/4463#discussion_r979422667


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainersLauncher.java:
##########
@@ -190,15 +184,16 @@ public void testRecoverPausedContainerEvent()
   public void testCleanupContainerEvent()
       throws IllegalArgumentException, IllegalAccessException, IOException {
     Map<ContainerId, ContainerLaunch> dummyMap = Collections
-        .synchronizedMap(new HashMap<ContainerId, ContainerLaunch>());
+        .synchronizedMap(new HashMap<>());
     dummyMap.put(containerId, containerLaunch);
-    Whitebox.setInternalState(spy, "running", dummyMap);
+    spy.running.clear();
+    spy.running.putAll(dummyMap);

Review Comment:
   I will modify the code.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainersLauncher.java:
##########
@@ -207,9 +202,10 @@ public void testCleanupContainerEvent()
   public void testCleanupContainerForReINITEvent()
       throws IllegalArgumentException, IllegalAccessException, IOException {
     Map<ContainerId, ContainerLaunch> dummyMap = Collections
-        .synchronizedMap(new HashMap<ContainerId, ContainerLaunch>());
+        .synchronizedMap(new HashMap<>());
     dummyMap.put(containerId, containerLaunch);
-    Whitebox.setInternalState(spy, "running", dummyMap);
+    spy.running.clear();
+    spy.running.putAll(dummyMap);

Review Comment:
   I will modify the code.



-- 
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