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

Caideyipi pushed a commit to branch codex/cp-19076-dev-1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ff6d8b673c6b26e241c2571b27f5adb42773fbbf
Author: Caideyipi <[email protected]>
AuthorDate: Mon Nov 2 20:20:48 2026 +0800

    Adapt active LOAD tests for 1.3 APIs
---
 .../iotdb/db/it/IoTDBLoadTsFileActiveScanIT.java   | 26 ++++++++++++----------
 .../load/active/ActiveLoadTsFileLoaderTest.java    |  6 ++---
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git 
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileActiveScanIT.java
 
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileActiveScanIT.java
index 8d3ae50ee43..6c956d12e53 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileActiveScanIT.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileActiveScanIT.java
@@ -31,11 +31,11 @@ import 
org.apache.iotdb.itbase.exception.InconsistentDataException;
 
 import org.apache.tsfile.common.conf.TSFileConfig;
 import org.apache.tsfile.enums.TSDataType;
-import org.apache.tsfile.file.metadata.IDeviceID;
+import org.apache.tsfile.file.metadata.PlainDeviceID;
 import org.apache.tsfile.read.TsFileSequenceReader;
+import org.apache.tsfile.read.common.Path;
 import org.apache.tsfile.write.TsFileWriter;
 import org.apache.tsfile.write.record.Tablet;
-import org.apache.tsfile.write.schema.IMeasurementSchema;
 import org.apache.tsfile.write.schema.MeasurementSchema;
 import org.awaitility.Awaitility;
 import org.junit.After;
@@ -62,7 +62,7 @@ import java.util.stream.Stream;
 public class IoTDBLoadTsFileActiveScanIT {
   private static final String ORIGINAL_DIR = "ext/load/p1-original";
   private static final String RELOADED_DIR = "ext/load/p1-reloaded";
-  private static final List<IMeasurementSchema> SCHEMAS =
+  private static final List<MeasurementSchema> SCHEMAS =
       Arrays.asList(
           new MeasurementSchema("s", TSDataType.INT64),
           new MeasurementSchema("txt", TSDataType.TEXT));
@@ -108,8 +108,8 @@ public class IoTDBLoadTsFileActiveScanIT {
       // Publish the sidecars while tail magic is still absent. Closing the 
writer publishes the
       // complete file only after both deletion data and its resource are 
present.
       final TsFileResource resource = new TsFileResource(source);
-      
resource.updateStartTime(IDeviceID.Factory.DEFAULT_FACTORY.create(device), 
9999);
-      resource.updateEndTime(IDeviceID.Factory.DEFAULT_FACTORY.create(device), 
20000);
+      resource.updateStartTime(new PlainDeviceID(device), 9999);
+      resource.updateEndTime(new PlainDeviceID(device), 20000);
       resource.serialize();
       try (final ModificationFile mods = resource.getModFile()) {
         mods.write(new Deletion(new MeasurementPath(device + ".s"), 
Long.MAX_VALUE, 10000, 10000));
@@ -168,16 +168,17 @@ public class IoTDBLoadTsFileActiveScanIT {
       throws Exception {
     final TsFileWriter writer = new TsFileWriter(source);
     try {
-      writer.registerAlignedTimeseries(device, SCHEMAS);
+      writer.registerAlignedTimeseries(new Path(device), SCHEMAS);
       final Tablet tablet = new Tablet(device, SCHEMAS, 3);
       final long[] times = {9999, 10000, 20000};
       for (int row = 0; row < times.length; row++) {
         tablet.addTimestamp(row, times[row]);
-        tablet.addValue(row, "s", 41L + row);
-        tablet.addValue(row, "txt", row == 0 ? "first" : row == 2 ? "last" : 
null);
+        tablet.addValue("s", row, 41L + row);
+        tablet.addValue("txt", row, row == 0 ? "first" : row == 2 ? "last" : 
null);
       }
+      tablet.rowSize = times.length;
       writer.writeAligned(tablet);
-      writer.flush();
+      writer.flushAllChunkGroups();
       return writer;
     } catch (final Exception e) {
       try {
@@ -195,11 +196,12 @@ public class IoTDBLoadTsFileActiveScanIT {
     final File staged = new File(directory.getParentFile(), name + 
".publishing");
     try {
       try (final TsFileWriter writer = new TsFileWriter(staged)) {
-        writer.registerAlignedTimeseries(device, SCHEMAS);
+        writer.registerAlignedTimeseries(new Path(device), SCHEMAS);
         final Tablet tablet = new Tablet(device, SCHEMAS, 1);
         tablet.addTimestamp(0, 1);
-        tablet.addValue(0, "s", value);
-        tablet.addValue(0, "txt", "canary");
+        tablet.addValue("s", 0, value);
+        tablet.addValue("txt", 0, "canary");
+        tablet.rowSize = 1;
         writer.writeAligned(tablet);
       }
       try (final TsFileSequenceReader reader =
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoaderTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoaderTest.java
index fa97a8b5e36..34986ebbc36 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoaderTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoaderTest.java
@@ -224,11 +224,11 @@ public class ActiveLoadTsFileLoaderTest {
           new File(tempDir, "first.tsfile").getAbsolutePath(),
           tempDir.getAbsolutePath(),
           false,
-          false);
+          null);
       Assert.assertTrue(lastEmptyPoll.await(30, TimeUnit.SECONDS));
       Assert.assertEquals(1, executor.getActiveCount());
       final File next = new File(tempDir, "next.tsfile");
-      loader.tryTriggerTsFileLoad(next.getAbsolutePath(), 
tempDir.getAbsolutePath(), false, false);
+      loader.tryTriggerTsFileLoad(next.getAbsolutePath(), 
tempDir.getAbsolutePath(), false, null);
       Assert.assertTrue(loader.isFilePendingOrLoading(next));
       if (stop) {
         loader.stop();
@@ -271,7 +271,7 @@ public class ActiveLoadTsFileLoaderTest {
             producers.submit(
                 () ->
                     loader.tryTriggerTsFileLoad(
-                        source.getAbsolutePath(), tempDir.getAbsolutePath(), 
false, false)));
+                        source.getAbsolutePath(), tempDir.getAbsolutePath(), 
false, null)));
       }
       for (final Future<?> enqueue : enqueues) {
         enqueue.get(10, TimeUnit.SECONDS);

Reply via email to