forked from antrea-io/antrea
-
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.
Fix possible race condition in SelfSignedCertProvider tests (antrea-i…
…o#6166) I have seen some cases in Github CI where it took slightly over 2 seconds for the Secret update to be processed in TestSelfSignedCertProviderRotate. The test ended up failing. The most likely cause is the well-known race condition between List and Watch for informers when using the fake client. If the Secret Update happens concurrently with the Informer starting, right between the List and the Watch operations, we may lose the Update event. We call WaitForCacheSync to avoid race conditions. To be more conservative, we also increase the wait duration for assertions to 5 seconds. Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information
1 parent
b9e19f4
commit 62bfd6b
Showing
2 changed files
with
11 additions
and
3 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
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