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 baae7ce0332 Fix snapshot UT (#11697)
baae7ce0332 is described below
commit baae7ce0332f34c42eb5381c83254629fa445767
Author: Liu Xuxin <[email protected]>
AuthorDate: Wed Dec 13 18:15:55 2023 +0800
Fix snapshot UT (#11697)
---
.../iotdb/db/storageengine/dataregion/snapshot/IoTDBSnapshotTest.java | 4 ++++
iotdb-core/datanode/src/test/resources/logback-test.xml | 1 +
2 files changed, 5 insertions(+)
diff --git
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/IoTDBSnapshotTest.java
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/IoTDBSnapshotTest.java
index e91119340d7..c70658461e7 100644
---
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/IoTDBSnapshotTest.java
+++
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/IoTDBSnapshotTest.java
@@ -77,8 +77,11 @@ public class IoTDBSnapshotTest {
+ "0"
+ File.separator
+ String.format("%d-%d-0-0.tsfile", i + 1, i + 1);
+ File newFile = new File(filePath);
+ Assert.assertTrue(newFile.getParentFile().exists() ||
newFile.getParentFile().mkdirs());
TsFileGeneratorUtils.generateMixTsFile(filePath, 5, 5, 10, i * 100, (i +
1) * 100, 10, 10);
TsFileResource resource = new TsFileResource(new File(filePath));
+ Assert.assertTrue(new File(filePath).exists());
resources.add(resource);
for (int idx = 0; idx < 5; idx++) {
resource.updateStartTime(testSgName + PATH_SEPARATOR + "d" + i, i *
100);
@@ -135,6 +138,7 @@ public class IoTDBSnapshotTest {
List<TsFileResource> resources = writeTsFiles();
resources.subList(50, 100).forEach(x ->
x.setStatusForTest(TsFileResourceStatus.UNCLOSED));
DataRegion region = new DataRegion(testSgName, "0");
+ region.setAllowCompaction(false);
region.getTsFileManager().addAll(resources, true);
File snapshotDir = new File("target" + File.separator + "snapshot");
Assert.assertTrue(snapshotDir.exists() || snapshotDir.mkdirs());
diff --git a/iotdb-core/datanode/src/test/resources/logback-test.xml
b/iotdb-core/datanode/src/test/resources/logback-test.xml
index 8692100d47d..c5080e2f262 100644
--- a/iotdb-core/datanode/src/test/resources/logback-test.xml
+++ b/iotdb-core/datanode/src/test/resources/logback-test.xml
@@ -57,6 +57,7 @@
<logger
name="org.apache.iotdb.db.storageengine.compaction.cross.rewrite.task"
level="ERROR"/>
<logger name="io.moquette.broker.metrics.MQTTMessageLogger" level="ERROR"/>
<logger name="DETAILED_FAILURE_QUERY_TRACE" level="ERROR"/>
+ <logger name="org.apache.iotdb.db.storageengine.dataregion.DataRegion"
level="INFO"/>
<root level="ERROR">
<appender-ref ref="stdout"/>
</root>