From bb7ad1f0e77e9a0a10b0da6ae1b8e65709a70b19 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 14 Feb 2024 12:39:42 +0100 Subject: [PATCH] fix --- .../src/main/scala/algoliasearch/config/Host.scala | 2 +- .../internal/interceptor/RetryStrategy.scala | 2 +- templates/php/tests/client/suite.mustache | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/config/Host.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/config/Host.scala index d59805887c..5f54663420 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/config/Host.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/config/Host.scala @@ -11,4 +11,4 @@ package algoliasearch.config * @param port * Host port */ -case class Host(url: String, callTypes: Set[CallType], scheme: String = "https", port : Option[Int] = None) +case class Host(url: String, callTypes: Set[CallType], scheme: String = "https", port: Option[Int] = None) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/internal/interceptor/RetryStrategy.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/internal/interceptor/RetryStrategy.scala index b12b8640ff..a18ac0d0b6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/internal/interceptor/RetryStrategy.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/internal/interceptor/RetryStrategy.scala @@ -59,7 +59,7 @@ private[algoliasearch] class RetryStrategy(hosts: List[StatefulHost]) extends In urlBuilder.port(host.getPort.get) } val newUrl = urlBuilder.build() - + val newRequest = request.newBuilder().url(newUrl).build() chain.withConnectTimeout( chain.connectTimeoutMillis() * (host.getRetryCount + 1), diff --git a/templates/php/tests/client/suite.mustache b/templates/php/tests/client/suite.mustache index 4597ade398..e938809480 100644 --- a/templates/php/tests/client/suite.mustache +++ b/templates/php/tests/client/suite.mustache @@ -93,12 +93,12 @@ class {{clientPrefix}}Test extends TestCase implements HttpClientInterface $this->recordedRequest['responseTimeout'] ); {{/testTimeouts}} - {{#testResult}} + {{#testResponse}} $this->assertEquals( - '{{{match}}}', - json_encode($result) + '{{{match.parameters}}}', + json_encode($res) ); - {{/testResult}} + {{/testResponse}} {{/match}} {{/isError}} {{/steps}}