ayushtkn commented on a change in pull request #1697:
URL: https://github.com/apache/ozone/pull/1697#discussion_r542110687
##########
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:
Thanx @adoroszlai for the fix, I am able to repro this, changes seems
fair enough.
Does it makes sense to `removeGroup` explicitly in case
`server.isExist(pipelineId)` is true, rather than waiting? Might speed up test?
We can ignore the exception from `removeGroup` in the wait and retry to counter
the race condition
----------------------------------------------------------------
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]