Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpClient] Fix missing abstract arg #38476

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
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
abstract_arg('delay ms'),
abstract_arg('multiplier'),
abstract_arg('max delay ms'),
abstract_arg('jitter'),
])
->set('http_client.retry.abstract_httpstatuscode_decider', HttpStatusCodeDecider::class)
->abstract()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@
<xsd:attribute name="delay" type="xsd:integer" />
<xsd:attribute name="multiplier" type="xsd:float" />
<xsd:attribute name="max-delay" type="xsd:float" />
<xsd:attribute name="jitter" type="xsd:float" />
<xsd:attribute name="response_header" type="xsd:boolean" />
</xsd:complexType>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'delay' => 100,
'multiplier' => 2,
'max_delay' => 0,
'jitter' => 0.3,
]
],
'scoped_clients' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
delay="100"
max-delay="0"
max-retries="2"
multiplier="2">
multiplier="2"
jitter="0.3">
<framework:http-code>429</framework:http-code>
<framework:http-code>500</framework:http-code>
</framework:retry-failed>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ framework:
delay: 100
multiplier: 2
max_delay: 0
jitter: 0.3
scoped_clients:
foo:
base_uri: http://example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ public function testHttpClientRetry()
$this->assertSame(100, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(0));
$this->assertSame(2, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(1));
$this->assertSame(0, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(2));
$this->assertSame(0.3, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(3));
$this->assertSame(2, $container->getDefinition('http_client.retry')->getArgument(3));

$this->assertSame(RetryableHttpClient::class, $container->getDefinition('foo.retry')->getClass());
Expand Down