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