Skip to content

Commit f42b200

Browse files
committed
increase retry for flaky tests and added rspec wait gem
1 parent 6671dcb commit f42b200

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ end
3333

3434
group :test do
3535
gem "generator_spec"
36-
gem "rspec-retry" # repeating flaky tests
36+
gem "rspec-retry" # repeating flaky tests
37+
gem "rspec-wait", "~> 0.0.9"
3738
end

Gemfile.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ GEM
174174
declarative (< 0.1.0)
175175
declarative-option (< 0.2.0)
176176
uber (< 0.2.0)
177+
rspec (3.8.0)
178+
rspec-core (~> 3.8.0)
179+
rspec-expectations (~> 3.8.0)
180+
rspec-mocks (~> 3.8.0)
177181
rspec-core (3.8.0)
178182
rspec-support (~> 3.8.0)
179183
rspec-expectations (3.8.2)
@@ -193,6 +197,8 @@ GEM
193197
rspec-retry (0.6.2)
194198
rspec-core (> 3.3)
195199
rspec-support (3.8.0)
200+
rspec-wait (0.0.9)
201+
rspec (>= 3, < 4)
196202
rubyzip (2.2.0)
197203
safe_yaml (1.0.5)
198204
selenium-webdriver (3.142.7)
@@ -260,6 +266,7 @@ DEPENDENCIES
260266
puma
261267
rspec-rails (~> 3.8)
262268
rspec-retry
269+
rspec-wait (~> 0.0.9)
263270
selenium-webdriver (~> 3.142, >= 3.142.7)
264271
simplecov
265272
sqlite3 (~> 1.3.13)

spec/spec_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
require 'pry'
4040

4141
require 'rspec/retry'
42+
require "rspec/wait"
4243

4344

4445
RSpec.configure do |config|
@@ -50,7 +51,7 @@
5051

5152
# run retry only on features
5253
config.around :each, :js do |ex|
53-
ex.run_with_retry retry: 5
54+
ex.run_with_retry retry: 10
5455
end
5556

5657
# callback to be run between retries

0 commit comments

Comments
 (0)