Skip to content

Commit fa9299f

Browse files
Merge pull request #1563 from stuggi/fix_watcher_test
[test] Fix race condition in watcher disable test
2 parents fc9c4c2 + 4c2b8d5 commit fa9299f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/functional/ctlplane/openstackoperator_controller_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,9 +2257,11 @@ var _ = Describe("OpenStackOperator controller", func() {
22572257
g.Expect(watcher).Should(Not(BeNil()))
22582258
}, timeout, interval).Should(Succeed())
22592259

2260-
OSCtlplane := GetOpenStackControlPlane(names.OpenStackControlplaneName)
2261-
OSCtlplane.Spec.Watcher.Enabled = false
2262-
Expect(th.K8sClient.Update(th.Ctx, OSCtlplane)).Should(Succeed())
2260+
Eventually(func(g Gomega) {
2261+
OSCtlplane := GetOpenStackControlPlane(names.OpenStackControlplaneName)
2262+
OSCtlplane.Spec.Watcher.Enabled = false
2263+
g.Expect(th.K8sClient.Update(th.Ctx, OSCtlplane)).Should(Succeed())
2264+
}, timeout, interval).Should(Succeed())
22632265

22642266
Eventually(func(g Gomega) {
22652267
instance := &watcherv1.Watcher{}

0 commit comments

Comments
 (0)