Please sign in to comment.
Clean up some tests and fix IsValidTest race condition (#1581)
* test: Add some helpers to TestUtil Adds some helpers to TestUtil to deal with boiler plate of executinga query and disgarding the results, fetching the backend process id, terminating a backend process, and fetching the current transaction state. * test: Clean up IsValidTest Cleans up IsValidTest and removes a race condition when checking whether terminated connections are marked as invalid. Also splits out the transaction state test into three separate ones to better identify what's being tested. * test: Change CopyTest to use TestUtil backend pid helpers This also changes the connection termination to use a non-privileged connection. * test: Change ConnectionPoolTest to use backend pid TestUtil helpers This also changes the pg_terminate_backend(...) call to use a non-privileged connection as a regular user can terminate their own connection. * fix: Use super user to terminate backend processes in tests Older versions of the server (<=9.1) restrict calling pg_terminate_backend(...) to super users so always use that in test helper.
- Loading branch information
Showing with 109 additions and 106 deletions.