mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:50:43 +00:00
test(release): wait longer for dashboard smoke
This commit is contained in:
@@ -58,6 +58,8 @@ const OMITTED_QA_EXTENSION_PREFIXES = [
|
||||
"dist/extensions/qa-lab/",
|
||||
"dist/extensions/qa-matrix/",
|
||||
];
|
||||
export const CROSS_OS_DASHBOARD_SMOKE_TIMEOUT_MS = 120_000;
|
||||
export const CROSS_OS_DASHBOARD_FETCH_TIMEOUT_MS = 10_000;
|
||||
|
||||
if (isMainModule()) {
|
||||
try {
|
||||
@@ -2463,7 +2465,7 @@ function parseAgentPayloadTexts(stdout) {
|
||||
async function runDashboardSmoke(params) {
|
||||
const dashboardUrl = `http://127.0.0.1:${params.lane.gatewayPort}/`;
|
||||
const logStream = createWriteStream(params.logPath, { flags: "a" });
|
||||
const deadline = Date.now() + 30_000;
|
||||
const deadline = Date.now() + CROSS_OS_DASHBOARD_SMOKE_TIMEOUT_MS;
|
||||
let attempt = 0;
|
||||
try {
|
||||
while (Date.now() < deadline) {
|
||||
@@ -2471,7 +2473,7 @@ async function runDashboardSmoke(params) {
|
||||
logStream.write(`${new Date().toISOString()} attempt=${attempt} url=${dashboardUrl}\n`);
|
||||
try {
|
||||
const response = await fetch(dashboardUrl, {
|
||||
signal: AbortSignal.timeout(5_000),
|
||||
signal: AbortSignal.timeout(CROSS_OS_DASHBOARD_FETCH_TIMEOUT_MS),
|
||||
});
|
||||
const html = await response.text();
|
||||
if (
|
||||
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
canConnectToLoopbackPort,
|
||||
buildDiscordSmokeGuildsConfig,
|
||||
buildRealUpdateEnv,
|
||||
CROSS_OS_DASHBOARD_FETCH_TIMEOUT_MS,
|
||||
CROSS_OS_DASHBOARD_SMOKE_TIMEOUT_MS,
|
||||
isImmutableReleaseRef,
|
||||
looksLikeReleaseVersionRef,
|
||||
normalizeRequestedRef,
|
||||
@@ -39,6 +41,11 @@ import {
|
||||
} from "../../scripts/openclaw-cross-os-release-checks.ts";
|
||||
|
||||
describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
it("keeps dashboard smoke patient enough for cold packaged gateway startup", () => {
|
||||
expect(CROSS_OS_DASHBOARD_SMOKE_TIMEOUT_MS).toBeGreaterThanOrEqual(120_000);
|
||||
expect(CROSS_OS_DASHBOARD_FETCH_TIMEOUT_MS).toBeGreaterThanOrEqual(10_000);
|
||||
});
|
||||
|
||||
it("accepts OK agent output from the captured log when stdout is empty", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-agent-output-"));
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user