From 310d9ba2d9c473186970e2f4eb1143533661ae94 Mon Sep 17 00:00:00 2001 From: Shashikant Banerjee Date: Fri, 13 Mar 2020 14:34:38 +0530 Subject: [PATCH] HDDS-3154. Intermittent failure in Test2WayCommitInRatis. --- .../hadoop/ozone/client/rpc/Test2WayCommitInRatis.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/Test2WayCommitInRatis.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/Test2WayCommitInRatis.java index 3b7eaa9f2419..c60b7308cca0 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/Test2WayCommitInRatis.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/Test2WayCommitInRatis.java @@ -96,7 +96,7 @@ private void startCluster(OzoneConfiguration conf) throws Exception { RatisHelper.HDDS_DATANODE_RATIS_SERVER_PREFIX_KEY + "." + DatanodeRatisServerConfig. RATIS_SERVER_WATCH_REQUEST_TIMEOUT_KEY, - 3, TimeUnit.SECONDS); + 10, TimeUnit.SECONDS); conf.setTimeDuration( RatisHelper.HDDS_DATANODE_RATIS_CLIENT_PREFIX_KEY+ "." + "rpc.request.timeout", @@ -104,12 +104,11 @@ private void startCluster(OzoneConfiguration conf) throws Exception { conf.setTimeDuration( RatisHelper.HDDS_DATANODE_RATIS_CLIENT_PREFIX_KEY+ "." + "watch.request.timeout", - 3, TimeUnit.SECONDS); + 10, TimeUnit.SECONDS); conf.setQuietMode(false); cluster = MiniOzoneCluster.newBuilder(conf) .setNumDatanodes(3) - .setTotalPipelineNumLimit(1) .setBlockSize(blockSize) .setChunkSize(chunkSize) .setStreamBufferFlushSize(flushSize) @@ -117,8 +116,7 @@ private void startCluster(OzoneConfiguration conf) throws Exception { .setStreamBufferSizeUnit(StorageUnit.BYTES) .build(); cluster.waitForClusterToBeReady(); - cluster.waitTobeOutOfSafeMode(); - //the easiest way to create an open container is creating a key + // the easiest way to create an open container is creating a key client = OzoneClientFactory.getRpcClient(conf); objectStore = client.getObjectStore(); volumeName = "watchforcommithandlingtest"; @@ -165,6 +163,8 @@ public void test2WayCommitForRetryfailure() throws Exception { xceiverClient.getPipeline())); reply.getResponse().get(); Assert.assertEquals(3, ratisClient.getCommitInfoMap().size()); + // wait for the container to be created on all the nodes + xceiverClient.watchForCommit(reply.getLogIndex()); for (HddsDatanodeService dn : cluster.getHddsDatanodes()) { // shutdown the ratis follower if (ContainerTestHelper.isRatisFollower(dn, pipeline)) {