Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/testutil/testutil_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ var _ = Describe("WaitForVMRunning", func() {
namespace = testutil.UniqueNamespace("wait-test")
err := testutil.EnsureTestNamespace(ctx, c, namespace)
Expect(err).NotTo(HaveOccurred())

// Warm the KubeVirt API discovery cache so timing assertions
// aren't skewed by first-call REST mapping overhead.
_ = testutil.WaitForVMRunning(ctx, c, "warmup", namespace, 1*time.Second)
})

AfterEach(func() {
Expand All @@ -166,7 +170,7 @@ var _ = Describe("WaitForVMRunning", func() {

Expect(err).To(HaveOccurred())
Expect(elapsed).To(BeNumerically(">=", 1*time.Second))
Expect(elapsed).To(BeNumerically("<", 3*time.Second))
Expect(elapsed).To(BeNumerically("<", 5*time.Second))
})
})
})
Loading