|
16 | 16 | # users commonly want. |
17 | 17 | # |
18 | 18 | # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration |
| 19 | + |
| 20 | +require "rspec/retry" |
| 21 | + |
19 | 22 | RSpec.configure do |config| |
20 | 23 | # rspec-expectations config goes here. You can use an alternate |
21 | 24 | # assertion/expectation library such as wrong or the stdlib/minitest |
|
29 | 32 | # ...rather than: |
30 | 33 | # # => "be bigger than 2" |
31 | 34 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true |
| 35 | + |
| 36 | + ### Fix Net::ReadTimeout error on first test |
| 37 | + # Show retry status in spec process |
| 38 | + config.verbose_retry = true |
| 39 | + # Try twice (retry once) |
| 40 | + config.default_retry_count = 2 |
| 41 | + # Only retry when Selenium raises Net::ReadTimeout |
| 42 | + config.exceptions_to_retry = [Net::ReadTimeout] |
32 | 43 | end |
33 | 44 |
|
34 | 45 | # rspec-mocks config goes here. You can use an alternate test double |
|
0 commit comments