]> granicus.if.org Git - postgresql/commit
Move plpgsql error-trapping tests to a new module-specific test file.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 11 Apr 2019 19:09:18 +0000 (15:09 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 11 Apr 2019 19:09:28 +0000 (15:09 -0400)
commit6726d8d476b424633ebdc7068da3f5a6e6da10af
tree62b2b94752d22255904dc79a4f68e5c96985454c
parented16ba3248d486ec8b2fdfc75e442620d675b617
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
src/pl/plpgsql/src/Makefile
src/pl/plpgsql/src/expected/plpgsql_trap.out [new file with mode: 0644]
src/pl/plpgsql/src/sql/plpgsql_trap.sql [new file with mode: 0644]
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql