You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr: It would be great to provide a way to run tests without worrying the gem will prevent consecutive runs to be successful. This could be provided in the form of a specific method/implementation enhancement or at least with some guidance in the docs.
Problem
I've experienced in my project that some tests when run twice in a row they fail in the second run. This happens because RateLimit.throttle! is failing the second time.
To solve the problem, as we're using Redis, I've added Redis.new.flushall to the before statement in our rails_helper.
Solution
It would be great if there was a way to configure the gem itself to prevent this from happening, like setting it to test mode.
Otherwise, maybe at least adding some guidance to the docs on how to deal with such scenario would also be fine.
The text was updated successfully, but these errors were encountered:
Thanks for the request. I'm going to add some new issues to support multiple cache adaptors and improvement for the overall caching layer. Then we can pick this issue during that milestone 👍
tl;dr: It would be great to provide a way to run tests without worrying the gem will prevent consecutive runs to be successful. This could be provided in the form of a specific method/implementation enhancement or at least with some guidance in the docs.
Problem
I've experienced in my project that some tests when run twice in a row they fail in the second run. This happens because
RateLimit.throttle!
is failing the second time.To solve the problem, as we're using Redis, I've added
Redis.new.flushall
to thebefore
statement in ourrails_helper
.Solution
It would be great if there was a way to configure the gem itself to prevent this from happening, like setting it to test mode.
Otherwise, maybe at least adding some guidance to the docs on how to deal with such scenario would also be fine.
The text was updated successfully, but these errors were encountered: