Skip to content

Commit 9ebb964

Browse files
committed
Change the test to polling instead of just a single sleep
- Avoid flakyness due to time it takes to bind a service Signed-off-by: João Pereira <joaod@vmware.com>
1 parent ccfe842 commit 9ebb964

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

integration/v7/isolated/service_command_test.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,11 @@ var _ = Describe("service command", func() {
171171
})
172172

173173
It("displays the bound apps", func() {
174-
//Delay to reduce flakiness
175-
time.Sleep(10 * time.Second)
176-
session := helpers.CF(serviceCommand, serviceInstanceName, "-v")
177-
Eventually(session).Should(Exit(0))
178-
179-
Expect(session).To(SatisfyAll(
174+
Eventually(func() *Session {
175+
session := helpers.CF(serviceCommand, serviceInstanceName, "-v")
176+
Eventually(session).Should(Exit(0))
177+
return session
178+
}).WithPolling(5 * time.Second).WithTimeout(3 * time.Minute).Should(SatisfyAll(
180179
Say(`Showing bound apps:\n`),
181180
Say(`name\s+binding name\s+status\s+message\n`),
182181
Say(`%s\s+%s\s+create succeeded\s*\n`, appName1, bindingName1),

0 commit comments

Comments
 (0)