Closed shiroari closed 7 years ago
Can you add some test ?
@lburgazzoli PR doesn't introduce new functionality and doesn't change behavior, so it is supposed to be covered by existing tests. But I am personally missing a related test case as well. I couldn't find any unit test that tests failures or retries and I can not see a good way how it could be done with current setup. Do you mind to add mockito and probably some testing rest libraries like restito to dependencies?
I've asked for a reproducer in #122 and I had no time to write one so you are welcome to provide it as well as adding the required dependencies.
Unfortunately there is no way to test 'stack-overflow' case directly. I can cover only that retrying works properly. In order to address 'stack-overflow' problem and similar problems I suggest you to add some java static analysis tool to project.
Yeah I mean a test that cover the retry case.
Added a few test cases
thx for the pr
Recursive
get
function in ResponsePromise can cause stack overflow error while retrying. This commit replaces recursion with simple while-loop. See issue #122