Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

Disable circuit breaker for StubAdapter #80

Closed
kayvonghaffari opened this issue Dec 23, 2015 · 2 comments
Closed

Disable circuit breaker for StubAdapter #80

kayvonghaffari opened this issue Dec 23, 2015 · 2 comments
Assignees
Milestone

Comments

@kayvonghaffari
Copy link
Contributor

When I run RSpec tests with a lot of failing cases, it causes the circuit breaker to open and many subsequent tests fail with the CircuitbreakerOpen Exception.

We should somehow disable the circuit breaker when the StubAdapter is being used.

@roberthoner
Copy link
Contributor

We could have something like a Adapter#use_circuit_breaker? method or something 😕. Then client would check if it’s adapter wants to use a circuit breaker or not. That method would return true by default. Then we’d override it in stub adapter to be false.

@roberthoner roberthoner added this to the 0.5.2 milestone Jan 11, 2016
@roberthoner
Copy link
Contributor

Alternatively, we could handle this at connection time:

Rester.connect(service, circuit_breaker_enabled: ENV['RACK_ENV'] != 'test')

We could also look at RACK_ENV and RAILS_ENV automatically, and disable it if it's "test".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants