Cutting test runtime for src/test/modules/snapshot_too_old
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2022-08-02T15:38:22Z
Lists: pgsql-hackers
Attachments
- remove-useless-test-permutations.patch (text/x-diff) patch
I've complained before that the snapshot_too_old TAP tests seem ridiculously slow --- close to a minute of runtime even on very fast machines. Today I happened to look closer and realized that there's an absolutely trivial way to cut that. The core of the slow runtime is that there's a "pg_sleep(6)" in the test case; which perhaps could be trimmed, but I'm not on about that right now. What I'm on about is that two of the three isolation tests allow the isolationtester to default to running every possible permutation of steps, one of which doesn't even generate the "snapshot too old" failure. IMV it's sufficient to run just one permutation. That opinion was shared by whoever wrote sto_using_hash_index.spec, but they didn't propagate the idea into the other two tests. The attached cuts the test runtime (exclusive of setup) from approximately 30+24+6 seconds to 6+6+6 seconds, and I don't see that it loses us one iota of coverage. I cleaned up some unused tables and bad comment grammar, too. regards, tom lane
Commits
-
Reduce test runtime of src/test/modules/snapshot_too_old.
- e94c52fca6e1 11.17 landed
- c628ca3500af 15.0 landed
- b2694aebe33c 13.8 landed
- 9c92a10f5a98 12.12 landed
- 9820032daa33 10.22 landed
- 8eaa4d0f3dbe 14.5 landed
- 1da0850f0e4e 16.0 landed