[8.0] Remove the exponentialDelay function from RetryMiddleware#2500
[8.0] Remove the exponentialDelay function from RetryMiddleware#2500gmponos wants to merge 2 commits intoguzzle:8.0from
Conversation
|
|
||
| self::assertSame(200, $p->getStatusCode()); | ||
| self::assertCount(4, $calls); | ||
| self::assertSame(4000, $h->getLastOptions()['delay']); |
There was a problem hiding this comment.
My main problem here is that these tests are causing actual delays.. any workaround would be helpful here.
There was a problem hiding this comment.
You could override the sleep function, or create an injectable/overrideable clock that falls back to the system clock. But I think this is fine for now as it is.
There was a problem hiding this comment.
Or.. we could just keep it public.
The tests were easier to read and write and did not take forever to run =)
There was a problem hiding this comment.
Or...we could not test it. 😄 It's a trivial sleep after all...
There was a problem hiding this comment.
There has recently been a bug in this trivial code. I think the tests should be there.
There was a problem hiding this comment.
Let's not have this delay v7. Will add it to v8 milestone...
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions. |
|
@gmponos Are you able to resolve the merge conflicts please? |
I don't think this is needed to be public.. I guess it is a legacy thing that stayed public because there was no anonymous functions, or we were not so much used to them back then...