Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuheng55555 committed Jan 22, 2025
1 parent 765cbb2 commit 14963be
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void normal1C3DTest() throws Exception {
.getCommonConfig()
.setDataRegionConsensusProtocolClass(ConsensusFactory.IOT_CONSENSUS)
.setSchemaRegionConsensusProtocolClass(ConsensusFactory.RATIS_CONSENSUS)
.setDataReplicationFactor(2)
.setDataReplicationFactor(2) // 对方
.setSchemaReplicationFactor(3);

EnvFactory.getEnv().initClusterEnvironment(1, 3);
Expand Down Expand Up @@ -122,13 +122,21 @@ public void normal1C3DTest() throws Exception {
EnvFactory.getAbstractEnv().checkNodeInStatus(dataNodeToBeClosed, NodeStatus.Running);
session.executeNonQueryStatement(
String.format(RECONSTRUCT_FORMAT, selectedRegion, dataNodeToBeReconstructed));
Awaitility.await()
.pollInterval(1, TimeUnit.SECONDS)
.atMost(1, TimeUnit.MINUTES)
.until(
() ->
getRegionStatusWithoutRunning(session).isEmpty()
&& dataDirToBeReconstructed.exists());
try {
Awaitility.await()
.pollInterval(1, TimeUnit.SECONDS)
.atMost(1, TimeUnit.MINUTES)
.until(
() ->
getRegionStatusWithoutRunning(session).isEmpty()
&& dataDirToBeReconstructed.getAbsoluteFile().exists());
} catch (Exception e) {
LOGGER.error(
"Two factor: {} && {}",
getRegionStatusWithoutRunning(session).isEmpty(),
dataDirToBeReconstructed.getAbsoluteFile().exists());
Assert.fail();
}
EnvFactory.getEnv().dataNodeIdToWrapper(dataNodeToBeClosed).get().stopForcibly();

// now, the query should work fine
Expand Down

0 comments on commit 14963be

Please sign in to comment.