From 69fed963330a0ebcf72d725053a1aa5bbffac507 Mon Sep 17 00:00:00 2001 From: Raigor Date: Mon, 18 Dec 2023 17:40:45 +0800 Subject: [PATCH] Fixes #29429, fix yaml lineBreak on windows (#29430) * Fixes #29429, fix yaml lineBreak on windows * Fix DQL E2E for PostgreSQL * Comment case for pg_catalog.pg_stat_xact_all_tables * Comment case for pg_catalog.pg_stat_xact_all_tables --- .../apache/shardingsphere/infra/util/yaml/YamlEngine.java | 4 ++-- .../dql-integration-select-system-schema-postgresql.xml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/YamlEngine.java b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/YamlEngine.java index 6d43eee4e0704..0c78f1359bf3b 100644 --- a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/YamlEngine.java +++ b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/yaml/YamlEngine.java @@ -107,8 +107,8 @@ public static String marshal(final Object value) { DumperOptions dumperOptions = new DumperOptions(); dumperOptions.setLineBreak(DumperOptions.LineBreak.getPlatformLineBreak()); if (value instanceof Collection) { - return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions)).dumpAs(value, null, DumperOptions.FlowStyle.BLOCK); + return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions), dumperOptions).dumpAs(value, null, DumperOptions.FlowStyle.BLOCK); } - return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions)).dumpAsMap(value); + return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions), dumperOptions).dumpAsMap(value); } } diff --git a/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema-postgresql.xml b/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema-postgresql.xml index 30f535c1d9c2a..184b78a486d81 100644 --- a/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema-postgresql.xml +++ b/test/e2e/sql/src/test/resources/cases/dql/dql-integration-select-system-schema-postgresql.xml @@ -340,10 +340,11 @@ - - + + +