This is an automated email from the ASF dual-hosted git repository.
yongzao 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 34ec2eb2bd8 Enhance the robustness of IoTDBRegionReconstructForIoTV1IT
(#16065)
34ec2eb2bd8 is described below
commit 34ec2eb2bd81931ccdec348c0e0ab46867c5177b
Author: Yongzao <[email protected]>
AuthorDate: Thu Jul 31 11:50:59 2025 +0800
Enhance the robustness of IoTDBRegionReconstructForIoTV1IT (#16065)
---
.../pass/commit/IoTDBRegionReconstructForIoTV1IT.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 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 c422444383a..777b1d2d652 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
@@ -192,7 +192,7 @@ public class IoTDBRegionReconstructForIoTV1IT extends
IoTDBRegionOperationReliab
// now, the query should work fine, but the update of region status may
have some delay
long start = System.currentTimeMillis();
while (true) {
- SessionDataSet resultSet = null;
+ SessionDataSet resultSet;
try {
resultSet = session.executeQueryStatement("select * from
root.sg.**");
} catch (StatementExecutionException e) {
@@ -201,10 +201,12 @@ public class IoTDBRegionReconstructForIoTV1IT extends
IoTDBRegionOperationReliab
}
continue;
}
- RowRecord rowRecord = resultSet.next();
- Assert.assertEquals("2.0", rowRecord.getField(0).getStringValue());
- Assert.assertEquals("1.0", rowRecord.getField(1).getStringValue());
- break;
+ if (resultSet.hasNext()) {
+ RowRecord rowRecord = resultSet.next();
+ Assert.assertEquals("2.0", rowRecord.getField(0).getStringValue());
+ Assert.assertEquals("1.0", rowRecord.getField(1).getStringValue());
+ break;
+ }
}
}
}