You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/10/16 09:44:21 UTC

[shardingsphere] branch 5.4.1-release updated: Fix nightly ci (#28773)

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

zhaojinchao pushed a commit to branch 5.4.1-release
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/5.4.1-release by this push:
     new 32b7be8f10b Fix nightly ci (#28773)
32b7be8f10b is described below

commit 32b7be8f10ba25b1e5e76e4be1b1c31e132b7358
Author: zhaojinchao <zh...@apache.org>
AuthorDate: Mon Oct 16 04:44:13 2023 -0500

    Fix nightly ci (#28773)
---
 .../sqlfederation/compiler/operator/physical/EnumerableScan.java  | 2 +-
 .../sqlfederation/compiler/it/SQLStatementCompilerIT.java         | 2 +-
 .../process/subscriber/ProcessListChangedSubscriberTest.java      | 8 ++++++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/operator/physical/EnumerableScan.java b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/operator/physical/EnumerableScan.java
index bcd660d99ca..2a529435065 100644
--- a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/operator/physical/EnumerableScan.java
+++ b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/compiler/operator/physical/EnumerableScan.java
@@ -74,7 +74,7 @@ public final class EnumerableScan extends TableScan implements EnumerableRel {
     
     @Override
     public RelWriter explainTerms(final RelWriter relWriter) {
-        return super.explainTerms(relWriter).item("sql", sqlString.getSql().replaceAll("[\r\n]", " "));
+        return super.explainTerms(relWriter).item("sql", sqlString.getSql().replaceAll(System.lineSeparator(), " ")).item("dynamicParameters", sqlString.getDynamicParameters());
     }
     
     @Override
diff --git a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java
index 4519f48b2b0..d455bca90ad 100644
--- a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java
+++ b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/compiler/it/SQLStatementCompilerIT.java
@@ -246,7 +246,7 @@ class SQLStatementCompilerIT {
     @ArgumentsSource(TestCaseArgumentsProvider.class)
     void assertCompile(final TestCase testcase) {
         SQLStatement sqlStatement = sqlParserRule.getSQLParserEngine(TypedSPILoader.getService(DatabaseType.class, "MySQL")).parse(testcase.getSql(), false);
-        String actual = sqlStatementCompiler.compile(sqlStatement, "MySQL").getPhysicalPlan().explain().replaceAll("[\r\n]", " ");
+        String actual = sqlStatementCompiler.compile(sqlStatement, "MySQL").getPhysicalPlan().explain().replaceAll(System.lineSeparator(), " ");
         assertThat(actual, is(testcase.getAssertion().getExpectedResult()));
     }
     
diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
index 69cc6d4f503..e7adb0497c5 100644
--- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
+++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
@@ -116,8 +116,12 @@ class ProcessListChangedSubscriberTest {
         subscriber.reportLocalProcesses(new ReportLocalProcessesEvent(instanceId, processId));
         ClusterPersistRepository repository = registryCenter.getRepository();
         verify(repository).persist("/execution_nodes/foo_id/" + instanceId,
-                "processes:" + System.lineSeparator() + "- completedUnitCount: 0\n  heldByConnection: false\n  id: foo_id\n  idle: false\n  startMillis: 0\n  totalUnitCount: 0"
-                        + System.lineSeparator());
+                "processes:" + System.lineSeparator() + "- completedUnitCount: 0" + System.lineSeparator()
+                        + "  heldByConnection: false" + System.lineSeparator()
+                        + "  id: foo_id" + System.lineSeparator()
+                        + "  idle: false" + System.lineSeparator()
+                        + "  startMillis: 0" + System.lineSeparator()
+                        + "  totalUnitCount: 0" + System.lineSeparator());
         verify(repository).delete("/nodes/compute_nodes/show_process_list_trigger/" + instanceId + ":foo_id");
     }