diff --git a/src/code.cloudfoundry.org/inigo/cell/cell_suite_test.go b/src/code.cloudfoundry.org/inigo/cell/cell_suite_test.go index f055c9218e..4e6113d09b 100644 --- a/src/code.cloudfoundry.org/inigo/cell/cell_suite_test.go +++ b/src/code.cloudfoundry.org/inigo/cell/cell_suite_test.go @@ -31,6 +31,9 @@ import ( "code.cloudfoundry.org/inigo/world" ) +const cellSuiteEventuallyTestTimeout = 30 * time.Second +const cellSuiteEventuallyPollingTimeout = 1 * time.Second + var ( componentMaker world.ComponentMaker diff --git a/src/code.cloudfoundry.org/inigo/cell/converger_test.go b/src/code.cloudfoundry.org/inigo/cell/converger_test.go index 64ea69c6b4..0bc3578bce 100644 --- a/src/code.cloudfoundry.org/inigo/cell/converger_test.go +++ b/src/code.cloudfoundry.org/inigo/cell/converger_test.go @@ -221,7 +221,7 @@ var _ = Describe("Convergence to desired state", func() { It("eventually brings it up", func() { Eventually(runningLRPsPoller).Should(HaveLen(1)) - Eventually(helloWorldInstancePoller).Should(Equal([]string{"0"})) + Eventually(helloWorldInstancePoller, cellSuiteEventuallyTestTimeout, cellSuiteEventuallyPollingTimeout).Should(Equal([]string{"0"})) }) }) }) diff --git a/src/code.cloudfoundry.org/inigo/cell/instance_identity_test.go b/src/code.cloudfoundry.org/inigo/cell/instance_identity_test.go index 382cbddde8..16e76fc6b5 100644 --- a/src/code.cloudfoundry.org/inigo/cell/instance_identity_test.go +++ b/src/code.cloudfoundry.org/inigo/cell/instance_identity_test.go @@ -429,7 +429,10 @@ var _ = Describe("InstanceIdentity", func() { JustBeforeEach(func() { err := bbsClient.DesireLRP(lgr, "", lrp) Expect(err).NotTo(HaveOccurred()) - Eventually(helpers.LRPStatePoller(lgr, bbsClient, processGUID, nil)).Should(Equal(models.ActualLRPStateRunning)) + Eventually(func() func() string { + return helpers.LRPStatePoller(lgr, bbsClient, processGUID, nil) + }, + cellSuiteEventuallyTestTimeout, cellSuiteEventuallyPollingTimeout).Should(Equal(models.ActualLRPStateRunning)) address = getContainerInternalAddress(bbsClient, processGUID, 8080, true) }) diff --git a/src/code.cloudfoundry.org/inigo/cell/ssh_test.go b/src/code.cloudfoundry.org/inigo/cell/ssh_test.go index 8b7e225189..08a71cb490 100644 --- a/src/code.cloudfoundry.org/inigo/cell/ssh_test.go +++ b/src/code.cloudfoundry.org/inigo/cell/ssh_test.go @@ -174,9 +174,9 @@ var _ = Describe("SSH", func() { return lrps }).Should(HaveLen(2)) - Eventually( - helpers.LRPInstanceStatePoller(logger, bbsClient, processGuid, 0, nil), - ).Should(Equal(models.ActualLRPStateRunning)) + Eventually(func() func() string { + return helpers.LRPInstanceStatePoller(logger, bbsClient, processGuid, 0, nil) + }, cellSuiteEventuallyTestTimeout, cellSuiteEventuallyPollingTimeout).Should(Equal(models.ActualLRPStateRunning)) Eventually( helpers.LRPInstanceStatePoller(logger, bbsClient, processGuid, 1, nil),