Caideyipi commented on code in PR #18899:
URL: https://github.com/apache/iotdb/pull/18899#discussion_r4290927090
##########
integration-test/src/test/java/org/apache/iotdb/db/it/utils/TestUtils.java:
##########
@@ -2029,7 +2104,8 @@ public static void assertDataAlwaysOnEnv(
} catch (Exception e) {
Assert.fail();
}
- });
+ })
+ .until(() -> true);
Review Comment:
Applied in f15d2454293. The lifecycle assertions now expect 0 series under
root.ln0, 2 under root.db, and 0 databases under root.ln0. Verified
testLifeCycleWithHistoryDisabled with two 1-ConfigNode/3-DataNode clusters and
the original observation periods; it passed. The local run used 32 MiB initial
node heaps, Serial GC, and ActiveProcessorCount=2 to fit available memory;
maximum node heaps and cluster topology were unchanged.
##########
integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/enhanced/IoTDBPipeAutoDropIT.java:
##########
@@ -125,30 +126,28 @@ public void testAutoDropInHistoricalTransfer() throws
Exception {
"test",
handleFailure);
- try (final Connection connection =
-
makeItCloseQuietly(senderEnv.getConnection(BaseEnv.TABLE_SQL_DIALECT));
- final Statement statement =
makeItCloseQuietly(connection.createStatement()); ) {
- ResultSet result = statement.executeQuery("show pipes");
+ try (final SyncConfigNodeIServiceClient client =
+ (SyncConfigNodeIServiceClient)
senderEnv.getLeaderConfigNodeConnection()) {
+ // Fetch a fresh table-model snapshot on every poll while history pipes
are being removed.
await()
.pollInSameThread()
.pollDelay(1L, TimeUnit.SECONDS)
.pollInterval(1L, TimeUnit.SECONDS)
.atMost(600, TimeUnit.SECONDS)
.untilAsserted(
() -> {
- try {
- int pipeNum = 0;
- while (result.next()) {
- final String pipeName =
result.getString(ColumnHeaderConstant.ID);
- if
(!pipeName.contains(PipeStaticMeta.CONSENSUS_PIPE_PREFIX)
- && pipeName.endsWith("_history")) {
- pipeNum++;
- }
- }
- Assert.assertEquals(0, pipeNum);
- } catch (Exception e) {
- Assert.fail();
- }
+ final List<TShowPipeInfo> showPipeResult =
+ client.showPipe(
+ new TShowPipeReq()
+ .setIsTableModel(true)
+ .setUserName(SessionConfig.DEFAULT_USER))
+ .pipeInfoList;
Review Comment:
Applied in f15d2454293 and 3b565d11556. All four newly introduced auto-drop
polling blocks now assert SUCCESS_STATUS before examining pipeInfoList. The
same check also covers the two existing direct-RPC polls in the tree-model
test, so all six polls in these two classes validate status first. All six
IoTDBPipeAutoDropIT methods passed with MultiClusterIT (two
1-ConfigNode/3-DataNode clusters per test). Local runs used 32 MiB initial node
heaps, Serial GC, and ActiveProcessorCount=2; maximum node heaps and cluster
topology were unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]