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 14e0611fdd5 HDDS-17052. Speed up
TestContainerStateMachineFailureOnRead (#11555)
14e0611fdd5 is described below
commit 14e0611fdd5c3a036ec3baa0fcadf89a6a52dc2d
Author: Shuo Huang <[email protected]>
AuthorDate: Fri Oct 16 18:23:58 2026 +0800
HDDS-17052. Speed up TestContainerStateMachineFailureOnRead (#11555)
---
.../rpc/TestContainerStateMachineFailureOnRead.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailureOnRead.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailureOnRead.java
index 48e5ef6d086..63fa06df861 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailureOnRead.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailureOnRead.java
@@ -58,6 +58,7 @@
import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
+import org.apache.ozone.test.GenericTestUtils;
import org.apache.ratis.grpc.server.GrpcLogAppender;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -204,15 +205,14 @@ public void testReadStateMachineFailureClosesPipeline()
throws Exception {
// stale interval timeout for the test
cluster.restartHddsDatanode(dnToStop.get().getDatanodeDetails(), false);
cluster.waitForClusterToBeReady();
- Thread.sleep(10000);
-
- try {
- Pipeline pipeline = cluster.getStorageContainerManager()
- .getPipelineManager().getPipeline(pipelines.get(0).getId());
- assertEquals(Pipeline.PipelineState.CLOSED, pipeline.getPipelineState(),
- "Pipeline " + pipeline.getId() + "should be in CLOSED state");
- } catch (PipelineNotFoundException e) {
- // Do nothing.
- }
+ GenericTestUtils.waitFor(() -> {
+ try {
+ return cluster.getStorageContainerManager().getPipelineManager()
+ .getPipeline(pipelines.get(0).getId()).getPipelineState()
+ == Pipeline.PipelineState.CLOSED;
+ } catch (PipelineNotFoundException e) {
+ return true;
+ }
+ }, 100, 10000);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]