Repository: edgedb/edgedb

Issue:
Fix CI on different Postgres



Discussion:
Depends on #4105

Resolving patch:
diff --git a/edb/testbase/server.py b/edb/testbase/server.py
--- a/edb/testbase/server.py
+++ b/edb/testbase/server.py
@@ -1383,9 +1383,11 @@ class StableDumpTestCase(QueryTestCase, CLITestCaseMixin):
     async def check_dump_restore_single_db(self, check_method):
         with tempfile.NamedTemporaryFile() as f:
             dbname = edgedb_defines.EDGEDB_SUPERUSER_DB
-            self.run_cli('-d', dbname, 'dump', f.name)
+            await asyncio.to_thread(self.run_cli, '-d', dbname, 'dump', f.name)
             await self.tearDownSingleDB()
-            self.run_cli('-d', dbname, 'restore', f.name)
+            await asyncio.to_thread(
+                self.run_cli, '-d', dbname, 'restore', f.name
+            )
         await check_method(self)
 
     async def check_dump_restore(self, check_method):
@@ -1396,11 +1398,15 @@ async def check_dump_restore(self, check_method):
         tgt_dbname = f'{src_dbname}_restored'
         q_tgt_dbname = qlquote.quote_ident(tgt_dbname)
         with tempfile.NamedTemporaryFile() as f:
-            self.run_cli('-d', src_dbname, 'dump', f.name)
+            await asyncio.to_thread(
+                self.run_cli, '-d', src_dbname, 'dump', f.name
+            )
 
             await self.con.execute(f'CREATE DATABASE {q_tgt_dbname}')
             try:
-                self.run_cli('-d', tgt_dbname, 'restore', f.name)
+                await asyncio.to_thread(
+                    self.run_cli, '-d', tgt_dbname, 'restore', f.name
+                )
                 con2 = await self.connect(database=tgt_dbname)
             except Exception:
                 await drop_db(self.con, q_tgt_dbname)


Test patch:
diff --git a/tests/dumps/dump01/1_0a2.dump b/tests/dumps/dump01/1_0a2.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0a2.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0a3.dump b/tests/dumps/dump01/1_0a3.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0a3.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0a4.dump b/tests/dumps/dump01/1_0a4.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0a4.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0a5.dump b/tests/dumps/dump01/1_0a5.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0a5.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0a6.dump b/tests/dumps/dump01/1_0a6.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0a6.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0a7.dump b/tests/dumps/dump01/1_0a7.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0a7.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0b1.dump b/tests/dumps/dump01/1_0b1.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0b1.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0b2.dump b/tests/dumps/dump01/1_0b2.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0b2.dump and /dev/null differ
diff --git a/tests/dumps/dump01/1_0b3.dump b/tests/dumps/dump01/1_0b3.dump
deleted file mode 100644
Binary files a/tests/dumps/dump01/1_0b3.dump and /dev/null differ
diff --git a/tests/dumps/dump02/1_0a8.dump b/tests/dumps/dump02/1_0a8.dump
deleted file mode 100644
Binary files a/tests/dumps/dump02/1_0a8.dump and /dev/null differ
diff --git a/tests/dumps/dump02/1_0b1.dump b/tests/dumps/dump02/1_0b1.dump
deleted file mode 100644
Binary files a/tests/dumps/dump02/1_0b1.dump and /dev/null differ
diff --git a/tests/dumps/dump02/1_0b2.dump b/tests/dumps/dump02/1_0b2.dump
deleted file mode 100644
Binary files a/tests/dumps/dump02/1_0b2.dump and /dev/null differ
diff --git a/tests/dumps/dump02/1_0b3.dump b/tests/dumps/dump02/1_0b3.dump
deleted file mode 100644
Binary files a/tests/dumps/dump02/1_0b3.dump and /dev/null differ
diff --git a/tests/dumps/dump03/1_0b2.dump b/tests/dumps/dump03/1_0b2.dump
deleted file mode 100644
Binary files a/tests/dumps/dump03/1_0b2.dump and /dev/null differ
diff --git a/tests/dumps/dump03/1_0b3.dump b/tests/dumps/dump03/1_0b3.dump
deleted file mode 100644
Binary files a/tests/dumps/dump03/1_0b3.dump and /dev/null differ