slfan1989 commented on code in PR #7008:
URL: https://github.com/apache/ozone/pull/7008#discussion_r1857966157


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/safemode/TestSCMSafeModeManager.java:
##########
@@ -571,10 +701,18 @@ public void testSafeModePipelineExitRule() throws 
Exception {
           config, containers, null, pipelineManager, queue, serviceManager,
           scmContext);
 
-      queue.fireEvent(SCMEvents.NODE_REGISTRATION_CONT_REPORT,
-          HddsTestUtils.createNodeRegistrationContainerReport(containers));
+      SCMDatanodeProtocolServer.NodeRegistrationContainerReport 
nodeRegistrationContainerReport =
+          HddsTestUtils.createNodeRegistrationContainerReport(containers);
+      queue.fireEvent(SCMEvents.CONTAINER_REGISTRATION_REPORT, 
nodeRegistrationContainerReport);
+
       assertTrue(scmSafeModeManager.getInSafeMode());
 
+      for (DatanodeDetails datanodeDetail : pipeline.getNodes()) {
+        SCMDatanodeProtocolServer.NodeRegistrationContainerReport 
nodeRegistrationReport =
+            new 
SCMDatanodeProtocolServer.NodeRegistrationContainerReport(datanodeDetail, null);
+        queue.fireEvent(SCMEvents.NODE_REGISTRATION_CONT_REPORT, 
nodeRegistrationReport);
+      }
+

Review Comment:
   I have improved this part of the logic.



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