Commit 4d9aa84
authored
Stabilize flaky host-selfhost integration tests (#1208)
These suites each boot a full self-host app graph and drive it over the
in-memory handler; scope-isolation additionally fired 48 unbounded concurrent
requests through the single shared libSQL connection. Run in parallel forks
sized to the core count, many heavy boots oversubscribe the CPU and starve the
event loop, so an in-flight request stalls and the test times out. Which file
loses the race is nondeterministic, which is what showed up as CI flakiness.
Bound both sources of concurrency rather than leaning on timing:
- vitest.config: cap the fork pool at 2 and raise the test/hook timeouts to
30s, so the package stays parallel but never oversubscribes regardless of how
many cores the machine has (a many-core dev box oversubscribes harder than a
4-vCPU CI runner).
- scope-isolation: read the 6 identities back in bounded rounds (6 in flight,
repeated) instead of a 48-wide burst. Same 48 reads and the same disjointness
assertions, without piling 48 fibers onto the one serialized connection.
Verified green across repeated full-suite runs under heavy local load.1 parent c8d9b9d commit 4d9aa84
2 files changed
Lines changed: 53 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| |||
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
110 | 126 | | |
111 | | - | |
112 | | - | |
| 127 | + | |
| 128 | + | |
113 | 129 | | |
114 | 130 | | |
115 | | - | |
116 | | - | |
| 131 | + | |
| 132 | + | |
117 | 133 | | |
118 | 134 | | |
119 | | - | |
| 135 | + | |
120 | 136 | | |
121 | 137 | | |
122 | | - | |
| 138 | + | |
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
7 | 32 | | |
8 | 33 | | |
0 commit comments