From 3a72aefc1cf3309d71bd98b20f01174f9bbde905 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 12 Aug 2025 09:54:48 +1000 Subject: [PATCH] Fail test when timeout reached In this example it didn't matter but if we re-use the helper then it needs to raise an error after the timeout has been reached. --- spec/system/admin/enterprises/dfc_permissions_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/system/admin/enterprises/dfc_permissions_spec.rb b/spec/system/admin/enterprises/dfc_permissions_spec.rb index 1414cc2f67..14261c95fe 100644 --- a/spec/system/admin/enterprises/dfc_permissions_spec.rb +++ b/spec/system/admin/enterprises/dfc_permissions_spec.rb @@ -75,10 +75,10 @@ RSpec.describe "DFC Permissions", feature: "cqcm-dev", vcr: true do yield rescue on - if Time.now.utc < finish - sleep 0.1 - retry - end + raise if Time.now.utc > finish + + sleep 0.1 + retry end def platform_list(variant)