Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 85d08b8

Browse files
committed
Band-aid new postgres_fdw test case to remove error text dependency.
Buildfarm member lorikeet is still failing the test from commit 32a9c0b, but now it's down to the should-have-foreseen-it problem that the error message isn't what the expected-output file expects. Let's see if we can get stable results by printing just the SQLSTATE. I believe we'll reliably see ERRCODE_CONNECTION_FAILURE, since pgfdw_report_error() will report that for any libpq-originated error. There may be a better way to do this, but I'd like to get the buildfarm back to green before we discuss further improvements. Discussion: https://postgr.es/m/E1kPc9v-0005L4-2l@gemulon.postgresql.org Discussion: https://postgr.es/m/2621622.1602184554@sss.pgh.pa.us
1 parent eeb01eb commit 85d08b8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

contrib/postgres_fdw/expected/postgres_fdw.out

+4-4
Original file line numberDiff line numberDiff line change
@@ -9025,13 +9025,13 @@ SELECT 1 FROM ft1 LIMIT 1;
90259025

90269026
-- If the query detects the broken connection when starting new remote
90279027
-- subtransaction, it doesn't reestablish new connection and should fail.
9028+
-- The text of the error might vary across platforms, so don't show it.
90289029
CALL terminate_backend_and_wait('fdw_retry_check');
90299030
SAVEPOINT s;
9031+
\set VERBOSITY sqlstate
90309032
SELECT 1 FROM ft1 LIMIT 1; -- should fail
9031-
ERROR: server closed the connection unexpectedly
9032-
This probably means the server terminated abnormally
9033-
before or while processing the request.
9034-
CONTEXT: remote SQL command: SAVEPOINT s2
9033+
ERROR: 08006
9034+
\set VERBOSITY default
90359035
COMMIT;
90369036
-- Clean up
90379037
DROP PROCEDURE terminate_backend_and_wait(text);

contrib/postgres_fdw/sql/postgres_fdw.sql

+3
Original file line numberDiff line numberDiff line change
@@ -2687,9 +2687,12 @@ SELECT 1 FROM ft1 LIMIT 1;
26872687

26882688
-- If the query detects the broken connection when starting new remote
26892689
-- subtransaction, it doesn't reestablish new connection and should fail.
2690+
-- The text of the error might vary across platforms, so don't show it.
26902691
CALL terminate_backend_and_wait('fdw_retry_check');
26912692
SAVEPOINT s;
2693+
\set VERBOSITY sqlstate
26922694
SELECT 1 FROM ft1 LIMIT 1; -- should fail
2695+
\set VERBOSITY default
26932696
COMMIT;
26942697

26952698
-- Clean up

0 commit comments

Comments
 (0)