mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 10:11:29 +08:00
Fix flaky pg_dump test
Use DROP DATABASE WITH(FORCE) to drop the database in pg_dump test since occasionally there would still be connections to the database leading to test failures. Unfortunately PG12 does not support that syntax so we have to drop without that option on PG12.
This commit is contained in:
parent
1cb3edddc1
commit
85d0e16a98
@ -653,4 +653,6 @@ SELECT * FROM test_tz ORDER BY time;
|
||||
(4 rows)
|
||||
|
||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||
DROP DATABASE :TEST_DBNAME_EXTRA;
|
||||
-- DROP DATABASE WITH(FORCE) is only available in PG13+
|
||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 13 THEN 'WITH(FORCE)' ELSE '' END AS "DROPDBOPTION" \gset
|
||||
DROP DATABASE :TEST_DBNAME_EXTRA :DROPDBOPTION;
|
||||
|
@ -217,4 +217,8 @@ INSERT INTO test_tz VALUES('Mon Mar 20 09:37:00.936242 2017', 30, 'dev3');
|
||||
SELECT * FROM test_tz ORDER BY time;
|
||||
|
||||
\c :TEST_DBNAME :ROLE_SUPERUSER
|
||||
DROP DATABASE :TEST_DBNAME_EXTRA;
|
||||
|
||||
-- DROP DATABASE WITH(FORCE) is only available in PG13+
|
||||
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 13 THEN 'WITH(FORCE)' ELSE '' END AS "DROPDBOPTION" \gset
|
||||
DROP DATABASE :TEST_DBNAME_EXTRA :DROPDBOPTION;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user