]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Reduce test runtime of src/test/modules/snapshot_too_old.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Aug 2022 15:14:55 +0000 (11:14 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Aug 2022 15:14:55 +0000 (11:14 -0400)
commite94c52fca6e10f227d5635112eb7f11f767f7a8d
treef80fefedbc60ecfd6c71211d97dfd34f955e7b47
parent06f6a07ba465a6c2731697a7548e7be363cf4c57
Reduce test runtime of src/test/modules/snapshot_too_old.

The sto_using_cursor and sto_using_select tests were coded to exercise
every permutation of their test steps, but AFAICS there is no value in
exercising more than one.  This matters because each permutation costs
about six seconds, thanks to the "pg_sleep(6)".  Perhaps we could
reduce that, but the useless permutations seem worth getting rid of
in any case.  (Note that sto_using_hash_index got it right already.)

While here, clean up some other sloppiness such as an unused table.

This doesn't make too much difference in interactive testing, since the
wasted time is typically masked by parallelization with other tests.
However, the buildfarm runs this as a serial step, which means we can
expect to shave ~40 seconds from every buildfarm run.  That makes it
worth back-patching.

Discussion: https://postgr.es/m/2515192.1659454702@sss.pgh.pa.us
src/test/modules/snapshot_too_old/expected/sto_using_cursor.out
src/test/modules/snapshot_too_old/expected/sto_using_select.out
src/test/modules/snapshot_too_old/specs/sto_using_cursor.spec
src/test/modules/snapshot_too_old/specs/sto_using_select.spec