Skip to content

Commit

Permalink
Replace Sleep in new multiport service experiment
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Del Rio <daniel.delrio@getyourguide.com>
  • Loading branch information
daniddelrio committed Feb 9, 2023
1 parent 7b2a96a commit 96a9313
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/experiment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ func (s *ExperimentSuite) TestExperimentWithMultiportServiceAndScaleDownDelay()
g.ApplyManifests("@functional/experiment-with-multiport-service.yaml")
g.When().
WaitForExperimentPhase("experiment-with-multiport-service", "Running").
Sleep(time.Second*5).
WaitForExperimentCondition("experiment-with-multiport-service", func(ex *rov1.Experiment) bool {
return s.GetReplicaSetFromExperiment(ex, "test").Status.Replicas == 1
}, "number-of-rs-pods-meet", fixtures.E2EWaitTimeout).
Then().
ExpectExperimentTemplateReplicaSetNumReplicas("experiment-with-multiport-service", "test", 1).
ExpectExperimentServiceCount("experiment-with-multiport-service", 1).
When().
WaitForExperimentPhase("experiment-with-multiport-service", "Successful").
Sleep(time.Second*15).
WaitForExperimentCondition("experiment-with-multiport-service", func(ex *rov1.Experiment) bool {
return s.GetReplicaSetFromExperiment(ex, "test").Status.Replicas == 0
}, "number-of-rs-pods-meet", fixtures.E2EWaitTimeout).
Then().
ExpectExperimentTemplateReplicaSetNumReplicas("experiment-with-multiport-service", "test", 0).
ExpectExperimentServiceCount("experiment-with-multiport-service", 0)
Expand Down

0 comments on commit 96a9313

Please sign in to comment.