diff --git a/integration/v7/isolated/service_command_test.go b/integration/v7/isolated/service_command_test.go index c2f1c340c8a..c58da086523 100644 --- a/integration/v7/isolated/service_command_test.go +++ b/integration/v7/isolated/service_command_test.go @@ -171,17 +171,16 @@ var _ = Describe("service command", func() { }) It("displays the bound apps", func() { - //Delay to reduce flakiness - time.Sleep(10 * time.Second) - session := helpers.CF(serviceCommand, serviceInstanceName, "-v") - Eventually(session).Should(Exit(0)) - - Expect(session).To(SatisfyAll( - Say(`Showing bound apps:\n`), - Say(`name\s+binding name\s+status\s+message\n`), - Say(`%s\s+%s\s+create succeeded\s*\n`, appName1, bindingName1), - Say(`%s\s+%s\s+create succeeded\s*\n`, appName2, bindingName2), - )) + Eventually(func(g Gomega) { + session := helpers.CF(serviceCommand, serviceInstanceName, "-v") + g.Eventually(session).Should(Exit(0)) + g.Eventually(session).Should(SatisfyAll( + Say(`Showing bound apps:\n`), + Say(`name\s+binding name\s+status\s+message\n`), + Say(`%s\s+%s\s+create succeeded\s*\n`, appName1, bindingName1), + Say(`%s\s+%s\s+create succeeded\s*\n`, appName2, bindingName2), + )) + }).WithPolling(5 * time.Second).WithTimeout(3 * time.Minute).Should(Succeed()) }) })