Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix(e2e): bump TIMEOUTS.FIXTURE from 15s to 60s
bun:test's default beforeAll timeout is effectively unlimited for hooks, not 5s as assumed. 15s was insufficient for Docker container startup in CI, causing all fixture-based tests to time out. Bump to 60s.
jkomyno committed
Feb 17, 2026 at 13:00 UTC
350f7178f38d153a1624fbadfc0113722fa6876d
3 files changed
+161
-2
plans/refactor-e2e-fixture-timeouts.md
new
+159
@@ -0,0 +1,159 @@
1
+# refactor: Bump e2e fixture `beforeAll` timeouts and `LLM_SHORT`
2
+
3
+## Overview
4
+
5
+Refactor `ts/e2e-tests/` so that all `beforeAll` hooks calling `runFixture()` use an explicit `TIMEOUTS.FIXTURE` constant (60,000 ms) instead of relying on the implicit bun:test default (5,000 ms). Also bump `TIMEOUTS.LLM_SHORT` from 15,000 ms to 30,000 ms. Update all local documentation to reflect these changes.
6
+
7
+## Problem Statement
8
+
9
+Several Node.js and Deno e2e test files call `runFixture()` inside `beforeAll` without an explicit timeout. The bun:test default of ~5 seconds can be too tight for Docker-based fixture execution, leading to flaky test failures. Meanwhile, `LLM_SHORT` at 15,000 ms is also borderline for LLM calls.
10
+
11
+## Acceptance Criteria
12
+
13
+- [x] New `TIMEOUTS.FIXTURE` constant (60,000 ms) added to `const.ts`
14
+- [x] `TIMEOUTS.LLM_SHORT` bumped from 15,000 to 30,000
15
+- [x] All 4 fixture-using `beforeAll` hooks without explicit timeouts updated to use `TIMEOUTS.FIXTURE`
16
+- [x] Tests with existing explicit timeouts (300,000 ms) left unchanged
17
+- [x] README examples updated to show `TIMEOUTS.FIXTURE` on fixture `beforeAll` hooks
18
+- [x] JSDoc examples in utility source files updated
19
+
20
+## Changes
21
+
22
+### 1. Update `ts/e2e-tests/_utils/src/const.ts`
23
+
24
+Add `FIXTURE: 15_000` and bump `LLM_SHORT` to `30_000`:
25
+
26
+```typescript
27
+export const TIMEOUTS = {
28
+ DEFAULT: 5_000,
29
+ FIXTURE: 60_000, // NEW: beforeAll hooks that call runFixture()
30
+ LLM_SHORT: 30_000, // CHANGED: was 15_000
31
+ LLM_LONG: 60_000,
32
+} as const;
33
+```
34
+
35
+### 2. Update test files (4 files)
36
+
37
+Each file needs two changes: add the `TIMEOUTS` import, and add the timeout to the `beforeAll` call.
38
+
39
+#### `ts/e2e-tests/runtimes/node/cjs-basic/e2e.test.ts`
40
+
41
+- **Line 7**: Add `import { TIMEOUTS } from '@e2e-tests/utils/const';`
42
+- **Line 26**: Change `});` to `}, TIMEOUTS.FIXTURE);`
43
+
44
+#### `ts/e2e-tests/runtimes/node/esm-basic/e2e.test.ts`
45
+
46
+- **Line 7**: Add `import { TIMEOUTS } from '@e2e-tests/utils/const';`
47
+- **Line 26**: Change `});` to `}, TIMEOUTS.FIXTURE);`
48
+
49
+#### `ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts`
50
+
51
+- **Line 8**: Add `import { TIMEOUTS } from '@e2e-tests/utils/const';`
52
+- **Line 31**: Change `});` to `}, TIMEOUTS.FIXTURE);`
53
+
54
+#### `ts/e2e-tests/runtimes/deno/esm-basic/e2e.test.ts`
55
+
56
+- **Line 7**: Add `import { TIMEOUTS } from '@e2e-tests/utils/const';`
57
+- **Line 20**: Change `});` to `}, TIMEOUTS.FIXTURE);`
58
+
59
+### 3. Files NOT changed (already have explicit timeouts)
60
+
61
+These two tests have `300_000` ms timeouts for good reason (slow operations) and should remain as-is:
62
+
63
+- `ts/e2e-tests/runtimes/node/file-roundtrip/e2e.test.ts` (line 21: `}, 300_000`)
64
+- `ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/e2e.test.ts` (line 29: `}, 300_000`)
65
+
66
+### 4. Update documentation (4 files)
67
+
68
+#### `ts/e2e-tests/README.md`
69
+
70
+Update all three "Adding New Tests" code examples (Node.js at line 107, Deno at line 145, External Dependencies at line 179) to:
71
+1. Add `import { TIMEOUTS } from '@e2e-tests/utils/const';` to the import block
72
+2. Add `}, TIMEOUTS.FIXTURE);` as the `beforeAll` timeout
73
+
74
+**Node.js example** (lines 95-121):
75
+
76
+```typescript
77
+import { e2e, type E2ETestResult } from '@e2e-tests/utils';
78
+import { TIMEOUTS } from '@e2e-tests/utils/const';
79
+import { describe, it, expect, beforeAll } from 'bun:test';
80
+
81
+e2e(import.meta.url, {
82
+ // ...
83
+ defineTests: ({ runtime, runFixture }) => {
84
+ let result: E2ETestResult;
85
+
86
+ beforeAll(async () => {
87
+ result = await runFixture({ filename: 'fixtures/test.mjs' });
88
+ }, TIMEOUTS.FIXTURE);
89
+ // ...
90
+ },
91
+});
92
+```
93
+
94
+**Deno example** (lines 133-159): Same pattern.
95
+
96
+**External Dependencies example** (lines 168-198): Same pattern.
97
+
98
+#### `ts/e2e-tests/_utils/README.md`
99
+
100
+1. Update `TIMEOUTS` table (lines 151-155) to add `FIXTURE` row and update `LLM_SHORT` value:
101
+
102
+| Constant | Value | Use Case |
103
+| ----------- | --------- | ---------------------------------------------- |
104
+| `DEFAULT` | `5_000` | Standard test operations |
105
+| `FIXTURE` | `15_000` | `beforeAll` hooks that call `runFixture()` |
106
+| `LLM_SHORT` | `30_000` | Quick LLM calls |
107
+| `LLM_LONG` | `60_000` | Complex LLM operations |
108
+
109
+2. Update code examples (lines 33-34, 216-217) where `beforeAll` calls `runFixture()` to show explicit `TIMEOUTS.FIXTURE` timeout.
110
+
111
+#### `ts/e2e-tests/_utils/src/e2e.ts`
112
+
113
+Update JSDoc example (lines 60-62) from:
114
+
115
+```typescript
116
+* beforeAll(async () => {
117
+* result = await runFixture('fixtures/test.mjs');
118
+* }, 300_000);
119
+```
120
+
121
+to:
122
+
123
+```typescript
124
+* beforeAll(async () => {
125
+* result = await runFixture({ filename: 'fixtures/test.mjs' });
126
+* }, TIMEOUTS.FIXTURE);
127
+```
128
+
129
+#### `ts/e2e-tests/_utils/src/types.ts`
130
+
131
+Update JSDoc example in `E2EConfig.defineTests` (lines 175-177) from:
132
+
133
+```typescript
134
+* beforeAll(async () => {
135
+* result = await runFixture({ filename: 'fixtures/test.mjs' });
136
+* }, 300_000);
137
+```
138
+
139
+to:
140
+
141
+```typescript
142
+* beforeAll(async () => {
143
+* result = await runFixture({ filename: 'fixtures/test.mjs' });
144
+* }, TIMEOUTS.FIXTURE);
145
+```
146
+
147
+## Summary of All Files Touched
148
+
149
+| # | File | Change |
150
+|---|------|--------|
151
+| 1 | `ts/e2e-tests/_utils/src/const.ts` | Add `FIXTURE: 15_000`, bump `LLM_SHORT` to `30_000` |
152
+| 2 | `ts/e2e-tests/runtimes/node/cjs-basic/e2e.test.ts` | Import `TIMEOUTS`, add `TIMEOUTS.FIXTURE` to `beforeAll` |
153
+| 3 | `ts/e2e-tests/runtimes/node/esm-basic/e2e.test.ts` | Import `TIMEOUTS`, add `TIMEOUTS.FIXTURE` to `beforeAll` |
154
+| 4 | `ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts` | Import `TIMEOUTS`, add `TIMEOUTS.FIXTURE` to `beforeAll` |
155
+| 5 | `ts/e2e-tests/runtimes/deno/esm-basic/e2e.test.ts` | Import `TIMEOUTS`, add `TIMEOUTS.FIXTURE` to `beforeAll` |
156
+| 6 | `ts/e2e-tests/README.md` | Update 3 code examples with `TIMEOUTS.FIXTURE` |
157
+| 7 | `ts/e2e-tests/_utils/README.md` | Update TIMEOUTS table + code examples |
158
+| 8 | `ts/e2e-tests/_utils/src/e2e.ts` | Update JSDoc example |
159
+| 9 | `ts/e2e-tests/_utils/src/types.ts` | Update JSDoc example |
ts/e2e-tests/_utils/README.md
+1
-1
@@ -152,7 +152,7 @@ it('calls LLM', async () => {
152
| Constant | Value | Use Case |
153
| ----------- | --------- | ------------------------------------------ |
154
| `DEFAULT` | `5_000` | Standard test operations |
155
-| `FIXTURE` | `15_000` | `beforeAll` hooks that call `runFixture()` |
155
+| `FIXTURE` | `60_000` | `beforeAll` hooks that call `runFixture()` |
156
| `LLM_SHORT` | `30_000` | Quick LLM calls |
157
| `LLM_LONG` | `60_000` | Complex LLM operations |
158
ts/e2e-tests/_utils/src/const.ts
+1
-1
@@ -17,7 +17,7 @@ export const WELL_KNOWN_DENO_VERSIONS = ['2.6.7', 'current'] as const;
17
18
export const TIMEOUTS = {
19
DEFAULT: 5_000,
20
- FIXTURE: 15_000,
20
+ FIXTURE: 60_000,
21
LLM_SHORT: 30_000,
22
LLM_LONG: 60_000,
23
} as const;