test: relax live web search timeouts · openclaw/openclaw@4bc79f9
steipete
·
2026-04-30
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,6 +5,7 @@ import { createKimiWebSearchProvider } from "./src/kimi-web-search-provider.js";
|
5 | 5 | const KIMI_SEARCH_KEY = |
6 | 6 | process.env.KIMI_API_KEY?.trim() || process.env.MOONSHOT_API_KEY?.trim() || ""; |
7 | 7 | const describeLive = isLiveTestEnabled() && KIMI_SEARCH_KEY.length > 0 ? describe : describe.skip; |
| 8 | +const KIMI_LIVE_SEARCH_TIMEOUT_SECONDS = 60; |
8 | 9 | |
9 | 10 | function isTransientKimiSearchError(error: unknown): boolean { |
10 | 11 | if (!(error instanceof Error)) { |
@@ -22,7 +23,11 @@ describeLive("moonshot plugin live", () => {
|
22 | 23 | const provider = createKimiWebSearchProvider(); |
23 | 24 | const tool = provider.createTool?.({ |
24 | 25 | config: {}, |
25 | | -searchConfig: { kimi: { apiKey: KIMI_SEARCH_KEY }, cacheTtlMinutes: 0, timeoutSeconds: 20 }, |
| 26 | +searchConfig: { |
| 27 | +kimi: { apiKey: KIMI_SEARCH_KEY }, |
| 28 | +cacheTtlMinutes: 0, |
| 29 | +timeoutSeconds: KIMI_LIVE_SEARCH_TIMEOUT_SECONDS, |
| 30 | +}, |
26 | 31 | } as never); |
27 | 32 | |
28 | 33 | let result: { provider?: string; content?: unknown; citations?: unknown } | undefined; |
@@ -47,5 +52,5 @@ describeLive("moonshot plugin live", () => {
|
47 | 52 | expect(typeof result?.content).toBe("string"); |
48 | 53 | expect((result?.content as string).length).toBeGreaterThan(20); |
49 | 54 | expect(Array.isArray(result?.citations)).toBe(true); |
50 | | -}, 60_000); |
| 55 | +}, 180_000); |
51 | 56 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。