You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/12/14 10:18:27 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #1697: HDDS-4013. FLAKY-UT: TestWatchForCommit#testWatchForCommitForGroupMismatchException

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org