mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:21:23 +00:00
test: tighten slow test timeouts and cleanup
This commit is contained in:
@@ -69,6 +69,7 @@ async function expectChatCompletionsDisabled(
|
||||
messages: [{ role: "user", content: "hi" }],
|
||||
});
|
||||
expect(res.status).toBe(404);
|
||||
await res.text();
|
||||
} finally {
|
||||
await server.close({ reason: "test done" });
|
||||
}
|
||||
@@ -83,7 +84,7 @@ function parseSseDataLines(text: string): string[] {
|
||||
}
|
||||
|
||||
describe("OpenAI-compatible HTTP API (e2e)", () => {
|
||||
it("rejects when disabled (default + config)", { timeout: 120_000 }, async () => {
|
||||
it("rejects when disabled (default + config)", { timeout: 15_000 }, async () => {
|
||||
await expectChatCompletionsDisabled(startServerWithDefaultConfig);
|
||||
await expectChatCompletionsDisabled((port) =>
|
||||
startServer(port, {
|
||||
|
||||
@@ -91,7 +91,7 @@ async function ensureResponseConsumed(res: Response) {
|
||||
}
|
||||
|
||||
describe("OpenResponses HTTP API (e2e)", () => {
|
||||
it("rejects when disabled (default + config)", { timeout: 30_000 }, async () => {
|
||||
it("rejects when disabled (default + config)", { timeout: 15_000 }, async () => {
|
||||
const port = await getFreePort();
|
||||
const server = await startServer(port);
|
||||
try {
|
||||
|
||||
@@ -338,7 +338,7 @@ describe("gateway server agent", () => {
|
||||
expect(second.payload).toEqual(firstFinal.payload);
|
||||
});
|
||||
|
||||
test("agent dedupe survives reconnect", { timeout: 60_000 }, async () => {
|
||||
test("agent dedupe survives reconnect", { timeout: 20_000 }, async () => {
|
||||
await withGatewayServer(async ({ port }) => {
|
||||
const dial = async () => {
|
||||
const ws = new WebSocket(`ws://127.0.0.1:${port}`);
|
||||
|
||||
@@ -118,7 +118,7 @@ describe("gateway server cron", () => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
test("handles cron CRUD, normalization, and patch semantics", { timeout: 120_000 }, async () => {
|
||||
test("handles cron CRUD, normalization, and patch semantics", { timeout: 20_000 }, async () => {
|
||||
const { prevSkipCron, dir } = await setupCronTestRun({
|
||||
tempPrefix: "openclaw-gw-cron-",
|
||||
sessionConfig: { mainKey: "primary" },
|
||||
|
||||
Reference in New Issue
Block a user