We currently use rspec-retry with the following configuration in our spec_helper.rb file:
require "codeclimate-test-reporter"
require 'rspec/retry'
CodeClimate::TestReporter.start
FakeBraintree.activate!
RSpec.configure do |config|
config.before do
FakeBraintree.clear!
end
config.include ShowMeTheCookies, :type => :feature
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.expect_with :rspec do |c|
c.syntax = :expect
end
# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
mocks.verify_doubled_constant_names = true
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended, and will default to
# `true` in RSpec 4.
config.around(:each, type: :helper) do |ex|
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = false
ex.run
mocks.verify_partial_doubles = true
end
end
end
# show retry status in spec process
config.verbose_retry = true
# show exception that triggers a retry if verbose_retry is set to true
config.display_try_failure_messages = true
# run retry only on features
config.around :each, :js do |ex|
ex.run_with_retry retry: 3
end
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = :random
config.raise_errors_for_deprecations!
end
On our CI we sporadically see these errors on various different specs:
While the specs are always different, the pattern is the same:
Visit some path - get Broken Pipe
ex.run_with_retry retry: 3 - get Broken Pipe
ex.run_with_retry retry: 3 - get Broken Pipe
Since we are doing 3 tries, it looks like there's a broken pipe on the first try on line 46 of spec_helper.rb:
# run retry only on features
config.around :each, :js do |ex|
ex.run_with_retry retry: 3
end
I'm having a hell of a time debugging this issue, but it seems like something is sporadically breaking our retry process. I haven't found anyone else with this issue through Google, and am not quite sure how to debug it from here.
We currently use
rspec-retry
with the following configuration in ourspec_helper.rb
file:On our CI we sporadically see these errors on various different specs:
While the specs are always different, the pattern is the same:
Since we are doing 3 tries, it looks like there's a broken pipe on the first try on line 46 of
spec_helper.rb
:I'm having a hell of a time debugging this issue, but it seems like something is sporadically breaking our retry process. I haven't found anyone else with this issue through Google, and am not quite sure how to debug it from here.
Any thoughts?