Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpClient] fix management of shorter-than-requested timeouts with AmpHttpClient #36960

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

Merged
merged 1 commit into from
May 26, 2020

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

This will fix the most transient test in our CI, which was not a false positive.

Loop::cancel($delay);
}
while (true) {
self::$delay = Loop::delay(1000 * $remaining, [Loop::class, 'stop']);
Copy link
Member Author

@nicolas-grekas nicolas-grekas May 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kelunik there is something I don't get here that you might want to check once this PR is merged. It looks like the delay defined here is not respected.

To see what I mean, checkout this PR, then add dump([$timeout, $remaining]); after the second "if" below, and run tests with ./phpunit src/Symfony/Component/HttpClient/ --filter Amp.*NotATimeout.
You'll see something like:

array:2 [
  0 => 0.9
  1 => 0.87336587905884
]

which means that the delay expired 0.87336587905884 seconds earlier than expected.
Do I miss something or could this be a bug in AMP's event loop?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added two failing tests in amphp/amp#319, one of those is expected to fail, the other isn't.

@nicolas-grekas nicolas-grekas changed the base branch from master to 5.1 May 25, 2020 17:47
@fabpot
Copy link
Member

fabpot commented May 26, 2020

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 4739835 into symfony:5.1 May 26, 2020
@nicolas-grekas nicolas-grekas deleted the hc-amp-fix branch May 26, 2020 06:58
@fabpot fabpot mentioned this pull request May 26, 2020
nicolas-grekas added a commit that referenced this pull request Jun 9, 2020
…Client (nicolas-grekas)

This PR was merged into the 5.1 branch.

Discussion
----------

[HttpClient] improve monitoring of timeouts with AmpHttpClient

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Replaces #36960

Commits
-------

548818d [HttpClient] improve monitoring of timeouts with AmpHttpClient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.