jt2594838 commented on code in PR #17295:
URL: https://github.com/apache/iotdb/pull/17295#discussion_r2980284104
##########
integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/enhanced/IoTDBPipeAutoDropIT.java:
##########
@@ -70,48 +102,30 @@ public void testAutoDropInHistoricalTransfer() throws
Exception {
TestUtils.executeNonQueryWithRetry(receiverEnv, "flush");
};
- final String receiverIp = receiverDataNode.getIp();
- final int receiverPort = receiverDataNode.getPort();
-
- try (final SyncConfigNodeIServiceClient client =
- (SyncConfigNodeIServiceClient)
senderEnv.getLeaderConfigNodeConnection()) {
-
- TableModelUtils.createDataBaseAndTable(senderEnv, "test", "test");
- TableModelUtils.insertData("test", "test", 0, 100, senderEnv);
-
- final Map<String, String> extractorAttributes = new HashMap<>();
- final Map<String, String> processorAttributes = new HashMap<>();
- final Map<String, String> connectorAttributes = new HashMap<>();
-
- extractorAttributes.put("mode.snapshot", "true");
- extractorAttributes.put("capture.table", "true");
- extractorAttributes.put("user", "root");
-
- connectorAttributes.put("connector", "iotdb-thrift-connector");
- connectorAttributes.put("connector.batch.enable", "false");
- connectorAttributes.put("connector.ip", receiverIp);
- connectorAttributes.put("connector.port",
Integer.toString(receiverPort));
-
- final TSStatus status =
- client.createPipe(
- new TCreatePipeReq("p1", connectorAttributes)
- .setExtractorAttributes(extractorAttributes)
- .setProcessorAttributes(processorAttributes));
+ // Create an ordinary full sync pipe
+ // The database & table name will be converted to lower case
+ final String sql =
+ String.format("create pipe a2b ('node-urls'='%s')",
receiverDataNode.getIpAndPortString());
+ try (final Connection connection =
senderEnv.getConnection(BaseEnv.TABLE_SQL_DIALECT);
+ final Statement statement = connection.createStatement()) {
+ statement.execute(sql);
+ } catch (SQLException e) {
+ fail(e.getMessage());
+ }
Review Comment:
"The database & table name will be converted to lower case"
I do not see any database or table name here.
##########
integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/tablemodel/manual/enhanced/IoTDBPipeAutoDropIT.java:
##########
@@ -124,9 +138,9 @@ public void testAutoDropInHistoricalTransfer() throws
Exception {
try {
int pipeNum = 0;
while (result.next()) {
- if (!result
- .getString(ColumnHeaderConstant.ID)
- .contains(PipeStaticMeta.CONSENSUS_PIPE_PREFIX)) {
+ final String pipeName =
result.getString(ColumnHeaderConstant.ID);
+ if
(!pipeName.contains(PipeStaticMeta.CONSENSUS_PIPE_PREFIX)
+ && pipeName.endsWith("_history")) {
Review Comment:
&& -> || ?
--
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]