Commit caa11b8
Fix flaky VSCode extension E2E tests due to silently ignored timeout option (#19309)
The E2E test suite intermittently failed because `timeoutMs` passed to
`until()` was silently dropped — `retryWhile` looked for `timeout`, not
`timeoutMs` — capping all `until()` waits at the 10s default regardless
of what callers specified. This caused `deploypane` tests (which
intended a 30s webview-ready timeout) to flake whenever CI was slow.
## Changes
- **`src/test/utils/time.ts`**: Rename `timeout` → `timeoutMs` in
`retryWhile`'s options type so it matches the `until()` API:
```ts
// Before — `timeoutMs` from callers was silently ignored
retryOptions?: Readonly<{ interval?: number; timeout?: number }>
// After — consistent naming across retryWhile and until
retryOptions?: Readonly<{ interval?: number; timeoutMs?: number }>
```
- **`deploypane.test.ts`**: Add `jest.setTimeout(60000)` — now that
`timeoutMs: 30000` actually works, the global 20s jest timeout would be
exceeded (2s language server wait + up to 30s webview-ready poll).
- **`visualizer.test.ts`**: Add explicit `timeoutMs: 20000` to all three
`until()` calls (previously relied on the 10s default) and
`jest.setTimeout(30000)` to match.
- **`testReporter.ts`**: Fix the `Tests:` summary line, which was
incorrectly reporting test-suite counts (`numPassedTestSuites` /
`numTotalTestSuites`) instead of individual test counts
(`numPassedTests` / `numTotalTests`).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>1 parent 932191a commit caa11b8
File tree
4 files changed
+12
-3
lines changed- src/vscode-bicep/src/test
- e2e
- utils
4 files changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments