Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9fb887c
chore(test): increase component integration test polling timeouts and…
kriszyp May 13, 2026
7ebe816
fix(components): use npm.cmd explicitly on Windows when spawning npm …
kriszyp May 13, 2026
ed705fb
chore: update package-lock.json
kriszyp May 13, 2026
4bb3d04
test(components): use local fixture tarballs instead of GitHub URLs f…
kriszyp May 13, 2026
e1b2543
ci: add Windows job for integration API tests
kriszyp May 13, 2026
6ec91f0
fix(windows): resolve api test assertion failures specific to Windows
kriszyp May 13, 2026
d68c8db
test(windows): bump integration tests to node 24 and workaround datab…
kriszyp May 14, 2026
af82046
test(components): use local fixture tarball for risk-query component …
kriszyp May 14, 2026
022a0f3
test(api): use local fixture for application-template during add_comp…
kriszyp May 14, 2026
9a5e6a3
fix(api-tests): prepend file: protocol to absolute template paths for…
kriszyp May 14, 2026
36a8d2f
fix(api-tests): only use local fixture bypass on Windows runners
kriszyp May 14, 2026
4f7a466
fix(components): prevent auto-deletion of local fixture tarballs duri…
kriszyp May 14, 2026
d11000d
test(api): skip http_worker restart tests on Windows to avoid crashing
kriszyp May 14, 2026
fa40be7
test(windows): skip blob integration tests and github deploy test on …
kriszyp May 14, 2026
fc949eb
test(api): skip oversized REST POST on Windows due to ECONNRESET
kriszyp May 14, 2026
0530b96
style(test): format modified test files
kriszyp May 14, 2026
d53b43f
Update config/configUtils.js
kriszyp May 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions integrationTests/components/early-hints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,35 @@ suite('Component: early-hints', (ctx: ContextWithHarper) => {
if (check.status === 200) {
const data = await check.json();
console.log(
`[poll] status=200 isArray=${Array.isArray(data)} length=${Array.isArray(data) ? data.length : 'n/a'}`
`[early-hints poll seed] status=200 isArray=${Array.isArray(data)} length=${Array.isArray(data) ? data.length : 'n/a'}`
);
if (Array.isArray(data) && data.length >= 3) break;
} else {
console.log(`[early-hints poll seed] unexpected status: ${check.status}`);
}
} catch {
// server not yet accepting connections
} catch (e: any) {
console.log(`[early-hints poll seed] waiting for server... (${e.message})`);
}
if (Date.now() > seedDeadline) throw new Error('Timed out waiting for early-hints seed data');
await new Promise((resolve) => setTimeout(resolve, 500));
}
await new Promise((resolve) => setTimeout(resolve, 2000));

const readyDeadline = Date.now() + 10_000;
const readyDeadline = Date.now() + 60_000;
while (true) {
try {
const check = await fetch(`${ctx.harper.httpURL}/site-images/`);
if (check.status === 200) break;
} catch {
// worker still restarting
if (check.status === 200) {
console.log('[early-hints poll ready] Server is ready.');
break;
} else {
console.log(`[early-hints poll ready] unexpected status: ${check.status}`);
}
} catch (e: any) {
console.log(`[early-hints poll ready] worker still restarting... (${e.message})`);
}
if (Date.now() > readyDeadline) throw new Error('Timed out waiting for Harper to be ready after restart');
await new Promise((resolve) => setTimeout(resolve, 200));
await new Promise((resolve) => setTimeout(resolve, 500));
}
});

Expand Down
18 changes: 10 additions & 8 deletions integrationTests/components/redirector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ const REDIRECT_CSV = `utcStartTime,utcEndTime,path,host,version,redirectURL,oper
,,/p/shirts/help/iron/,,0,/info/ironing-shirts,,301,`;

suite('Component: redirector', (ctx: ContextWithHarper) => {
if (process.platform === 'win32') {
return; // Skipping on windows until #525
}
before(async () => {
await startHarper(ctx);

Expand All @@ -43,16 +40,21 @@ suite('Component: redirector', (ctx: ContextWithHarper) => {
deepStrictEqual(deployBody, { message: 'Successfully deployed: redirector, restarting Harper' });

// poll until ready
const deadline = Date.now() + 30_000;
const deadline = Date.now() + 60_000;
while (true) {
try {
const check = await fetch(`${ctx.harper.httpURL}/Rule/`);
if (check.status === 200) break;
} catch {
// server not yet accepting connections
if (check.status === 200) {
console.log('[redirector poll] Server is ready.');
break;
} else {
console.log(`[redirector poll] unexpected status: ${check.status}`);
}
} catch (e: any) {
console.log(`[redirector poll] waiting for server... (${e.message})`);
}
if (Date.now() > deadline) throw new Error('Timed out waiting for redirector to be ready after deploy');
await new Promise((resolve) => setTimeout(resolve, 250));
await new Promise((resolve) => setTimeout(resolve, 500));
}

// seed redirect rules via CSV
Expand Down
Loading