fix: stabilize lint and test timeouts
This commit is contained in:
@@ -2767,7 +2767,11 @@ function createSessionsSendTool(): AnyAgentTool {
|
||||
});
|
||||
} catch (err) {
|
||||
const message =
|
||||
err instanceof Error ? err.message : String(err ?? "error");
|
||||
err instanceof Error
|
||||
? err.message
|
||||
: typeof err === "string"
|
||||
? err
|
||||
: "error";
|
||||
return jsonResult({
|
||||
runId,
|
||||
status: "error",
|
||||
@@ -2792,7 +2796,11 @@ function createSessionsSendTool(): AnyAgentTool {
|
||||
}
|
||||
} catch (err) {
|
||||
const message =
|
||||
err instanceof Error ? err.message : String(err ?? "error");
|
||||
err instanceof Error
|
||||
? err.message
|
||||
: typeof err === "string"
|
||||
? err
|
||||
: "error";
|
||||
return jsonResult({
|
||||
runId,
|
||||
status: "error",
|
||||
@@ -2818,7 +2826,11 @@ function createSessionsSendTool(): AnyAgentTool {
|
||||
waitError = typeof wait?.error === "string" ? wait.error : undefined;
|
||||
} catch (err) {
|
||||
const message =
|
||||
err instanceof Error ? err.message : String(err ?? "error");
|
||||
err instanceof Error
|
||||
? err.message
|
||||
: typeof err === "string"
|
||||
? err
|
||||
: "error";
|
||||
return jsonResult({
|
||||
runId,
|
||||
status: message.includes("gateway timeout") ? "timeout" : "error",
|
||||
|
||||
@@ -213,6 +213,7 @@ export async function evaluateViaPlaywright(opts: {
|
||||
const locator = refLocator(page, opts.ref);
|
||||
// Use Function constructor at runtime to avoid esbuild adding __name helper
|
||||
// which doesn't exist in the browser context
|
||||
// eslint-disable-next-line @typescript-eslint/no-implied-eval -- required for browser-context eval
|
||||
const elementEvaluator = new Function(
|
||||
"el",
|
||||
"fnBody",
|
||||
@@ -230,6 +231,7 @@ export async function evaluateViaPlaywright(opts: {
|
||||
}
|
||||
// Use Function constructor at runtime to avoid esbuild adding __name helper
|
||||
// which doesn't exist in the browser context
|
||||
// eslint-disable-next-line @typescript-eslint/no-implied-eval -- required for browser-context eval
|
||||
const browserEvaluator = new Function(
|
||||
"fnBody",
|
||||
`
|
||||
|
||||
@@ -250,7 +250,7 @@ vi.mock("../config/config.js", async () => {
|
||||
session: {
|
||||
mainKey: "main",
|
||||
store: testState.sessionStorePath,
|
||||
...(testState.sessionConfig ?? {}),
|
||||
...testState.sessionConfig,
|
||||
},
|
||||
gateway: (() => {
|
||||
const gateway: Record<string, unknown> = {};
|
||||
@@ -366,7 +366,7 @@ export function installGatewayTestHooks() {
|
||||
piSdkMock.enabled = false;
|
||||
piSdkMock.discoverCalls = 0;
|
||||
piSdkMock.models = [];
|
||||
});
|
||||
}, 20_000);
|
||||
|
||||
afterEach(async () => {
|
||||
process.env.HOME = previousHome;
|
||||
|
||||
@@ -43,5 +43,5 @@ describe("resolvePythonExecutablePath", () => {
|
||||
process.env.PATH = originalPath;
|
||||
await fs.rm(tmp, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
}, 15_000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user