Skip to content

Commit c8f7f1d

Browse files
committed
Stabilize cloud session cap E2E
1 parent 507af7b commit c8f7f1d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎e2e/cloud/mcp-session-cap-eviction.test.ts‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,12 @@ scenario(
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(
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);

0 commit comments

Comments
 (0)