Skip to content

Commit f0ce7cb

Browse files
committed
Removing test cases related to UrlConnectionHttp since adding depenency in protocol-test for urlConnectionClient cause failues since it uses default Client all the places
1 parent 31a12fc commit f0ce7cb

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/MakeHttpRequestStage.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ private HttpExecuteResponse executeHttpRequest(SdkHttpFullRequest request, Reque
7575
context.apiCallAttemptTimeoutTracker().abortable(requestCallable);
7676

7777
Pair<HttpExecuteResponse, Duration> measuredExecute = MetricUtils.measureDurationUnsafe(requestCallable);
78+
7879
attemptMetricCollector.reportMetric(CoreMetric.SERVICE_CALL_DURATION, measuredExecute.right());
80+
7981
return measuredExecute.left();
8082
}
8183

test/protocol-tests/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,6 @@
194194
<version>${awsjavasdk.version}</version>
195195
<scope>test</scope>
196196
</dependency>
197-
<dependency>
198-
<groupId>software.amazon.awssdk</groupId>
199-
<artifactId>url-connection-client</artifactId>
200-
<version>${awsjavasdk.version}</version>
201-
<scope>test</scope>
202-
</dependency>
203197
</dependencies>
204198

205199
<build>

test/protocol-tests/src/test/java/software/amazon/awssdk/protocol/tests/connection/SyncClientConnectionInterruptionTest.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import software.amazon.awssdk.core.retry.RetryPolicy;
4444
import software.amazon.awssdk.http.SdkHttpClient;
4545
import software.amazon.awssdk.http.apache.ApacheHttpClient;
46-
import software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient;
4746
import software.amazon.awssdk.metrics.MetricCollection;
4847
import software.amazon.awssdk.metrics.MetricPublisher;
4948
import software.amazon.awssdk.metrics.MetricRecord;
@@ -161,20 +160,15 @@ public void close() {
161160
client.close();
162161
}
163162

164-
private static Stream<Arguments> httpClientImplementation() {
165-
return Stream.of(Arguments.of(ApacheHttpClient.create()),
166-
Arguments.of(UrlConnectionHttpClient.create()));
167-
}
168-
169163
/**
170164
* Service Latency is set to high value say X.
171165
* Api timeout value id set to 1/3 of X.
172166
* And we interrupt the thread at 90% of X.
173167
* In this case since the ApiTimeOut first happened we should get ApiTimeOut Exception and not the interrupt.
174168
*/
175-
@ParameterizedTest
176-
@MethodSource("httpClientImplementation")
177-
void interruptionDueToApiTimeOut_followed_byInterruptCausesOnlyTimeOutException(SdkHttpClient httpClient) throws InterruptedException {
169+
@Test
170+
void interruptionDueToApiTimeOut_followed_byInterruptCausesOnlyTimeOutException() throws InterruptedException {
171+
SdkHttpClient httpClient = ApacheHttpClient.create();
178172
Integer SERVER_RESPONSE_DELAY = 3000;
179173
stubPostRequest("/2016-03-11/allTypes", aResponse().withFixedDelay(SERVER_RESPONSE_DELAY), SAMPLE_BODY);
180174
ExceptionInThreadRun exception = new ExceptionInThreadRun();
@@ -197,9 +191,10 @@ void interruptionDueToApiTimeOut_followed_byInterruptCausesOnlyTimeOutException(
197191
client.close();
198192
}
199193

200-
@ParameterizedTest
201-
@MethodSource("httpClientImplementation")
202-
void sdkClientInterrupted_while_connectionIsInProgress(SdkHttpClient httpClient) throws InterruptedException {
194+
195+
@Test
196+
void sdkClientInterrupted_while_connectionIsInProgress() throws InterruptedException {
197+
SdkHttpClient httpClient = ApacheHttpClient.create();
203198
Integer SERVER_RESPONSE_DELAY = 3000;
204199
stubPostRequest("/2016-03-11/allTypes", aResponse().withFixedDelay(SERVER_RESPONSE_DELAY), SAMPLE_BODY);
205200
ExceptionInThreadRun exception = new ExceptionInThreadRun();

0 commit comments

Comments
 (0)