litellm/tests/e2e/ui/integration.config.ts
Mateo Wang 238597ed49
test(ui): send Connection: close on every integration browser request (#46805)
* test(ui): close each federation spec API connection so the proxy cannot drop an idle keep-alive socket

* test(ui): send Connection: close on every integration browser spec API call

* test(ui): send Connection: close on every integration browser request from the Playwright config
2026-10-16 01:11:57 +00:00

32 lines
1 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
import * as path from "path";
import { ARTIFACT_DIR, UI_BASE_URL } from "./constants";
if (process.env.GITHUB_ACTIONS === "true")
throw new Error("Integration contracts are owned by CircleCI");
export default defineConfig({
testDir: "./tests/integrationCritical",
testMatch: "*.spec.ts",
fullyParallel: false,
forbidOnly: true,
retries: 0,
workers: 1,
timeout: 120_000,
expect: { timeout: 10_000 },
reporter: [
["line"],
["junit", { outputFile: path.join(ARTIFACT_DIR, "browser-junit.xml") }],
["json", { outputFile: path.join(ARTIFACT_DIR, "browser-results.json") }],
],
outputDir: path.join(ARTIFACT_DIR, "browser-output"),
use: {
...devices["Desktop Chrome"],
baseURL: UI_BASE_URL,
// The proxy closes idle keep-alive sockets after 5s and a reused one fails with "socket hang up"
extraHTTPHeaders: { Connection: "close" },
actionTimeout: 15_000,
navigationTimeout: 30_000,
trace: "retain-on-failure",
},
});