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 b1ba7291658 Fix : fix nightly ci (#28782)
b1ba7291658 is described below
commit b1ba7291658aa2fb7909d214bc9733cd16f8d027
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Tue Oct 17 11:46:23 2023 +0800
Fix : fix nightly ci (#28782)
* Fix : fix nightly ci
* Revert : revert the fix
---
.../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..720519c0af1 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(), " "));
}
@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");
}