This is an automated email from the ASF dual-hosted git repository.
adoroszlai 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 67ff40f91e HDDS-6115. Intermittent failure in
TestContainerStateMachineFailures#testApplyTransactionIdempotencyWithClosedContainer
(#5482)
67ff40f91e is described below
commit 67ff40f91e878fc457bb29e207b3d47412e51ca8
Author: Raju Balpande <[email protected]>
AuthorDate: Thu Oct 26 20:35:51 2023 +0530
HDDS-6115. Intermittent failure in
TestContainerStateMachineFailures#testApplyTransactionIdempotencyWithClosedContainer
(#5482)
---
.../client/rpc/TestContainerStateMachineFailures.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java
index 42c16fb807..834669bfcd 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java
@@ -74,6 +74,7 @@ import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo;
import org.apache.hadoop.ozone.protocol.commands.CloseContainerCommand;
import org.apache.hadoop.ozone.protocol.commands.SCMCommand;
+import org.apache.ozone.test.GenericTestUtils;
import org.apache.ozone.test.LambdaTestUtils;
import org.apache.ozone.test.tag.Flaky;
@@ -518,6 +519,8 @@ public class TestContainerStateMachineFailures {
stateMachine.takeSnapshot();
Assert.assertTrue(parentPath.getParent().toFile().listFiles().length > 0);
Assert.assertNotNull(snapshot);
+ long markIndex1 = StatemachineImplTestUtil.findLatestSnapshot(storage)
+ .getIndex();
long containerID = omKeyLocationInfo.getContainerID();
Pipeline pipeline = cluster.getStorageContainerLocationClient()
.getContainerWithPipeline(containerID).getPipeline();
@@ -549,6 +552,18 @@ public class TestContainerStateMachineFailures {
} finally {
xceiverClientManager.releaseClient(xceiverClient, false);
}
+ // This is just an attempt to wait for an asynchronous call from Ratis API
+ // to updateIncreasingly to finish as part of flaky test issue "HDDS-6115"
+ // This doesn't solve the problem completely but reduce the failure ratio.
+ GenericTestUtils.waitFor((() -> {
+ try {
+ return markIndex1 != StatemachineImplTestUtil
+ .findLatestSnapshot(storage).getIndex();
+ } catch (IOException e) {
+ // No action needed. The test case is going to fail at assertion.
+ return true;
+ }
+ }), 1000, 30000);
final FileInfo latestSnapshot = getSnapshotFileInfo(storage);
Assert.assertFalse(snapshot.getPath().equals(latestSnapshot.getPath()));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]