From 18ad3d01e34183e32a231c16f9110a5676c664f9 Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Wed, 21 Feb 2024 01:17:47 -0700 Subject: [PATCH] Fighting flaky system tests --- .github/workflows/tests.yml | 2 +- test/application_system_test_case.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 403a8bdb..bbebbd2f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,4 +38,4 @@ jobs: run: 'npx playwright install chromium --with-deps' - name: Run Tests - run: 'bundle exec rake test' + run: 'bundle exec rails test --fail-fast' diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index be8ccd57..c6778335 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -54,8 +54,8 @@ def with_retries(max = 3) return yield rescue Playwright::Error, Minitest::Assertion => error puts "RETRY #{count}: #{self.class.name}##{name} → #{error.message}" - sleep 1 - Capybara.reset_sessions! + sleep count * 3 + # Capybara.reset_sessions! page.reload waitUntil: "load" raise if count >= max end