Skip to content

Commit

Permalink
test(trial): add wait interval.
Browse files Browse the repository at this point in the history
Signed-off-by: Electronic-Waste <[email protected]>
  • Loading branch information
Electronic-Waste committed Aug 30, 2024
1 parent 2d3fe0d commit 7c426f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller.v1beta1/trial/trial_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const (
batchJobName = "test-job"
objectiveMetric = "accuracy"
timeout = time.Second * 80
waitInterval = time.Second * 3
)

var trialKey = types.NamespacedName{Name: trialName, Namespace: namespace}
Expand Down Expand Up @@ -314,6 +315,7 @@ func TestReconcileBatchJob(t *testing.T) {
}, timeout).Should(gomega.BeTrue())

// Delete the Trial
time.Sleep(waitInterval)
g.Expect(c.Delete(ctx, trial)).NotTo(gomega.HaveOccurred())

// Expect that Trial is deleted
Expand Down Expand Up @@ -347,6 +349,7 @@ func TestReconcileBatchJob(t *testing.T) {
}, timeout).Should(gomega.BeTrue())

// Delete the Trial
time.Sleep(waitInterval)
g.Expect(c.Delete(ctx, trial)).NotTo(gomega.HaveOccurred())

// Expect that Trial is deleted
Expand Down Expand Up @@ -385,6 +388,7 @@ func TestReconcileBatchJob(t *testing.T) {
}, timeout).Should(gomega.BeTrue())

// Delete the Trial
time.Sleep(waitInterval)
g.Expect(c.Delete(ctx, trial)).NotTo(gomega.HaveOccurred())

// Expect that Trial is deleted
Expand Down

0 comments on commit 7c426f7

Please sign in to comment.