use of software.amazon.awssdk.crt.s3.S3MetaRequest in project aws-sdk-java-v2 by aws.
the class S3CrtAsyncHttpClientTest method cancelRequest_shouldForwardCancellation.
@Test
public void cancelRequest_shouldForwardCancellation() {
AsyncExecuteRequest asyncExecuteRequest = getExecuteRequestBuilder().build();
S3MetaRequest metaRequest = Mockito.mock(S3MetaRequest.class);
when(s3Client.makeMetaRequest(any(S3MetaRequestOptions.class))).thenReturn(metaRequest);
CompletableFuture<Void> future = asyncHttpClient.execute(asyncExecuteRequest);
future.cancel(false);
verify(metaRequest).cancel();
}
use of software.amazon.awssdk.crt.s3.S3MetaRequest in project aws-sdk-java-v2 by aws.
the class S3CrtAsyncHttpClientTest method cancelRequest_shouldForwardCancellation.
@Test
public void cancelRequest_shouldForwardCancellation() {
AsyncExecuteRequest asyncExecuteRequest = getExecuteRequestBuilder().build();
S3MetaRequest metaRequest = Mockito.mock(S3MetaRequest.class);
when(s3Client.makeMetaRequest(any(S3MetaRequestOptions.class))).thenReturn(metaRequest);
CompletableFuture<Void> future = asyncHttpClient.execute(asyncExecuteRequest);
future.cancel(false);
verify(metaRequest).cancel();
}
Aggregations