test: tighten slow test timeouts and cleanup

This commit is contained in:
Peter Steinberger
2026-02-24 01:16:43 +00:00
parent 6c43d0a08e
commit e5931554bf
6 changed files with 10 additions and 9 deletions

View File

@@ -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, {