From 86519d526a1f262961c8095407441677d322b26a Mon Sep 17 00:00:00 2001 From: Raphael Speyer Date: Tue, 17 Oct 2023 15:13:38 +1100 Subject: [PATCH] Postgres testing: explicitly configure database ordering to be non-linguistic (#16748) This makes for reasonable sorting and ordering behaviour that should be the same across platforms. --- .../itlib/scala/http/AbstractHttpServiceIntegrationTest.scala | 2 -- .../com/digitalasset/testing/postgresql/PostgresAround.scala | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala b/ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala index c9ba5ab782a..0ff21149959 100644 --- a/ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala +++ b/ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala @@ -800,7 +800,6 @@ abstract class QueryStoreAndAuthDependentIntegrationTest matches = Seq(withBazRecord("c")), doesNotMatch = Seq(withBazRecord("a")), ), - /* TODO(raphael-speyer-da) Re-enable this test. See https://digitalasset.atlassian.net/browse/LT-15 Scenario( "lt string with sketchy value which is a single quote", kbvarId, @@ -810,7 +809,6 @@ abstract class QueryStoreAndAuthDependentIntegrationTest matches = Seq(withBazRecord(" ")), // Less than ' doesNotMatch = Seq(withBazRecord("A")), // Not less than ' ), - */ Scenario( "lt string with sketchy value which uses unicode quote char", kbvarId, diff --git a/libs-scala/postgresql-testing/src/main/scala/com/digitalasset/testing/postgresql/PostgresAround.scala b/libs-scala/postgresql-testing/src/main/scala/com/digitalasset/testing/postgresql/PostgresAround.scala index f625cd1b12d..8017afc39c8 100644 --- a/libs-scala/postgresql-testing/src/main/scala/com/digitalasset/testing/postgresql/PostgresAround.scala +++ b/libs-scala/postgresql-testing/src/main/scala/com/digitalasset/testing/postgresql/PostgresAround.scala @@ -144,9 +144,9 @@ trait PostgresAround { "initialize the PostgreSQL database", Tool.initdb, s"--username=$userName", - if (isWindows) "--locale=English_United States" else "--locale=en_US.UTF-8", + "--locale=C", "-E", - "UNICODE", + "UTF8", "-A", "trust", dataDir.toString.replace("\\", "/"),