You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by xy...@apache.org on 2018/08/15 15:11:28 UTC
hadoop git commit: HDDS-347.
TestCloseContainerByPipeline#testCloseContainerViaStandaAlone sometimes
fails. Contributed by Lixin Ge.
Repository: hadoop
Updated Branches:
refs/heads/trunk 8dc07b472 -> f2315f2e9
HDDS-347. TestCloseContainerByPipeline#testCloseContainerViaStandaAlone sometimes fails. Contributed by Lixin Ge.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f2315f2e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f2315f2e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f2315f2e
Branch: refs/heads/trunk
Commit: f2315f2e9c31879b8c30eb9028f1959dfe48e5f4
Parents: 8dc07b4
Author: Xiaoyu Yao <xy...@apache.org>
Authored: Wed Aug 15 08:10:08 2018 -0700
Committer: Xiaoyu Yao <xy...@apache.org>
Committed: Wed Aug 15 08:11:17 2018 -0700
----------------------------------------------------------------------
.../commandhandler/TestCloseContainerByPipeline.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/f2315f2e/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerByPipeline.java
----------------------------------------------------------------------
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerByPipeline.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerByPipeline.java
index 866bc32..f40e425 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerByPipeline.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerByPipeline.java
@@ -182,9 +182,11 @@ public class TestCloseContainerByPipeline {
new CloseContainerCommand(containerID,
HddsProtos.ReplicationType.STAND_ALONE, pipeline.getId()));
- GenericTestUtils
- .waitFor(() -> isContainerClosed(cluster, containerID, datanodeDetails),
- 500, 5 * 1000);
+ // The log will appear after the state changed to closed in standalone,
+ // wait for the log to ensure the operation has been done.
+ GenericTestUtils.waitFor(() -> logCapturer.getOutput().contains(
+ "submitting CloseContainer request over STAND_ALONE server for"
+ + " container " + containerID), 500, 5 * 1000);
//double check if it's really closed (waitFor also throws an exception)
Assert.assertTrue(isContainerClosed(cluster, containerID, datanodeDetails));
@@ -260,7 +262,7 @@ public class TestCloseContainerByPipeline {
containerData =
datanodeService.getDatanodeStateMachine().getContainer()
.getContainerSet().getContainer(containerID).getContainerData();
- return !containerData.isOpen();
+ return containerData.isClosed();
}
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org