Skip to content
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

Open
wants to merge 2 commits into
base: 8.0
Choose a base branch
from

Conversation

gmponos
Copy link
Member

@gmponos gmponos commented Dec 23, 2019

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...


self::assertSame(200, $p->getStatusCode());
self::assertCount(4, $calls);
self::assertSame(4000, $h->getLastOptions()['delay']);
Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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 =)

Copy link
Member

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...

Copy link
Member

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.

Copy link
Member Author

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...

@gmponos gmponos added this to the 8.0.0 milestone Dec 28, 2019
@stale
Copy link

stale bot commented Sep 25, 2020

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.

@stale stale bot added the lifecycle/stale No activity for a long time label Sep 25, 2020
@Nyholm Nyholm added the lifecycle/keep-open Issues that should not be closed label Sep 25, 2020
@stale stale bot removed the lifecycle/stale No activity for a long time label Sep 25, 2020
@GrahamCampbell GrahamCampbell changed the base branch from 7.5 to 8.0 March 31, 2024 13:15
@GrahamCampbell GrahamCampbell changed the title Remove the exponentialDelay function from RetryMiddleware [8.0] Remove the exponentialDelay function from RetryMiddleware Mar 31, 2024
@GrahamCampbell GrahamCampbell removed this from the 8.0.0 milestone Mar 31, 2024
@GrahamCampbell
Copy link
Member

@gmponos Are you able to resolve the merge conflicts please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/keep-open Issues that should not be closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants