Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kondaka <[email protected]>
  • Loading branch information
Krishna Kondaka committed Jul 11, 2023
1 parent 2935c26 commit 983e778
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void processSqsMessages_should_return_at_least_one_message(final int numberOfObj

@ParameterizedTest
@ValueSource(ints = {1})
void processSqsMessages_should_return_at_least_one_message_with_acks_with_callback_invoked_after_processS3Object_finishes(final int numberOfObjectsToWrite) throws IOException {
void processSqsMessages_should_return_at_least_one_message_with_acks_with_callback_invoked_after_processS3Object_finishes(final int numberOfObjectsToWrite) throws IOException, InterruptedException {
writeToS3(numberOfObjectsToWrite);

when(s3SourceConfig.getAcknowledgements()).thenReturn(true);
Expand Down Expand Up @@ -205,17 +205,15 @@ void processSqsMessages_should_return_at_least_one_message_with_acks_with_callba
ready.set(true);
this.notify();
}
try {
Thread.sleep(10000);
} catch (Exception e){}
Thread.sleep(10000);

assertThat(deletedCount, equalTo((double)1.0));
assertThat(ackCallbackCount, equalTo((double)1.0));
}

@ParameterizedTest
@ValueSource(ints = {1})
void processSqsMessages_should_return_at_least_one_message_with_acks_with_callback_invoked_before_processS3Object_finishes(final int numberOfObjectsToWrite) throws IOException {
void processSqsMessages_should_return_at_least_one_message_with_acks_with_callback_invoked_before_processS3Object_finishes(final int numberOfObjectsToWrite) throws IOException, InterruptedException {
writeToS3(numberOfObjectsToWrite);

when(s3SourceConfig.getAcknowledgements()).thenReturn(true);
Expand Down Expand Up @@ -277,10 +275,7 @@ void processSqsMessages_should_return_at_least_one_message_with_acks_with_callba
sinkThread.start();
final int sqsMessagesProcessed = objectUnderTest.processSqsMessages();

try {
Thread.sleep(10000);
} catch (Exception e){}

Thread.sleep(10000);

assertThat(deletedCount, equalTo((double)1.0));
assertThat(ackCallbackCount, equalTo((double)1.0));
Expand Down

0 comments on commit 983e778

Please sign in to comment.