mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 18:42:45 +08:00
DEV: Don't hardcode timeout for SystemHelpers#try_until_success
(#22180)
Different environments run on different hardware so response times vary based on hardware. Instead of hardcoding the timeout for `SystemHelpers#try_until_success` to 2 seconds, we change it such that it follows `Capybara.default_wait_timeout` which we have configured to be higher in environments which runs on lousier hardware. This change should reduce the amount of flakiness we're seeing on CI with tests that rely on `SystemHlpers#try_until_success`.
This commit is contained in:
parent
0626b7c413
commit
626eda4c91
|
@ -30,7 +30,7 @@ module SystemHelpers
|
|||
SiteSetting.splash_screen = false
|
||||
end
|
||||
|
||||
def try_until_success(timeout: 2, frequency: 0.01)
|
||||
def try_until_success(timeout: Capybara.default_max_wait_time, frequency: 0.01)
|
||||
start ||= Time.zone.now
|
||||
backoff ||= frequency
|
||||
yield
|
||||
|
|
Loading…
Reference in New Issue
Block a user