fix(e2e): fast-forward the phases spec at MID scale; retry set-health on transient 500
CI / build + unit + e2e (pull_request) Successful in 7m27s

This commit is contained in:
2026-09-28 10:08:07 +00:00
parent b683c4e546
commit 37bdf902cc
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -167,6 +167,7 @@ test('marker shows the takeoff and landing phases on a dispatched leg', async ({
// --- Landing: fast-forward through the cruise to just before the landing window, then drop back
// to OBS so the hold at the destination gate is observable. ---
const landingStart = T_dep + ph.takeoffMs + ph.cruiseMs;
await setScale(page, MID); // fast-forward through takeoff hold + cruise (pure arrival wait)
await expect.poll(async () => {
const body = await getState(page);
const p = body.planes.find((x) => x.id === STARTER)!;
+7 -1
View File
@@ -162,7 +162,13 @@ async function flyHomeViaApi(page: Page): Promise<void> {
// v0.39.0 (ISS-069): wear accumulates across the shared CI DB — restore full health and clear any
// active repair gate from an interrupted run before the steps below act on the starter, so the
// farthest-flyable picker and fuel pins never see a worn or broken plane.
expect((await page.request.post('/api/test/set-health', { data: { planeId: 'plane-starter', health: 100, repairUntilMs: 0 } })).status()).toBe(200);
// ISS-127-style transient: test hooks intermittently 500 under dind load — retry briefly instead of failing.
for (let attempt = 1; ; attempt++) {
const healthRes = await page.request.post('/api/test/set-health', { data: { planeId: 'plane-starter', health: 100, repairUntilMs: 0 } });
if (healthRes.status() === 200) break;
if (attempt >= 3) throw new Error(`/api/test/set-health returned ${healthRes.status()} after 3 attempts`);
await page.waitForTimeout(500);
}
// Fast-forward any leftover leg / repositioning flight (a few seconds real time worst case at 1000×).
await setScale(page, SCALE);
await expect.poll(async () => {