Commit e1dc613
committed
Fix Eventually timeout race condition in parallel test execution
Move SetDefaultEventuallyTimeout from individual Describe blocks to
BeforeSuite to fix timeout race condition.
Root cause: When tests run in parallel with `-p`, all test files execute
in the same process. SetDefaultEventuallyTimeout is global to Gomega, so
whichever Describe block runs last overwrites the timeout for all tests.
The sequence was:
1. func_deploy_test.go sets timeout to 10 minutes
2. metrics_test.go sets timeout to 2 minutes (120 seconds)
3. All subsequent tests use 2 minutes, causing deployment tests to timeout
Solution: Set timeout once globally in BeforeSuite before any Describe
blocks execute. This ensures a consistent 10 minute timeout for all tests.
Removed redundant timeout settings from:
- test/e2e/func_deploy_test.go (10 min)
- test/e2e/func_middleware_update_test.go (10 min)
- test/e2e/bundle_test.go (5 min)
- test/e2e/metrics_test.go (2 min - the culprit)1 parent 665901d commit e1dc613
5 files changed
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 82 | | |
86 | 83 | | |
87 | 84 | | |
| |||
0 commit comments