fix: give eventually more time in stronger adverse conditions
@@ -27,11 +27,19 @@ var _ = Describe("Bounds between Apps & Services", func() {
Expect(err).ToNot(HaveOccurred(), out)
Expect(out).To(MatchRegexp(serviceName + `.*` + appName))
+ // The next check uses `Eventually` because binding the
+ // service to the app forces a restart of the app's
+ // pod. It takes the system some time to terminate the
+ // old pod, and spin up the new, during which `app list`
+ // will return inconsistent results about the desired
+ // and actual number of instances. We wait for the
+ // system to settle back into a normal state.
+
Eventually(func() string {
out, err = Epinio("app list", "")
Expect(err).ToNot(HaveOccurred(), out)
return out
- }, "1m").Should(MatchRegexp(appName + `.*\|.*1\/1.*\|.*` + serviceName))
+ }, "5m").Should(MatchRegexp(appName + `.*\|.*1\/1.*\|.*` + serviceName))
})
AfterEach(func() {
// Delete app first, as this also unbinds the service
