From 2bfb73a063e92d16aff0b44e1ff0be5324761444 Mon Sep 17 00:00:00 2001 From: Aleksandr Albekov Date: Tue, 27 Oct 2026 14:18:44 +0100 Subject: [PATCH] Let the OIDC redirect wait as long as the test, and give e2e a CPU Staging's run of ce22f42 failed two OIDC tests in authorize(): its waitForURL had 45 s of its own, counted from before the caller signs in, so it also had to cover the password step and freshTotp's wait for the next window (up to 31 s). It now has no timeout of its own; the test's 120 s bounds it. The same run took 1.7 min for a TOTP test that needs 37 s in CI: the e2e pod requested 200m and Chromium is CPU-bound. It now requests a core, so it is scheduled where one is free. Co-Authored-By: Claude Opus 5.5 --- deploy/staging/e2e.yaml | 3 ++- e2e/tests/helpers.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy/staging/e2e.yaml b/deploy/staging/e2e.yaml index cd54367..0f54f78 100644 --- a/deploy/staging/e2e.yaml +++ b/deploy/staging/e2e.yaml @@ -53,7 +53,8 @@ spec: - { name: E2E_KETO_WRITE, value: "http://keto:4467" } - { name: E2E_MAILPIT, value: "http://mailpit:8025" } resources: - requests: { cpu: 200m, memory: 512Mi } + # Chromium is CPU-bound; with 200m a TOTP test took 1.7 min here against 37 s in CI. + requests: { cpu: "1", memory: 512Mi } limits: { memory: 1536Mi } securityContext: *hardened volumeMounts: diff --git a/e2e/tests/helpers.ts b/e2e/tests/helpers.ts index 683958d..fa7d107 100644 --- a/e2e/tests/helpers.ts +++ b/e2e/tests/helpers.ts @@ -123,8 +123,10 @@ export async function authorize(page: Page, clientId: string, scope: string, cha }) await page.goto(`${AUTH}/oauth2/auth?${query}`) // Hydra redirects to the app (a stand-in answers there); redirects cannot be intercepted, so wait for the URL. + // No timeout of its own: the wait spans the caller's sign-in, TOTP window included (up to 31 s), so only the test's + // timeout bounds it. const callback = page - .waitForURL((url) => url.href.startsWith(APP_CALLBACK), { timeout: 45_000 }) + .waitForURL((url) => url.href.startsWith(APP_CALLBACK), { timeout: 0 }) .then(() => new URL(page.url())) return { callback } }