Commit 09bed8e
committed
envd: fix a flaky unit test
This commit unflakes a unit test (previously `test_github_12951`, now
renamed to match the current database-issues numbers).
The test would start a subscribe, then drop the subscribe's cluster,
then cancel the subscribe. This was necessary because adapter used to
not abort subscribes when their cluster was dropped. Without canceling
the subscribe, it would simply hang forever.
We since fixed this behavior, so now the subscribe is canceled when its
cluster is dropped, making the cancellation unnecessary. What's worse,
the cancellation now also makes the test flaky. The postgres client
issues the cancellation by spawning a new thread, creating a new
database connection, and issuing a cancel request on that connection.
It does not wait for the cancellation to be successful. So in the test,
an arbitrary query following the subscribe could be canceled, causing
the test to fail.
The fix is to remove the cancellation request, as it's not needed
anymore.1 parent 8736312 commit 09bed8e
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1589 | 1589 | | |
1590 | 1590 | | |
1591 | 1591 | | |
| 1592 | + | |
1592 | 1593 | | |
1593 | | - | |
| 1594 | + | |
1594 | 1595 | | |
1595 | 1596 | | |
1596 | 1597 | | |
1597 | 1598 | | |
1598 | 1599 | | |
1599 | 1600 | | |
1600 | | - | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | 1603 | | |
| |||
1610 | 1610 | | |
1611 | 1611 | | |
1612 | 1612 | | |
1613 | | - | |
1614 | 1613 | | |
1615 | 1614 | | |
1616 | 1615 | | |
| |||
0 commit comments