History

Stabilize cloud session cap E2E

Rhys Sullivan committed 2 months ago

Commit c8f7f1d1 parent 507af7b1 file · +7 −5Browse files

Unified · Split

e2e/cloud/mcp-session-cap-eviction.test.ts+7−5
@@ -147,10 +147,12 @@ scenario( · 146 unmodified lines
147147 const openedSessionIds: string[] = [];
148148
149149 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.
154156 const sessionIds = yield* Effect.forEach(
155157 Array.from({ length: SESSIONS_TO_OPEN }, (_, index) => index),
156158 (index) =>
@@ -159,7 +161,7 @@ scenario( · 2 unmodified lines
159161 openedSessionIds.push(sessionId);
160162 }),
161163 ),
162− { concurrency: 8 },
164+ { concurrency: 1 },
163165 );
164166
165167 expect(sessionIds.length, "every session opened").toBe(SESSIONS_TO_OPEN);