Oleksandr Shevchenko
Oleksandr Shevchenko
@jameskleeh Could you please take a look?
@dstepanov Please, just run `DemoTest` https://github.com/o-shevchenko/micronaut_reactor_circuitbreaker_bug If you run testPass first both test will pass:
If I remove `CircuitBreaker` or add ` excludes = [HttpClientResponseException::class]` tests work ```kotlin @CircuitBreaker( attempts = "\${controller.retry.attempts}", delay = "\${controller.retry.delay}", multiplier = "\${controller.retry.multiplier}", reset = "\${controller.retry.reset}", excludes = [HttpClientResponseException::class] )...
Added body to response to show that data from first request was returned to second
@dstepanov Are you able to reproduce this issue using tests?
> yes, it returns the last exception (with the last body) even if we already send new data via the client. so, `CircuitBreaker` returns data that belongs from one caller...
Probably, the gate should be closed when we reach out from another caller but it still open
I mean that looks very dangerous when I can call a client from one test method with different parameters but get results from the previous call even from another test....
>I think it should be changed to throw a basic exception I'm not sure why it should throw an exception for the second call at all. Both tests should pass...
Right, it makes sense when service is not available. But currently, it does retries and closes gate even when we just return our own exception or just 400 HTTP status....