-
Notifications
You must be signed in to change notification settings - Fork 864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integeration tests for SQS Automatic Request Batching #5576
Merged
joviegas
merged 1 commit into
feature/master/sqs-batch-manager
from
joviegas/integ_tests
Sep 9, 2024
Merged
Integeration tests for SQS Automatic Request Batching #5576
joviegas
merged 1 commit into
feature/master/sqs-batch-manager
from
joviegas/integ_tests
Sep 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
davidh44
approved these changes
Sep 9, 2024
joviegas
merged commit Sep 9, 2024
caae0c4
into
feature/master/sqs-batch-manager
15 of 19 checks passed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 11, 2024
* Codegenerate BatchManager API under AsyncClient and Initail Interfaces for BatchManager (#5321) * Codegenerate BatchManager API under AsyncClient and Add empty initial Batchmanager interfaces and Implementations * Addressed review comments * Added Internal classes required for BatchManager Implementation * Revert "Added Internal classes required for BatchManager Implementation" This reverts commit 318969b. * Internal classes and RequestBatchManager Impelementation (#5418) * Added Internal classes required for BatchManager Implementation * Added Batch Send Implementation * Handled review comments * Handled review comments * Handled review comments * Made RequestBatchManager class a Abstract class * Checkstyle issues * Removed unused methods * New lines removed * Made public static to private state for sqsBatch functions * Constants added * Sonar cloud issues fixed * commit to check why test on codebuild * Increased Timeouts for get * Added abstract methods * Handled comments to remove Builders * Handled comments to take care when batchmanager closed while pending requests * Handled comments * Checkstyle issue * Added Consumer builders args for existing APIs of BatchManager (#5514) * Receive Batch Manager Implementation (#5488) * Add Recieve Buffer Queue And its related configuration * Update ReceiveBatch manager * Recieve Batch Manager Implementation * Receive Batch Manager Implemetation * Handled review comments * Checkstyle failure * Flsky test case fixed * Flaky test case fixed * Hamdled review comments * Handled comments * Removed ReceiveMessageCompletableFuture * SdkClosable implemented * Added ReceiveMessageBatchManager class for completeness * Checkstyle issues * Null checks * Handled comments from Zoe * Updated the defaults to 50ms same as V1 after surface area review * Revert "Updated the defaults to 50ms same as V1 after surface area review" This reverts commit e7d2295. * Bytes Based batching for SendMessageRequest Batching (#5540) * Initial changes * Initial changes 2 * Byte Based batching for SendMessage API * Byte Based batching for SendMessage API * Handled comments * Checkstyle issue * Add User Agent for Sqs Calls made using Automatic Batching Manager (#5546) * Add User Agent for Sqs Calls made using Automatic Batching Manager as hll/abm * Review comments * Update comments from PR 5488 (#5550) * Update comments of PR 5488 * Update comments from PR 5488 * Handled surface area review comments (#5563) * Initial version * Intermediate changes * Update after internal poll * ResponseCOnfiguration construction updated * RequestOverride configuration check added to Bypass batch manager * Handled review comments * Removed TODO since validations are handled in BatchPverrideConfiguration * Fix issue where the Scheduled Timeout was incorrectly completing the futures with empty messages (#5571) * Fix issue where the Scheduled Timeout was incorrectly completing the futures with empty messages * Handled review comments * Integ test for Automatic Request Batching (#5576) * feat(sqs): add BatchManager for client-side request batching to Amazon SQS The new BatchManager allows for simple request batching using client-side buffering, improving cost efficiency and reducing the number of requests sent to Amazon SQS. The client-side buffering supports up to 10 requests per batch and is supported by the SqsAsyncClient. Batched requests, along with receive message polling, help to increase throughput. * Add check for scheduledExecutor such that it not null when creating SqsAsyncBatchManager (#5582) * Add check for scheduledExecutor such that it not null when creating SqsAsyncBatchManager * Update services/sqs/src/test/java/software/amazon/awssdk/services/sqs/batchmanager/SqsAsyncBatchManagerBuilderTest.java Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com> * Update services/sqs/src/test/java/software/amazon/awssdk/services/sqs/batchmanager/SqsAsyncBatchManagerBuilderTest.java Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com> * Update services/sqs/src/test/java/software/amazon/awssdk/services/sqs/batchmanager/SqsAsyncBatchManagerBuilderTest.java Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com> --------- Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com> * Updating Timeouts in gets so that we dont wait infinitely --------- Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Summary of Testing in
RequestBatchManagerSqsIntegrationTest
This test class performs integration testing for AWS SQS batch manager, covering various message sending, receiving, and management scenarios using SQS.
Scenarios Covered:
Basic Message Sending:
sendTenMessages
: Sends 10 messages to a queue.sendTwentyMessages
: Sends 20 messages to a queue.Batching and Scheduling:
scheduleSendFiveMessages
: Sends 5 messages in a batch and checks batch processing time.scheduleTwoSendMessageBatches
: Sends 10 messages in two batches and checks batch behavior.Multi-threaded Message Sending:
sendMultipleMessagesWithMultiThread
: Sends messages using multiple threads and verifies concurrency.Messages to Different Queues:
scheduleFiveMessagesWithEachThreadToDifferentLocations
: Sends messages to different queues from multiple threads.Message Deletion:
deleteMessages
: Sends and deletes messages, ensuring batch deletion works.Visibility Timeout Change:
changeVisibilityMessages
: Changes visibility timeout of messages after sending.Large Message Handling:
sendMessagesWhichCanExceed256KiBCollectively
: Sends large messages (256 KiB) and verifies correct handling.Queue Management:
createSendMessageRequestsForDifferentDestinations
: Creates multiple queues and sends messages to them.Key Features:
Summary of Testing in
ResponseBatchManagerSqsIntegrationTest
This test class performs integration testing for AWS SQS response batch manager, focusing on message sending, receiving, and processing via SQS.
Scenarios Covered:
Basic Message Receiving:
simpleReceiveMessagesWithDefaultConfiguration
: Sends 10 messages and receives them with default batch manager settings. Ensures no message attributes or system attributes are present.Custom Configuration for Message Receiving:
simpleReceiveMessagesWithCustomConfigurations
: Tests receiving messages with custom configurations (e.g., wait time, message attributes). Ensures message attributes and system attributes are correctly processed.Request-Level Max Message and Wait Time Handling:
requestLevelMaxMessageAndWaitTimeIsHonoured
: Ensures the request-level configurations likemaxNumberOfMessages
andwaitTimeSeconds
are respected when receiving and processing messages. Verifies message deletion after receiving each message.Key Features:
License