git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 411ae64)
postgres_fdw: Stabilize regression test for postgres_fdw_disconnect_all().
2021年1月26日 07:36:21 +0000 (16:36 +0900)
2021年1月26日 07:36:21 +0000 (16:36 +0900)
The regression test added in commit 411ae64997 caused buildfarm failures.
The cause of them was that the order of warning messages output in the test
was not stable. To fix this, this commit sets client_min_messages to ERROR
temporarily when performing the test generating those warnings.

Per buildfarm failures.

Discussion: https://postgr.es/m/2147113.1611644754@sss.pgh.pa.us


diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out
index e33c92d7f1c2b710396c876e106e9ee8cadcaf07..9d77d6e8505603ce1bdfd0b790da35e0b7e60825 100644 (file)
--- a/contrib/postgres_fdw/expected/postgres_fdw.out
+++ b/contrib/postgres_fdw/expected/postgres_fdw.out
@@ -9216,15 +9216,15 @@ NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to user mapping for public on server loopback4
drop cascades to foreign table ft8
-- Return false as connections are still in use, warnings are issued.
+-- But disable warnings temporarily because the order of them is not stable.
+SET client_min_messages = 'ERROR';
SELECT postgres_fdw_disconnect_all();
-WARNING: cannot close dropped server connection because it is still in use
-WARNING: cannot close connection for server "loopback" because it is still in use
-WARNING: cannot close connection for server "loopback2" because it is still in use
postgres_fdw_disconnect_all
-----------------------------
f
(1 row)
+RESET client_min_messages;
COMMIT;
-- Close loopback2 connection and return true.
SELECT postgres_fdw_disconnect('loopback2');
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index 9473ab07623ca168b23e472e353fbc259b6c711f..62382d1a55f7fa9f5eb94b6f7473aed5f96b10d7 100644 (file)
--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
@@ -2779,7 +2779,10 @@ SELECT 1 FROM ft8 LIMIT 1;
SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
DROP SERVER loopback4 CASCADE;
-- Return false as connections are still in use, warnings are issued.
+-- But disable warnings temporarily because the order of them is not stable.
+SET client_min_messages = 'ERROR';
SELECT postgres_fdw_disconnect_all();
+RESET client_min_messages;
COMMIT;
-- Close loopback2 connection and return true.
SELECT postgres_fdw_disconnect('loopback2');
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /