mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
* 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
32 lines
1 KiB
TypeScript
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",
|
|
},
|
|
});
|