From 40aadb23c8d2dfbc14c2c5c95ece052f61491cbe Mon Sep 17 00:00:00 2001 From: hdavidh Date: Fri, 20 Sep 2024 12:47:35 -0700 Subject: [PATCH] Update assertions for user agent in S3 integ tests --- .../urlconnection/S3WithUrlHttpClientIntegrationTest.java | 4 ++-- .../amazon/awssdk/services/s3/S3IntegrationTestBase.java | 4 ++-- .../S3ControlIntegrationTestBase.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/http-clients/url-connection-client/src/it/java/software/amazon/awssdk/http/urlconnection/S3WithUrlHttpClientIntegrationTest.java b/http-clients/url-connection-client/src/it/java/software/amazon/awssdk/http/urlconnection/S3WithUrlHttpClientIntegrationTest.java index d8f0ade74212..194c09e3b33b 100644 --- a/http-clients/url-connection-client/src/it/java/software/amazon/awssdk/http/urlconnection/S3WithUrlHttpClientIntegrationTest.java +++ b/http-clients/url-connection-client/src/it/java/software/amazon/awssdk/http/urlconnection/S3WithUrlHttpClientIntegrationTest.java @@ -147,8 +147,8 @@ private static final class UserAgentVerifyingInterceptor implements ExecutionInt @Override public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) { - assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io/sync"); - assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http/UrlConnection"); + assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io#sync"); + assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http#UrlConnection"); } } diff --git a/services/s3/src/it/java/software/amazon/awssdk/services/s3/S3IntegrationTestBase.java b/services/s3/src/it/java/software/amazon/awssdk/services/s3/S3IntegrationTestBase.java index 02afbebb7f72..b942904810b7 100644 --- a/services/s3/src/it/java/software/amazon/awssdk/services/s3/S3IntegrationTestBase.java +++ b/services/s3/src/it/java/software/amazon/awssdk/services/s3/S3IntegrationTestBase.java @@ -147,8 +147,8 @@ public UserAgentVerifyingExecutionInterceptor(String clientName, ClientType clie @Override public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) { - assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io/" + clientType.name()); - assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http/" + clientName); + assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io#" + clientType.name()); + assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http#" + clientName); } } } diff --git a/services/s3control/src/it/java/software.amazon.awssdk.services.s3control/S3ControlIntegrationTestBase.java b/services/s3control/src/it/java/software.amazon.awssdk.services.s3control/S3ControlIntegrationTestBase.java index 35f387236166..738406136ef8 100644 --- a/services/s3control/src/it/java/software.amazon.awssdk.services.s3control/S3ControlIntegrationTestBase.java +++ b/services/s3control/src/it/java/software.amazon.awssdk.services.s3control/S3ControlIntegrationTestBase.java @@ -143,8 +143,8 @@ public UserAgentVerifyingExecutionInterceptor(String clientName, ClientType clie @Override public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) { - assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io/" + clientType.name()); - assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http/" + clientName); + assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io#" + clientType.name()); + assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http#" + clientName); } }