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