Code Monkey home page Code Monkey logo

Comments (5)

jhalterman avatar jhalterman commented on May 20, 2024

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.

sunng87 avatar sunng87 commented on May 20, 2024

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.

jhalterman avatar jhalterman commented on May 20, 2024

Ah, now a NullPointer :) Any chance you can print a stack trace for the NullPointerException?

from failsafe.

sunng87 avatar sunng87 commented on May 20, 2024

Got the reason. From 0.9.3, now CircuitBreakerOpenException extends FailSafeException which is a little break change:

https://github.com/jhalterman/failsafe/blob/master/src/main/java/net/jodah/failsafe/CircuitBreakerOpenException.java

I will update diehard to adapt this change.

from failsafe.

jhalterman avatar jhalterman commented on May 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.