mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
test(core): update scheduler registry mock (#3415)
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
Update the CoreToolScheduler retry-loop test registry mock to match the current ToolRegistry interface. Add ensureTool and getAllToolNames so the tests exercise the scheduler path used in production.
This commit is contained in:
parent
a1d1e5e276
commit
7eba1c4635
1 changed files with 9 additions and 3 deletions
|
|
@ -3919,16 +3919,22 @@ describe('CoreToolScheduler validation retry loop detection', () => {
|
||||||
|
|
||||||
function createSchedulerWithTool(tool: StrictStringTool) {
|
function createSchedulerWithTool(tool: StrictStringTool) {
|
||||||
const mockToolRegistry = {
|
const mockToolRegistry = {
|
||||||
getTool: () => tool,
|
ensureTool: async (name: string) =>
|
||||||
|
name === StrictStringTool.Name ? tool : undefined,
|
||||||
|
getTool: (name: string) =>
|
||||||
|
name === StrictStringTool.Name ? tool : undefined,
|
||||||
getFunctionDeclarations: () => [],
|
getFunctionDeclarations: () => [],
|
||||||
tools: new Map(),
|
tools: new Map(),
|
||||||
discovery: {},
|
discovery: {},
|
||||||
registerTool: () => {},
|
registerTool: () => {},
|
||||||
getToolByName: () => tool,
|
getToolByName: (name: string) =>
|
||||||
getToolByDisplayName: () => tool,
|
name === StrictStringTool.Name ? tool : undefined,
|
||||||
|
getToolByDisplayName: (name: string) =>
|
||||||
|
name === 'StrictStringTool' ? tool : undefined,
|
||||||
getTools: () => [],
|
getTools: () => [],
|
||||||
discoverTools: async () => {},
|
discoverTools: async () => {},
|
||||||
getAllTools: () => [],
|
getAllTools: () => [],
|
||||||
|
getAllToolNames: () => [StrictStringTool.Name],
|
||||||
getToolsByServer: () => [],
|
getToolsByServer: () => [],
|
||||||
} as unknown as ToolRegistry;
|
} as unknown as ToolRegistry;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue