mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: prevent sending control request when query is closed
This commit is contained in:
@@ -555,6 +555,15 @@ describe('Permission Control (E2E)', () => {
|
||||
...SHARED_TEST_OPTIONS,
|
||||
cwd: testDir,
|
||||
permissionMode: 'default',
|
||||
timeout: {
|
||||
/**
|
||||
* We use a short control request timeout and
|
||||
* wait till the time exceeded to test if
|
||||
* an immediate close() will raise an query close
|
||||
* error and no other uncaught timeout error
|
||||
*/
|
||||
controlRequest: 5000,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -563,7 +572,9 @@ describe('Permission Control (E2E)', () => {
|
||||
await expect(q.setPermissionMode('yolo')).rejects.toThrow(
|
||||
'Query is closed',
|
||||
);
|
||||
});
|
||||
|
||||
await new Promise((resolve) => setTimeout(resolve, 8000));
|
||||
}, 10_000);
|
||||
});
|
||||
|
||||
describe('canUseTool and setPermissionMode integration', () => {
|
||||
|
||||
Reference in New Issue
Block a user