Unified · Split
| @@ -147,10 +147,12 @@ scenario( · 146 unmodified lines | ||
| 147 | 147 | const openedSessionIds: string[] = []; |
| 148 | 148 | |
| 149 | 149 | const scenarioBody = Effect.gen(function* () { |
| 150 | − // Open more sessions than the cap allows, at limited concurrency. None | |
| 151 | − // of them run any work, so every one is immediately eviction-eligible — | |
| 152 | − // crossing the cap must pick at least one and tear it down through its | |
| 153 | − // own stub. | |
| 150 | + // Open more sessions than the cap allows. Keep admission sequential: | |
| 151 | + // the cloud e2e database is one serialized PGlite instance, and this | |
| 152 | + // scenario exercises resident eviction rather than concurrent cold | |
| 153 | + // builds. None of the sessions run any work, so every one is immediately | |
| 154 | + // eviction-eligible — crossing the cap must pick at least one and tear it | |
| 155 | + // down through its own stub. | |
| 154 | 156 | const sessionIds = yield* Effect.forEach( |
| 155 | 157 | Array.from({ length: SESSIONS_TO_OPEN }, (_, index) => index), |
| 156 | 158 | (index) => |
| @@ -159,7 +161,7 @@ scenario( · 2 unmodified lines | ||
| 159 | 161 | openedSessionIds.push(sessionId); |
| 160 | 162 | }), |
| 161 | 163 | ), |
| 162 | − { concurrency: 8 }, | |
| 164 | + { concurrency: 1 }, | |
| 163 | 165 | ); |
| 164 | 166 | |
| 165 | 167 | expect(sessionIds.length, "every session opened").toBe(SESSIONS_TO_OPEN); |