mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-18 23:42:43 +00:00
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)
This commit is contained in:
parent
60fe594e8f
commit
672de88a47
2 changed files with 14 additions and 4 deletions
|
|
@ -477,8 +477,11 @@ async function measureRssAtSessionCount(sessionCount: number): Promise<{
|
|||
// construction (matches the existing eventBus.test.ts:103 pattern).
|
||||
const iter = bus.subscribe({ maxQueued: 2, signal: ac.signal });
|
||||
|
||||
// Publish 3 events into a 2-deep queue. The 3rd trips eviction →
|
||||
// a synthetic client_evicted terminal frame is appended.
|
||||
// Publish 3 events into a 2-deep queue:
|
||||
// - event 2 fills the queue to 100% (above the 75% warn threshold),
|
||||
// so the bus force-pushes a `slow_client_warning` synthetic frame.
|
||||
// - event 3 trips the eviction path → terminal `client_evicted` frame.
|
||||
// Resulting order: tick(1), tick(2), slow_client_warning, client_evicted.
|
||||
bus.publish({ type: 'tick', data: { i: 1 } });
|
||||
bus.publish({ type: 'tick', data: { i: 2 } });
|
||||
bus.publish({ type: 'tick', data: { i: 3 } });
|
||||
|
|
@ -489,8 +492,9 @@ async function measureRssAtSessionCount(sessionCount: number): Promise<{
|
|||
}
|
||||
ac.abort();
|
||||
|
||||
expect(collected).toHaveLength(3);
|
||||
expect(collected[2]!.type).toBe('client_evicted');
|
||||
expect(collected).toHaveLength(4);
|
||||
expect(collected[2]!.type).toBe('slow_client_warning');
|
||||
expect(collected[3]!.type).toBe('client_evicted');
|
||||
snapshot.sseBackpressure = {
|
||||
ringSize: 4_000,
|
||||
maxQueuedDefault: 256,
|
||||
|
|
|
|||
|
|
@ -198,12 +198,18 @@ describe('qwen serve — capabilities envelope', () => {
|
|||
'session_prompt',
|
||||
'session_cancel',
|
||||
'session_events',
|
||||
'slow_client_warning',
|
||||
'typed_event_schema',
|
||||
'session_set_model',
|
||||
'client_identity',
|
||||
'client_heartbeat',
|
||||
'session_permission_vote',
|
||||
'permission_vote',
|
||||
'workspace_mcp',
|
||||
'workspace_skills',
|
||||
'workspace_providers',
|
||||
'session_context',
|
||||
'session_supported_commands',
|
||||
'session_close',
|
||||
'session_metadata',
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue