From f16234e083347f94b7845edfa82b246a20e3b165 Mon Sep 17 00:00:00 2001 From: Ivan Vydrin Date: Thu, 30 Jul 2026 20:23:01 +0300 Subject: [PATCH] Give the browser assertions a timeout suited to a loaded runner Two release runs failed on assertions that pass on every pull request. The difference is load, not correctness: the release workflow runs this suite straight after eleven hundred unit tests across two frameworks, and Playwright's default five-second expect timeout is tuned for a developer's machine driving a single page. Every assertion here waits on a Blazor Server round trip. Raised to twenty seconds once, in the fixture, rather than per call, so no future assertion has to remember. A test that is genuinely broken still fails; it just no longer fails for being on a busy machine. Reproduced the condition locally by running the full E2E suite while both unit suites ran alongside it: 53/53. --- tests/Healthie.Tests.E2E/BrowserFixture.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Healthie.Tests.E2E/BrowserFixture.cs b/tests/Healthie.Tests.E2E/BrowserFixture.cs index e2a0317..617f676 100644 --- a/tests/Healthie.Tests.E2E/BrowserFixture.cs +++ b/tests/Healthie.Tests.E2E/BrowserFixture.cs @@ -28,6 +28,14 @@ public async ValueTask InitializeAsync() _playwright = await Playwright.CreateAsync(); _browser = await _playwright.Chromium.LaunchAsync(new() { Headless = true }); + + // Playwright's default is five seconds, which is tuned for a developer's machine driving one + // page. Every assertion here waits on a Blazor Server round trip, and the release workflow + // runs this suite straight after eleven hundred unit tests across two frameworks -- a loaded + // runner made assertions that pass on every pull request fail twice during a release, which + // reads as a broken feature rather than a busy machine. Raised once here rather than + // sprinkled per call, so no future assertion has to remember. + Assertions.SetDefaultExpectTimeout(20_000); } public async Task NewPageAsync()