heimdall
heimdall copied to clipboard
Hystrix Client Exit on Hystrix Time-out Error
Motivation
Issue #127 reported by @sebastian-popa
Changes
- Condition to verify hystrix-timeout error and exit w/o retry. Add unit test to verify the same.
- Upgrade version of testify package:
v1.3.0->v1.7.0for assert.ErrorIs used by the same unit test.
Summary
Heimdall's hystrix-client once timed out on hystrix-go's client, the subsequent retries fail by throwing error similar to http: ContentLength=24 with Body length 0 as reported in #127. The code on #127 polished and shared at playground link to understand this.
cURL Call:
curl 'http://localhost:8080/proxy' -d'{"message": "anything"}'
Results:
# Before
{"message":"Post \"http://localhost:8080/actual\": http: ContentLength=24 with Body length 0"}
# Now
{"message":"hystrix: timeout"}
Related Issues
Closes #127