mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-02 16:04:38 -07:00
Simplify MCP server timeout configuration (#7661)
This commit is contained in:
@@ -98,20 +98,6 @@ describe('DiscoveredMCPTool', () => {
|
||||
expect(tool.schema.parameters).toBeUndefined();
|
||||
expect(tool.schema.parametersJsonSchema).toEqual(inputSchema);
|
||||
expect(tool.serverToolName).toBe(serverToolName);
|
||||
expect(tool.timeout).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should accept and store a custom timeout', () => {
|
||||
const customTimeout = 5000;
|
||||
const toolWithTimeout = new DiscoveredMCPTool(
|
||||
mockCallableToolInstance,
|
||||
serverName,
|
||||
serverToolName,
|
||||
baseDescription,
|
||||
inputSchema,
|
||||
customTimeout,
|
||||
);
|
||||
expect(toolWithTimeout.timeout).toBe(customTimeout);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -596,7 +582,6 @@ describe('DiscoveredMCPTool', () => {
|
||||
serverToolName,
|
||||
baseDescription,
|
||||
inputSchema,
|
||||
undefined,
|
||||
true,
|
||||
undefined,
|
||||
{ isTrustedFolder: () => true } as any,
|
||||
@@ -761,7 +746,6 @@ describe('DiscoveredMCPTool', () => {
|
||||
serverToolName,
|
||||
baseDescription,
|
||||
inputSchema,
|
||||
undefined,
|
||||
true, // trust = true
|
||||
undefined,
|
||||
mockConfig(true) as any, // isTrustedFolder = true
|
||||
@@ -779,7 +763,6 @@ describe('DiscoveredMCPTool', () => {
|
||||
serverToolName,
|
||||
baseDescription,
|
||||
inputSchema,
|
||||
undefined,
|
||||
true, // trust = true
|
||||
undefined,
|
||||
mockConfig(false) as any, // isTrustedFolder = false
|
||||
@@ -799,7 +782,6 @@ describe('DiscoveredMCPTool', () => {
|
||||
serverToolName,
|
||||
baseDescription,
|
||||
inputSchema,
|
||||
undefined,
|
||||
false, // trust = false
|
||||
undefined,
|
||||
mockConfig(true) as any, // isTrustedFolder = true
|
||||
|
||||
Reference in New Issue
Block a user