Skip to content

Commit db38d71

Browse files
committed
remove unneeded future checking with new wrapper
1 parent 9cf6eed commit db38d71

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientCoreTest.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
import java.lang.reflect.Proxy;
3636
import java.util.Arrays;
3737
import java.util.concurrent.CompletableFuture;
38-
import java.util.concurrent.ExecutionException;
39-
import java.util.concurrent.Future;
4038
import java.util.function.Function;
4139
import java.util.stream.Stream;
4240
import org.junit.jupiter.api.AfterAll;
@@ -118,12 +116,7 @@ void prepTest() {
118116
server.beforeTestExecution(null);
119117
}
120118

121-
private void validateOperationResponse(String operation, Object response)
122-
throws ExecutionException, InterruptedException {
123-
if (response instanceof Future) {
124-
response = ((Future<?>) response).get();
125-
}
126-
119+
private void validateOperationResponse(String operation, Object response) {
127120
assertThat(response).isNotNull();
128121
assertThat(response.getClass().getSimpleName()).startsWith(operation);
129122

@@ -334,8 +327,7 @@ private static Stream<Arguments> provideArguments() {
334327
@ParameterizedTest
335328
@MethodSource("provideArguments")
336329
void testSendDynamoDbRequestWithBuilderAndMockedResponse(
337-
String operation, Function<DynamoDbClient, Object> call)
338-
throws ExecutionException, InterruptedException {
330+
String operation, Function<DynamoDbClient, Object> call) {
339331
DynamoDbClientBuilder builder = DynamoDbClient.builder();
340332
configureSdkClient(builder);
341333
DynamoDbClient client =
@@ -352,8 +344,7 @@ void testSendDynamoDbRequestWithBuilderAndMockedResponse(
352344
@ParameterizedTest
353345
@MethodSource("provideArguments")
354346
void testSendDynamoDbAsyncRequestWithBuilderAndMockedResponse(
355-
String operation, Function<DynamoDbClient, Object> call)
356-
throws ExecutionException, InterruptedException {
347+
String operation, Function<DynamoDbClient, Object> call) {
357348
DynamoDbAsyncClientBuilder builder = DynamoDbAsyncClient.builder();
358349
configureSdkClient(builder);
359350
DynamoDbAsyncClient client =

0 commit comments

Comments
 (0)