Comments (5)
So this is the line that's failing?
https://github.com/sunng87/diehard/blob/master/test/diehard/core_test.clj#L185
One thing that comes to mind is that the delay might be too short for this test:
https://github.com/sunng87/diehard/blob/master/test/diehard/core_test.clj#L177
Since the circuit breaker will only be in the closed state for 10 milliseconds, the breaker might transition back to closed
before the test finishes, causing the test failure. Try increasing the delay to 1 minute
or something (a long delay shouldn't matter in this case) which will make sure the breaker stays in the open
state for the duration of the test.
from failsafe.
Hi @jhalterman , I set delay to 100 seconds and the test still fails: https://travis-ci.org/sunng87/diehard/builds/158639725
With 0.9.2 it passes with 10ms delay.
from failsafe.
Ah, now a NullPointer :) Any chance you can print a stack trace for the NullPointerException?
from failsafe.
Got the reason. From 0.9.3, now CircuitBreakerOpenException
extends FailSafeException
which is a little break change:
I will update diehard to adapt this change.
from failsafe.
@sunng87 Thanks. I'll add a note on this change to the changelog.
The idea is that having CircuitBreakerOpenException extend FailsafeException makes the user experience a little better, so users can just catch FailsafeException if they want. I hadn't expected any breakage from this, but good to know.
from failsafe.
Related Issues (20)
- Make CircuitBreaker delay time mockable for testing HOT 6
- Support Java Modules HOT 1
- Add Failsafe to vertx-awesome HOT 1
- Result futures strongly retain supplying functions
- Why does CheckedPredicate exist? HOT 2
- Also add note about default maxRetries of 3 to maxDuration section of the documentation HOT 7
- Bulkhead policy may drop requests when maxWaitTime is specified HOT 8
- Guidance around CheckedPredicate HOT 2
- Time based error limiter policy
- [Question]Can withBackoff and withDelay be used at the same time? HOT 2
- RetryPolicy handleIf not working with DynamoDbException in predicate HOT 4
- Having a context object in the run(...) and get(...) methods HOT 7
- dev.failsafe.Functions.* do not propagate toString to the wrapped object
- [Question] Is it possible to have multiple Fallback policies in one Failsafe executor? HOT 4
- [question] how to use failsafe with kotlin
- Feature Request: Integrate / add support for Lunar Proxy (backend policy) HOT 1
- Why recommend CircuitBreaker before Retry? HOT 1
- CircuitBreaker stays in OPEN even after DELAY time HOT 1
- Nested retries, how to prevent duplicate retrying? HOT 5
- FailsafeExecutor.compose and .with(Executor) have surprising composition behavior
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from failsafe.