New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0] Remove the exponentialDelay function from RetryMiddleware #2500
base: 8.0
Are you sure you want to change the base?
Conversation
|
||
self::assertSame(200, $p->getStatusCode()); | ||
self::assertCount(4, $calls); | ||
self::assertSame(4000, $h->getLastOptions()['delay']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or...we could not test it. 😄 It's a trivial sleep after all...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There has recently been a bug in this trivial code. I think the tests should be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...