Skip to content

Commit c6370fe

Browse files
[HttpClient] fix test
1 parent f4381dc commit c6370fe

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Tests/AsyncDecoratorTraitTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\HttpClient\Tests;
1313

1414
use Symfony\Component\HttpClient\AsyncDecoratorTrait;
15-
use Symfony\Component\HttpClient\CurlHttpClient;
1615
use Symfony\Component\HttpClient\DecoratorTrait;
1716
use Symfony\Component\HttpClient\HttpClient;
1817
use Symfony\Component\HttpClient\Response\AsyncContext;
@@ -32,7 +31,7 @@ protected function getHttpClient(string $testCase, \Closure $chunkFilter = null,
3231
}
3332

3433
if ('testTimeoutOnDestruct' === $testCase) {
35-
return new CurlHttpClient();
34+
return HttpClient::create();
3635
}
3736

3837
$chunkFilter = $chunkFilter ?? static function (ChunkInterface $chunk, AsyncContext $context) { yield $chunk; };
@@ -58,10 +57,10 @@ public function request(string $method, string $url, array $options = []): Respo
5857
public function testTimeoutOnDestruct()
5958
{
6059
if (HttpClient::create() instanceof NativeHttpClient) {
61-
parent::testTimeoutOnDestruct();
62-
} else {
63-
HttpClientTestCase::testTimeoutOnDestruct();
60+
$this->markTestSkipped('NativeHttpClient doesn\'t support opening concurrent requests.');
6461
}
62+
63+
HttpClientTestCase::testTimeoutOnDestruct();
6564
}
6665

6766
public function testRetry404()

0 commit comments

Comments
 (0)