Skip to content

Commit 672de88

Browse files
authored
fix(serve): align integration test mirrors with merged capability + EventBus changes (#4245)
- qwen-serve-routes.test.ts: expand expected features list to 24, adding slow_client_warning (#4237) and workspace_mcp/workspace_skills/ workspace_providers/session_context/session_supported_commands (#4241). Matches EXPECTED_STAGE1_FEATURES in server.test.ts:76-101. - qwen-serve-baseline.test.ts: update SSE backpressure assertion from 3 to 4 frames (tick, tick, slow_client_warning, client_evicted). PR #4237 changed EventBus to force-push a slow_client_warning synthetic frame when the per-subscriber queue reaches the 75% warn threshold, before the client_evicted terminal frame fires on overflow. Mirrors the unit test at eventBus.test.ts:103-122. Both integration mirrors drifted because integration tests only run on schedule / workflow_dispatch (release.yml:4-9), not PR CI. Fixes the release run 25992130532 failure in both Docker and No-Sandbox jobs. 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
1 parent 60fe594 commit 672de88

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

integration-tests/cli/qwen-serve-baseline.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,11 @@ async function measureRssAtSessionCount(sessionCount: number): Promise<{
477477
// construction (matches the existing eventBus.test.ts:103 pattern).
478478
const iter = bus.subscribe({ maxQueued: 2, signal: ac.signal });
479479

480-
// Publish 3 events into a 2-deep queue. The 3rd trips eviction →
481-
// a synthetic client_evicted terminal frame is appended.
480+
// Publish 3 events into a 2-deep queue:
481+
// - event 2 fills the queue to 100% (above the 75% warn threshold),
482+
// so the bus force-pushes a `slow_client_warning` synthetic frame.
483+
// - event 3 trips the eviction path → terminal `client_evicted` frame.
484+
// Resulting order: tick(1), tick(2), slow_client_warning, client_evicted.
482485
bus.publish({ type: 'tick', data: { i: 1 } });
483486
bus.publish({ type: 'tick', data: { i: 2 } });
484487
bus.publish({ type: 'tick', data: { i: 3 } });
@@ -489,8 +492,9 @@ async function measureRssAtSessionCount(sessionCount: number): Promise<{
489492
}
490493
ac.abort();
491494

492-
expect(collected).toHaveLength(3);
493-
expect(collected[2]!.type).toBe('client_evicted');
495+
expect(collected).toHaveLength(4);
496+
expect(collected[2]!.type).toBe('slow_client_warning');
497+
expect(collected[3]!.type).toBe('client_evicted');
494498
snapshot.sseBackpressure = {
495499
ringSize: 4_000,
496500
maxQueuedDefault: 256,

integration-tests/cli/qwen-serve-routes.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,18 @@ describe('qwen serve — capabilities envelope', () => {
198198
'session_prompt',
199199
'session_cancel',
200200
'session_events',
201+
'slow_client_warning',
201202
'typed_event_schema',
202203
'session_set_model',
203204
'client_identity',
204205
'client_heartbeat',
205206
'session_permission_vote',
206207
'permission_vote',
208+
'workspace_mcp',
209+
'workspace_skills',
210+
'workspace_providers',
211+
'session_context',
212+
'session_supported_commands',
207213
'session_close',
208214
'session_metadata',
209215
]);

0 commit comments

Comments
 (0)