Hi,

PFA patch to fix the Collation tests on Windows, Instead of default "POSIX"
collation, we have now used default "C" collation for testing, I have
tested it macOS, Linux & Windows platform the tests are working fine.
RM#2501

I have also reported bug in Postgres community regarding "POSIX" collation
issue on Windows.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
index ee283aa..84b81e7 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
@@ -58,7 +58,7 @@ class CollationAddTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to add the collation.")
 
         data = {
-            "copy_collation": "pg_catalog.\"POSIX\"",
+            "copy_collation": "pg_catalog.\"C\"",
             "name": "collation_add_%s" % str(uuid.uuid4())[1:6],
             "owner": self.server["username"],
             "schema": schema_name
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/utils.py
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/utils.py
index 7a55785..c24eb79 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/utils.py
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/utils.py
@@ -25,7 +25,7 @@ def create_collation(server, schema_name, coll_name, db_name):
                                              server['port'],
                                              server['sslmode'])
         pg_cursor = connection.cursor()
-        pg_cursor.execute('CREATE COLLATION %s.%s FROM pg_catalog."POSIX"' %
+        pg_cursor.execute('CREATE COLLATION %s.%s FROM pg_catalog."C"' %
                           (schema_name, coll_name))
         connection.commit()
 

Reply via email to