From 2b26e24bc9fbf129d1eb01783130c6dece95c479 Mon Sep 17 00:00:00 2001 From: Li Yu Heng Date: Wed, 22 Jan 2025 15:55:08 +0800 Subject: [PATCH] Fix region reconstruction IT (#14753) * done * done --- .../IoTDBRegionReconstructForIoTV1IT.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/confignode/it/regionmigration/pass/commit/IoTDBRegionReconstructForIoTV1IT.java b/integration-test/src/test/java/org/apache/iotdb/confignode/it/regionmigration/pass/commit/IoTDBRegionReconstructForIoTV1IT.java index 5863ef99309f..9c720bfbc274 100644 --- a/integration-test/src/test/java/org/apache/iotdb/confignode/it/regionmigration/pass/commit/IoTDBRegionReconstructForIoTV1IT.java +++ b/integration-test/src/test/java/org/apache/iotdb/confignode/it/regionmigration/pass/commit/IoTDBRegionReconstructForIoTV1IT.java @@ -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