adoroszlai commented on a change in pull request #1697:
URL: https://github.com/apache/ozone/pull/1697#discussion_r542267852



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/TestHelper.java
##########
@@ -234,12 +235,14 @@ public static void waitForPipelineClose(List<Pipeline> 
pipelineList,
 
     // wait for the pipeline to get destroyed in the datanodes
     for (Pipeline pipeline : pipelineList) {
+      HddsProtos.PipelineID pipelineId = pipeline.getId().getProtobuf();
       for (DatanodeDetails dn : pipeline.getNodes()) {
         XceiverServerSpi server =
             cluster.getHddsDatanodes().get(cluster.getHddsDatanodeIndex(dn))
                 .getDatanodeStateMachine().getContainer().getWriteChannel();
         Assert.assertTrue(server instanceof XceiverServerRatis);
-        server.removeGroup(pipeline.getId().getProtobuf());
+        GenericTestUtils.waitFor(() -> !server.isExist(pipelineId),
+            100, 30_000);

Review comment:
       Thanks @ayushtkn for taking a look.
   
   I'd rather avoid such "manual intervention" and let the test exercise 
production code paths.
   
   I don't think keeping `removeGroup` would result in much speedup.  If SCM 
and datanodes take too much time to execute regular flow, we could probably 
tweak executor intervals, etc.
   
   It might be possible to convert it to a unit test with mocks, resulting in 
much bigger speedup by avoiding the mini cluster.




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

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