Skip to content

Commit 747aee0

Browse files
Add UTs, and fix a couple bugs
1 parent 2f01391 commit 747aee0

File tree

3 files changed

+752
-1
lines changed

3 files changed

+752
-1
lines changed

src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedAsyncClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public CompletableFuture<ReceiveMessageResponse> receiveMessage(ReceiveMessageRe
210210
// For each received message check if they are stored in S3.
211211
Optional<String> largePayloadAttributeName = getReservedAttributeNameIfPresent(
212212
message.messageAttributes());
213-
if (largePayloadAttributeName.isPresent()) {
213+
if (!largePayloadAttributeName.isPresent()) {
214214
// Not S3
215215
modifiedMessageFutures.add(CompletableFuture.completedFuture(messageBuilder.build()));
216216
} else {
@@ -361,6 +361,7 @@ public CompletableFuture<SendMessageBatchResponse> sendMessageBatch(
361361
if (clientConfiguration.isAlwaysThroughS3()
362362
|| isLarge(clientConfiguration.getPayloadSizeThreshold(), entry)) {
363363
batchEntryFutures.add(storeMessageInS3(entry));
364+
hasS3Entries = true;
364365
} else {
365366
batchEntryFutures.add(CompletableFuture.completedFuture(entry));
366367
}

0 commit comments

Comments
 (0)