Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.env.cluster.node.DataNodeWrapper;
import org.apache.iotdb.itbase.exception.InconsistentDataException;

import org.awaitility.Awaitility;
import org.junit.Assert;
Expand Down Expand Up @@ -67,8 +68,10 @@ static void awaitModsVisibleOnReplicas(

static void awaitRegionReplicas(
Statement statement, int dataRegionId, Set<Integer> expectedReplicaDataNodeIds) {
// Parallel SHOW REGIONS queries can observe different stages of the migration.
Awaitility.await()
.atMost(10, TimeUnit.MINUTES)
.ignoreException(InconsistentDataException.class)
.pollDelay(1, TimeUnit.SECONDS)
.pollInterval(2, TimeUnit.SECONDS)
.untilAsserted(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.exception.InconsistentDataException;
import org.apache.iotdb.rpc.TSStatusCode;

import org.awaitility.Awaitility;
Expand Down Expand Up @@ -115,8 +116,10 @@ public void migrationShouldPreserveOtherRegionFiles() throws Exception {
Set<Integer> expectedDataNodes = new HashSet<>(regionMap.get(selectedRegion));
expectedDataNodes.remove(source);
expectedDataNodes.add(destination);
// Parallel SHOW REGIONS queries can observe different stages of the migration.
Awaitility.await()
.atMost(1, TimeUnit.MINUTES)
.ignoreException(InconsistentDataException.class)
.untilAsserted(
() ->
Assert.assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.DailyIT;
import org.apache.iotdb.itbase.exception.InconsistentDataException;

import org.apache.tsfile.utils.Pair;
import org.awaitility.Awaitility;
Expand Down Expand Up @@ -112,8 +113,10 @@ public void testWithCompressionRatio() throws Exception {
"migrate region %d from %d to %d", dataRegionIdForTest, leaderId, newLeaderId));

double finalCompressionRatioBeforeMigration = compressionRatioBeforeMigration[0];
// Parallel SHOW REGIONS queries can observe different stages of the migration.
Awaitility.await()
.atMost(10, TimeUnit.MINUTES)
.ignoreException(InconsistentDataException.class)
.pollDelay(1, TimeUnit.SECONDS)
.untilAsserted(
() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.DailyIT;
import org.apache.iotdb.itbase.exception.InconsistentDataException;

import org.apache.tsfile.utils.Pair;
import org.awaitility.Awaitility;
Expand Down Expand Up @@ -90,8 +91,10 @@ public void testWithLastEmptyDeletion() throws Exception {
String.format(
"migrate region %d from %d to %d", dataRegionIdForTest, leaderId, newLeaderId));

// Parallel SHOW REGIONS queries can observe different stages of the migration.
Awaitility.await()
.atMost(10, TimeUnit.MINUTES)
.ignoreException(InconsistentDataException.class)
.pollDelay(1, TimeUnit.SECONDS)
.until(
() -> {
Expand Down
Loading