|
4 | 4 | "context"
|
5 | 5 | "encoding/json"
|
6 | 6 | "fmt"
|
| 7 | + "time" |
7 | 8 |
|
8 | 9 | "github.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift/pkg/plugin"
|
9 | 10 | "github.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift/tests/fixtures"
|
@@ -248,12 +249,17 @@ var _ = Describe("OpenShift Route Traffic Plugin Tests", func() {
|
248 | 249 | Eventually(routeA, "20s", "1s").Should(routeFixture.HaveWeights(50, 50))
|
249 | 250 | Eventually(routeB, "20s", "1s").Should(routeFixture.HaveWeights(50, 50))
|
250 | 251 |
|
| 252 | + // There is a race condition in Rollouts where a call to PromoteRollout too quickly will cause 'Rollout phase mismatch, got Paused, want Healthy' |
| 253 | + // I don't see a way to know when it's possible to promote the Rollout, so for now just wait X seconds |
| 254 | + Eventually(rollout, "30s", "5s").Should(rolloutFixture.HaveExpectedObservedGeneration()) |
| 255 | + time.Sleep(10 * time.Second) |
| 256 | + |
251 | 257 | By("promote the Rollout for the final time and verify if the previous version is removed")
|
252 | 258 | rollout, err = promote.PromoteRollout(rolloutClient.ArgoprojV1alpha1().Rollouts(namespace),
|
253 | 259 | rolloutName, false, false, false)
|
254 | 260 | Expect(err).ToNot(HaveOccurred())
|
255 | 261 |
|
256 |
| - Eventually(rollout, "30s", "1s").Should(rolloutFixture.HavePhase(rolloutsv1alpha1.RolloutPhaseHealthy)) |
| 262 | + Eventually(rollout, "2m", "5s").Should(rolloutFixture.HavePhase(rolloutsv1alpha1.RolloutPhaseHealthy)) |
257 | 263 |
|
258 | 264 | By("verify if the traffic weight is updated in the Route")
|
259 | 265 | Eventually(routeA, "20s", "1s").Should(routeFixture.HaveWeights(100, 0))
|
|
0 commit comments