Question: Short Circuiting Retriable While Testing Your App
Earlopain opened this issue · 1 comments
The readme mentions being able to turn of retries in tests by doing the following:
Retriable.configure do |c|
if Rails.env.test?
c.tries = 1
end
But from what I can tell is only works when Retriable.retriable
is itself called without the tries
parameter. The default global config is being set, while the individual invocation parameters still take precedence. The same is probably true for all other parameters being set in this way.
Looking at the code this seems to indeed what is happening:
Line 26 in 83aa4d4
Is there something I'm missing? I could create my own wrapper function and check for the test environment there, but that is not what the readme suggests.
Same question here, if Retriable.retriable
is called with tries
parameter, you cannot override it in global config or rspec_helper with c.tries = 0