From ffc7e752d9030a97a0bd877f5550f72d34634086 Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 15:30:21 +0800 Subject: [PATCH 1/7] fix --- .../iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index d929f747ebb8..49390a5d1119 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -133,6 +133,14 @@ public void testOPCUAServerSink() throws Exception { break; } + // Create the region first to avoid tsFile parsing + TestUtils.executeNonQueries( + env, + Arrays.asList( + "create aligned timeSeries root.db.opc(value double, quality boolean, other int32)", + "insert into root.db.opc(time, value, quality, other) values (0, 0, true, 1)"), + null); + while (true) { final int[] ports = EnvUtils.searchAvailablePorts(); tcpPort = ports[0]; @@ -241,7 +249,11 @@ public void testOPCUAServerSink() throws Exception { sinkAttributes.put("password", "conflict"); try { TestUtils.executeNonQuery( - env, "create pipe test1 ('sink'='opc-ua-sink', 'password'='conflict')", null); + env, + String.format( + "create pipe test1 ('sink'='opc-ua-sink', 'password'='conflict@pswd', 'tcp.port'='%s', 'http.port'='%s')", + tcpPort, httpsPort), + null); Assert.fail(); } catch (final Exception e) { Assert.assertEquals( From c350448b69761b08e1c0df77b1add765566c6ce9 Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 15:52:25 +0800 Subject: [PATCH 2/7] fix --- .../java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index 49390a5d1119..4f37c3759364 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -85,6 +85,7 @@ public void setUp() { @Test public void testOPCUAServerSink() throws Exception { int tcpPort = -1; + int httpsPort = -1; try (final SyncConfigNodeIServiceClient client = (SyncConfigNodeIServiceClient) env.getLeaderConfigNodeConnection()) { From 92503f1f77680d1768b5f60d37e043b6b57372f9 Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 15:53:13 +0800 Subject: [PATCH 3/7] fix --- .../java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index 4f37c3759364..395c3e6f1ba6 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -102,7 +102,7 @@ public void testOPCUAServerSink() throws Exception { while (true) { final int[] ports = EnvUtils.searchAvailablePorts(); tcpPort = ports[0]; - final int httpsPort = ports[1]; + httpsPort = ports[1]; sinkAttributes.put("tcp.port", Integer.toString(tcpPort)); sinkAttributes.put("https.port", Integer.toString(httpsPort)); From f07971a05f7a692fe7960c36c7becea6554bf25d Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 16:01:07 +0800 Subject: [PATCH 4/7] fix --- .../java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index 395c3e6f1ba6..50ea92fbed9f 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -145,7 +145,7 @@ public void testOPCUAServerSink() throws Exception { while (true) { final int[] ports = EnvUtils.searchAvailablePorts(); tcpPort = ports[0]; - final int httpsPort = ports[1]; + httpsPort = ports[1]; sinkAttributes.put("tcp.port", Integer.toString(tcpPort)); sinkAttributes.put("https.port", Integer.toString(httpsPort)); sinkAttributes.put("with-quality", "true"); From 444acdd097d53b599bbf7059315ce96c06ae165f Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 16:23:30 +0800 Subject: [PATCH 5/7] fix --- .../org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index 50ea92fbed9f..88882a51d7b6 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -175,12 +175,9 @@ public void testOPCUAServerSink() throws Exception { break; } - // Create aligned timeSeries to avoid tsFile parsing - TestUtils.executeNonQueries( + TestUtils.executeNonQuery( env, - Arrays.asList( - "create aligned timeSeries root.db.opc(value double, quality boolean, other int32)", - "insert into root.db.opc(time, value, quality, other) values (1, 1, false, 1)"), + "insert into root.db.opc(time, value, quality, other) values (1, 1, false, 1)", null); long startTime = System.currentTimeMillis(); From b3dab2f34cafe73f30216fa29b1799732ceeb7e3 Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 16:41:02 +0800 Subject: [PATCH 6/7] x --- .../java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index 88882a51d7b6..facca8298409 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -249,7 +249,7 @@ public void testOPCUAServerSink() throws Exception { TestUtils.executeNonQuery( env, String.format( - "create pipe test1 ('sink'='opc-ua-sink', 'password'='conflict@pswd', 'tcp.port'='%s', 'http.port'='%s')", + "create pipe test1 ('sink'='opc-ua-sink', 'password'='conflict@pswd', 'tcp.port'='%s', 'https.port'='%s')", tcpPort, httpsPort), null); Assert.fail(); From 271cc23040ac41ef263cf9a0218cb6a315c656e1 Mon Sep 17 00:00:00 2001 From: Caideyipi <87789683+Caideyipi@users.noreply.github.com> Date: Wed, 31 Dec 2025 16:56:43 +0800 Subject: [PATCH 7/7] fix --- .../org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java index facca8298409..67060c6002b5 100644 --- a/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java +++ b/integration-test/src/test/java/org/apache/iotdb/pipe/it/single/IoTDBPipeOPCUAIT.java @@ -255,7 +255,9 @@ public void testOPCUAServerSink() throws Exception { Assert.fail(); } catch (final Exception e) { Assert.assertEquals( - "org.apache.iotdb.jdbc.IoTDBSQLException: 1107: The existing server with tcp port 12686 and https port 8443's password **** conflicts to the new password ****, reject reusing.", + String.format( + "org.apache.iotdb.jdbc.IoTDBSQLException: 1107: The existing server with tcp port %s and https port %s's password **** conflicts to the new password ****, reject reusing.", + tcpPort, httpsPort), e.getMessage()); } } finally {