e2e: Consolidate opt-in/opt-out handling to prevent flakes#576
Conversation
tests sometimes fail when switching from opt-in to opt-out because it takes time for the k8s API to eventually consist the new labels behavior. In some places there is a sleep wait. Instead, add optInNamespaceForVMs() and optOutNamespaceForVMs() wrappers that perform the opt-mode change, wait for webhook configuration propagation using Eventually(). Replace sleep() calls throughout tests. Signed-off-by: Ram Lavi <ralavi@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qinqon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-0.49 |
|
@RamLavi: #576 failed to apply on top of branch "release-0.47": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cherry-pick release-0.49 |
|
@RamLavi: #576 failed to apply on top of branch "release-0.49": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What this PR does / why we need it:
tests sometimes fail when switching from opt-in to opt-out because it takes time for the k8s API to eventually consist the new labels behavior.
In some places there is an ugly sleep wait.
Instead, add optInNamespaceForVMs() and optOutNamespaceForVMs() wrappers that perform the opt-mode change, wait for webhook configuration propagation using Eventually().
Replace sleep() calls throughout tests.
Special notes for your reviewer:
Release note: