NoRedInk / rspec-retry

retry randomly failing rspec example
MIT License
585 stars 96 forks source link

CircleCI still detects RC 1 even though rspec-retry ultimately succeeded #61

Open aguynamedben opened 8 years ago

aguynamedben commented 8 years ago

I'm using CircleCI, and my spec/support/rspec_retry.rb is:

# Deal with intermittent Selenium timeouts
# From: https://github.com/jnicklas/capybara/issues/1305#issuecomment-112535264

RSpec.configure do |config|
  # show retry status in spec process
  config.verbose_retry = true

  # Try twice (retry once)
  config.default_retry_count = 3

  # Only retry when Selenium raises Net::ReadTimeout
  config.exceptions_to_retry = [Net::ReadTimeout]
end

Sometimes I still get the Net::ReadTimeout, rspec-retry does it's job and the test passes, but RSpec still gives return code 1, which make the build fail.

rspec-retry

Any thoughts on how to configure rspec-retry, RSpec, and/or CircleCI together so that when rspec-retry succeeds I still get RC 0?

Thanks for the work you do on this gem.

michaelglass commented 8 years ago

Can you share a minimal test case where this happens?

yangez commented 7 years ago

This also happens to me with Codeship:

config.verbose_retry = true
config.default_retry_count = 2
config.exceptions_to_retry = [Net::ReadTimeout]

Any test that raises Net::ReadTimeout the first time but passes on the retry will still fail the codeship build.

prathamesh-sonpatki commented 7 years ago

Running into similae issue. @aguynamedben @yangez Were you able to solve this?

comictvn commented 7 years ago

any guys have fixed this issue ?

yangez commented 7 years ago

Never resolved this - we had to stop using the gem.

michaelglass commented 7 years ago

can you give your rspec-core version?

choosen commented 6 years ago

Try to update webmock.

Is it possible to precompile assets at Circle before suite ?

aguynamedben commented 6 years ago

I don't recall ever figuring out how to fix this, and I no longer have access to the project where it was happening. I think we may have had to stop using the gem as well. :(