Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sqlccl: de-flake TestActiveCancelSession
This commit fixes a possible race in `TestActiveCancelSession`. In particular, that test uses two connections in the following manner: - conn1 runs `pg_sleep` query that is intended to run forever - conn2 executes `CANCEL SESSION` for conn1. Since `pg_sleep` query is executed in a separate goroutine, previously it was possible for CANCEL SESSION statement to be issued before either the separate goroutine was spun up or it began executing the `pg_sleep` query, and in both cases this would result in `connection reset by peer` error which is not what the test expects. This race is now fixed by blocking conn2 until it sees the `pg_sleep` query in the SHOW CLUSTER QUERIES output. Release note: None
- Loading branch information