use of software.amazon.awssdk.http.crt.internal.AwsCrtResponseBodyPublisher in project aws-sdk-java-v2 by aws.
the class AwsCrtResponseBodyPublisherReactiveStreamCompatTest method createPublisher.
@Override
public Publisher<ByteBuffer> createPublisher(long elements) {
HttpClientConnection connection = mock(HttpClientConnection.class);
HttpStream stream = mock(HttpStream.class);
AwsCrtResponseBodyPublisher bodyPublisher = new AwsCrtResponseBodyPublisher(connection, stream, new CompletableFuture<>(), Integer.MAX_VALUE);
for (long i = 0; i < elements; i++) {
bodyPublisher.queueBuffer(UUID.randomUUID().toString().getBytes());
}
bodyPublisher.setQueueComplete();
return bodyPublisher;
}
Aggregations