I wish to test the following scenarios:
- Set the
hystrix.command.default.execution.isolation.thread.timeoutInMillisecond
value to a low value, and see how my application behaves. - Check my fallback method is called using Unit test.
Please can someone provide me with link to samples.
Fore open the circuit in your unit test case just before you call the client. Make sure fall back is called. You can have a constant returned from fallback or add some log statements. Reset the circuit.
A real usage can be found bellow. The key to enable Hystrix in the test class are these two annotations: @EnableCircuitBreaker @EnableAspectJAutoProxy