Skip to content

Commit

Permalink
Extend timeouts on flaky tests
Browse files Browse the repository at this point in the history
These tests are flaky on the minimum K8s version:
- operator policy compliance check
- alternative kubeconfig in hosted mode

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
  • Loading branch information
dhaiducek committed Jan 24, 2024
1 parent 5c2c5a8 commit 2bd73a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/e2e/case21_alternative_kubeconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var _ = Describe("Test an alternative kubeconfig for policy evaluation", Ordered
)

return utils.GetComplianceState(managedPlc)
}, defaultTimeoutSeconds, 1).Should(Equal("Compliant"))
}, defaultTimeoutSeconds*2, 1).Should(Equal("Compliant"))

By("Verifying that the " + policyName + " was created using the alternative kubeconfig")
_, err := targetK8sClient.CoreV1().Namespaces().Get(context.TODO(), namespaceName, metav1.GetOptions{})
Expand Down
8 changes: 5 additions & 3 deletions test/e2e/case38_install_operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ var _ = Describe("Test installing an operator from OperatorPolicy", Ordered, fun
})

It("Should become Compliant", func() {
OpPlc := utils.GetWithTimeout(clientManagedDynamic, gvrOperatorPolicy,
case38OpPolicyDefaultOgName, case38OpPolicyDefaultOgNS, true, defaultTimeoutSeconds)
Eventually(func() interface{} {
OpPlc := utils.GetWithTimeout(clientManagedDynamic, gvrOperatorPolicy,
case38OpPolicyDefaultOgName, case38OpPolicyDefaultOgNS, true, defaultTimeoutSeconds)

Expect(utils.GetComplianceState(OpPlc)).To(Equal("Compliant"))
return utils.GetComplianceState(OpPlc)
}, defaultTimeoutSeconds, 1).Should(Equal("Compliant"))
})

It("Should have installed the operator", func() {
Expand Down

0 comments on commit 2bd73a2

Please sign in to comment.