Skip to content

Commit d6c70d8

Browse files
committed
Use default timeout of 6 minutes and shorter custom timeout for metrics tests
1 parent e1dc613 commit d6c70d8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

test/e2e/e2e_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var _ = BeforeSuite(func() {
5454

5555
// Set global timeout for Eventually assertions
5656
// Must be set here (not in Describe blocks) to avoid race conditions in parallel execution
57-
SetDefaultEventuallyTimeout(10 * time.Minute)
57+
SetDefaultEventuallyTimeout(6 * time.Minute)
5858
SetDefaultEventuallyPollingInterval(1 * time.Second)
5959

6060
// Register the Function API scheme

test/e2e/metrics_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ var _ = Describe("Manager", func() {
110110
g.Expect(err).NotTo(HaveOccurred())
111111
g.Expect(output).To(Equal("Running"), "Incorrect controller-manager pod status")
112112
}
113-
Eventually(verifyControllerUp).Should(Succeed())
113+
Eventually(verifyControllerUp, 2*time.Minute).Should(Succeed())
114114
})
115115

116116
It("should run successfully", func() {
@@ -134,7 +134,7 @@ var _ = Describe("Manager", func() {
134134
g.Expect(err).NotTo(HaveOccurred())
135135
g.Expect(output).To(ContainSubstring(metricsPort), "Metrics endpoint is not ready")
136136
}
137-
Eventually(verifyMetricsEndpointReady).Should(Succeed())
137+
Eventually(verifyMetricsEndpointReady, 2*time.Minute).Should(Succeed())
138138

139139
By("verifying that the controller manager is serving the metrics server")
140140
verifyMetricsServerStarted := func(g Gomega) {
@@ -144,7 +144,7 @@ var _ = Describe("Manager", func() {
144144
g.Expect(output).To(ContainSubstring("controller-runtime.metrics\tServing metrics server"),
145145
"Metrics server not yet started")
146146
}
147-
Eventually(verifyMetricsServerStarted).Should(Succeed())
147+
Eventually(verifyMetricsServerStarted, 2*time.Minute).Should(Succeed())
148148

149149
By("creating the curl-metrics pod to access the metrics endpoint")
150150
cmd = exec.Command("kubectl", "run", curlMetricPodName, "--restart=Never",

0 commit comments

Comments
 (0)