diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-03-27 07:55:55 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-03-27 07:55:55 -0400 |
| commit | 838c59edfb7d6ad3e8dc796b0675d816ed9d07d7 (patch) | |
| tree | 9c85edaa3ac74e683ad0ea1aa1a5b02436ec1b4d | |
| parent | 784bf1c7b2d3da5a780b4c27c2376d620d370c00 (diff) | |
| download | anubis-838c59edfb7d6ad3e8dc796b0675d816ed9d07d7.tar.xz anubis-838c59edfb7d6ad3e8dc796b0675d816ed9d07d7.zip | |
internal/test: is this broken or am I broken?
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | internal/test/playwright_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/test/playwright_test.go b/internal/test/playwright_test.go index 6d65825..fc52bfb 100644 --- a/internal/test/playwright_test.go +++ b/internal/test/playwright_test.go @@ -211,16 +211,17 @@ func TestPlaywrightBrowser(t *testing.T) { page.Goto(anubisURL, playwright.PageGotoOptions{ Timeout: &timeout, }) - - if typ.Name() == "chromium" && os.Getenv("CI") == "true" { - //nosleep:bypass XXX(Xe): does this fix the broken tests??? - time.Sleep(2 * time.Second) - } }) for _, tc := range testCases { name := fmt.Sprintf("%s/%s", typ.Name(), tc.name) t.Run(name, func(t *testing.T) { + if typ.Name() == "chromium" && os.Getenv("CI") == "true" { + t.Logf("Sleeping for 2 seconds to make Chromium more deterministic in CI") + //nosleep:bypass XXX(Xe): does this fix the broken tests??? + time.Sleep(2 * time.Second) + } + _, hasDeadline := t.Deadline() if tc.isHard && hasDeadline { t.Skip("skipping hard challenge with deadline") |
