forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stmtdiagnostics: de-flake TestDiagnosticsRequest for good
This commit - hopefully - de-flakes TestDiagnosticsRequest for good. In particular, we recently merged a change to remove the request from the local registry _before_ inserting the bundle. This introduced a possible race between the bundle being inserted (which also marks the request as "completed") and the polling mechanism of the registry to populate itself: if the polling happens to happen before the request is marked as "completed", then the request will be reinserted into the registry which then fails the test (because it'll observe later than the request is complete, yet the request is still in the registry). To prevent flakes of this kind the test now disables the polling mechanism of the registry altogether - I don't think it is necessary since the test is manually inserting requests directly into the registry (in addition to writing them into the system table). I believe this polling mechanism was the reason for why we had to use SucceedsSoon in one of the test cases, so disabling the mechanism allows us to address an old TODO. (I believe what was happening rarely was that the request was canceled by the test case - which removes it from the registry, but then before the query is executed, the polling takes place, so the request is reinserted into the registry.) Release note: None
- Loading branch information
1 parent
049c29a
commit 8973610
Showing
1 changed file
with
34 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters