Repository navigation
Commit 8b5d45a
test: stop integration suites failing on container teardown timeout (#466)
* test: stop integration suites failing on container teardown timeout
Recent CI failures on green code (MariaDB twice, postgres-ssh once) all
read "Hook timed out in 10000ms" at the suite's afterAll. Teardown is
Testcontainers' stop(), i.e. `docker stop -t 0` + `docker rm -v`. The
suites share one Docker daemon, and while Oracle (1.2GB) or SQL Server is
still pulling/extracting its image, removing a sibling container with its
data volume can exceed Vitest's default 10s hookTimeout. Every beforeAll
already carries an explicit 60-360s timeout; afterAll relied on the
default.
- vitest.config.ts: hookTimeout 60s for the integration project.
- IntegrationTestBase.cleanup(): stop the container in a finally so a
disconnect failure can't leak a running container.
- testing skill: document the symptom and cause.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TZPfFnRTrHzHhsCzjrZjgM
* test: narrow the cleanup comment to what finally guarantees
A pending disconnect() never reaches the finally, so the container-stop
guarantee covers thrown errors, not hangs; say so.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TZPfFnRTrHzHhsCzjrZjgM
---------
Co-authored-by: Claude <[email protected]>1 parent 5c3e6e7 commit 8b5d45a
3 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
148 | 158 | | |
149 | 159 | | |
150 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
| |||
0 commit comments