Skip to content

Commit ed03239

Browse files
committed
Increase E2E test timeouts to handle resource contention
Increase default Eventually timeout from 2 to 10 minutes for function deployment tests to handle resource contention during concurrent S2I builds with middleware updates in CI environments. With multiple parallel test configurations, builds can take 6-7 minutes due to competing for limited CPU/memory/disk/network resources on GitHub runners.
1 parent 28ef725 commit ed03239

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

test/e2e/func_deploy_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func functionNotDeployed(functionName, functionNamespace string) func(g Gomega)
126126

127127
var _ = Describe("Operator", func() {
128128

129-
SetDefaultEventuallyTimeout(2 * time.Minute)
129+
SetDefaultEventuallyTimeout(10 * time.Minute)
130130
SetDefaultEventuallyPollingInterval(time.Second)
131131

132132
Context("with a deployed function", func() {
@@ -198,8 +198,7 @@ var _ = Describe("Operator", func() {
198198

199199
functionName = function.Name
200200

201-
// redeploy could take a bit longer therefore give a bit more time
202-
Eventually(functionBecomesReady(functionName, functionNamespace), 6*time.Minute).Should(Succeed())
201+
Eventually(functionBecomesReady(functionName, functionNamespace)).Should(Succeed())
203202
})
204203
})
205204
Context("with a function in a subdirectory in a monorepo", func() {
@@ -280,8 +279,7 @@ var _ = Describe("Operator", func() {
280279

281280
functionName = function.Name
282281

283-
// redeploy could take a bit longer therefore give a bit more time
284-
Eventually(functionBecomesReady(functionName, functionNamespace), 6*time.Minute).Should(Succeed())
282+
Eventually(functionBecomesReady(functionName, functionNamespace)).Should(Succeed())
285283
})
286284
})
287285
Context("with a not yet deployed function", func() {
@@ -439,7 +437,7 @@ var _ = Describe("Operator", func() {
439437

440438
functionName = function.Name
441439

442-
Eventually(functionBecomesReady(functionName, functionNamespace), 6*time.Minute).Should(Succeed())
440+
Eventually(functionBecomesReady(functionName, functionNamespace)).Should(Succeed())
443441
})
444442

445443
It("should fail with authentication error when authSecretRef is not provided", func() {
@@ -506,7 +504,7 @@ var _ = Describe("Operator", func() {
506504

507505
functionName = function.Name
508506

509-
Eventually(functionBecomesReady(functionName, functionNamespace), 6*time.Minute).Should(Succeed())
507+
Eventually(functionBecomesReady(functionName, functionNamespace)).Should(Succeed())
510508
})
511509

512510
It("should fail with authentication error when authSecretRef is not provided", func() {

test/e2e/func_middleware_update_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939

4040
var _ = Describe("Middleware Update", func() {
4141

42-
SetDefaultEventuallyTimeout(2 * time.Minute)
42+
SetDefaultEventuallyTimeout(10 * time.Minute)
4343
SetDefaultEventuallyPollingInterval(time.Second)
4444

4545
Context("with a function deployed using old func CLI", func() {
@@ -193,8 +193,7 @@ var _ = Describe("Middleware Update", func() {
193193

194194
functionName = fn.Name
195195

196-
// Middleware update could take a bit longer therefore give more time
197-
Eventually(functionBecomesReady(functionName, functionNamespace), 6*time.Minute).Should(Succeed())
196+
Eventually(functionBecomesReady(functionName, functionNamespace)).Should(Succeed())
198197

199198
// Verify middleware was actually updated by inspecting the new image
200199
out, err = utils.RunFunc("describe", deployedFunctionName, "-n", functionNamespace, "-o", "yaml")
@@ -457,7 +456,7 @@ var _ = Describe("Middleware Update", func() {
457456
}
458457
}
459458
g.Expect(false).To(BeTrue(), "MiddlewareUpToDate condition not found")
460-
}, 5*time.Minute).Should(Succeed())
459+
}).Should(Succeed())
461460

462461
Eventually(functionBecomesReady(functionName, functionNamespace)).Should(Succeed())
463462
})

0 commit comments

Comments
 (0)