diff options
Diffstat (limited to 'spec/support/capybara_slow_finder.rb')
-rw-r--r-- | spec/support/capybara_slow_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/capybara_slow_finder.rb b/spec/support/capybara_slow_finder.rb index 975ddd52c1f..697b288e8b5 100644 --- a/spec/support/capybara_slow_finder.rb +++ b/spec/support/capybara_slow_finder.rb @@ -13,13 +13,13 @@ module Capybara # Inspired by https://github.com/ngauthier/capybara-slow_finder_errors module SlowFinder def synchronize(seconds = nil, errors: nil) - start_time = Gitlab::Metrics::System.monotonic_time + start_time = ::Gitlab::Metrics::System.monotonic_time super rescue Capybara::ElementNotFound => e seconds ||= Capybara.default_max_wait_time - raise e unless seconds > 0 && Gitlab::Metrics::System.monotonic_time - start_time > seconds + raise e unless seconds > 0 && ::Gitlab::Metrics::System.monotonic_time - start_time > seconds message = format(MESSAGE, timeout: seconds) raise e, "#{$!}\n\n#{message}", e.backtrace |