This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d8b9550a2c [RatisConsensus] Fix ReadRecoverTest CI failure (#11616)
2d8b9550a2c is described below

commit 2d8b9550a2c016fc741e38db526c25f0ed5079fe
Author: William Song <[email protected]>
AuthorDate: Tue Nov 28 14:48:37 2023 +0800

    [RatisConsensus] Fix ReadRecoverTest CI failure (#11616)
---
 .../java/org/apache/iotdb/consensus/ratis/RecoverReadTest.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/consensus/src/test/java/org/apache/iotdb/consensus/ratis/RecoverReadTest.java
 
b/iotdb-core/consensus/src/test/java/org/apache/iotdb/consensus/ratis/RecoverReadTest.java
index 68df45a74a8..83e44d27850 100644
--- 
a/iotdb-core/consensus/src/test/java/org/apache/iotdb/consensus/ratis/RecoverReadTest.java
+++ 
b/iotdb-core/consensus/src/test/java/org/apache/iotdb/consensus/ratis/RecoverReadTest.java
@@ -103,6 +103,11 @@ public class RecoverReadTest {
                             
.setFirstElectionTimeoutMax(TimeDuration.valueOf(2, TimeUnit.SECONDS))
                             .setRequestTimeout(TimeDuration.valueOf(20, 
TimeUnit.SECONDS))
                             .build())
+                    .setImpl(
+                        RatisConfig.Impl.newBuilder()
+                            .setRetryTimesMax(1)
+                            .setRetryWaitMillis(500)
+                            .build())
                     .build())
             .create();
     miniCluster.start();
@@ -198,7 +203,8 @@ public class RecoverReadTest {
     // restart the cluster
     miniCluster.restart();
 
-    Assert.assertEquals(10, miniCluster.mustRead(0));
+    // query during redo: get exception that ratis is under recovery
+    Assert.assertThrows(RatisReadUnavailableException.class, () -> 
miniCluster.readThrough(0));
   }
 
   @Test

Reply via email to