pgsql: Move plpgsql error-trapping tests to a new module-specifictest - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Move plpgsql error-trapping tests to a new module-specifictest
Date
Msg-id E1hEf4z-0002WN-30@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Move plpgsql error-trapping tests to a new module-specific test file.

The test for statement timeout has a 2-second timeout, which was only
moderately annoying when it was written, but nowadays it contributes
a pretty significant chunk of the elapsed time needed to run the core
regression tests on a fast machine.  We can improve this situation by
pushing the test into a plpgsql-specific test file instead of having
it in a core regression test.  That's a clean win when considering
just the core tests.  Even when considering check-world or a buildfarm
test run, we should come out ahead because the core tests get run
more times in those sequences.

Furthermore, since the plpgsql tests aren't currently parallelized,
it seems likely that the timing problems reflected in commit f1e671a0b
(which increased that timeout from 1 sec to 2) will be much less severe
in this context.  Hence, let's try cutting the timeout back to 1 second
in hopes of a further win for check-world.  We can undo that if
buildfarm experience proves it to be a bad idea.

To give the new test file some modicum of intellectual coherency,
I moved the surrounding tests related to error-trapping along with
the statement timeout test proper.  Those other tests don't run long
enough to have any particular bearing on test-runtime considerations.
The tests are the same as before, except with minor adjustments to
not depend on an externally-created table.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6726d8d476b424633ebdc7068da3f5a6e6da10af

Modified Files
--------------
src/pl/plpgsql/src/Makefile                  |   3 +-
src/pl/plpgsql/src/expected/plpgsql_trap.out | 255 +++++++++++++++++++++++++++
src/pl/plpgsql/src/sql/plpgsql_trap.sql      | 175 ++++++++++++++++++
src/test/regress/expected/plpgsql.out        | 253 --------------------------
src/test/regress/sql/plpgsql.sql             | 173 ------------------
5 files changed, 432 insertions(+), 427 deletions(-)


pgsql-committers by date:

Previous
From: Michael Meskes
Date:
Subject: pgsql: Fix off-by-one check that can lead to a memory overflow inecpg.
Next
From: Tom Lane
Date:
Subject: pgsql: Split up a couple of long-running regression test scripts.