Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
- We're dependent on APIServer + our countroller resolving this stamp
  in under a second, which just doesn't always happen.

Co-authored-by: Emily Johnson <emjohnson@vmware.com>
  • Loading branch information
Rasheed Abdul-Aziz and emmjohnson committed Nov 9, 2021
1 parent e730a04 commit 7482de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/runnable/runnable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ var _ = Describe("Stamping a resource on Runnable Creation", func() {
Eventually(func() (int, error) {
err := c.List(ctx, resourceList, &client.ListOptions{Namespace: testNS})
return len(resourceList.Items), err
}).Should(Equal(2))
}, "3s").Should(Equal(2))

Consistently(func() (int, error) {
err := c.List(ctx, resourceList, &client.ListOptions{Namespace: testNS})
return len(resourceList.Items), err
}, "2s").Should(BeNumerically("<=", 2))
}, "2s").Should(Equal(2))

Expect(resourceList.Items[0].Name).To(ContainSubstring("my-stamped-resource-"))
Expect(resourceList.Items[1].Name).To(ContainSubstring("my-stamped-resource-"))
Expand Down

0 comments on commit 7482de3

Please sign in to comment.