Skip to content
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

AWS Lambda Sink flaky tests & logging #4723

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

dlvenable
Copy link
Member

Description

This fixes a flaky test.

LambdaSinkServiceTest > lambda_sink_test_batch_enabled() FAILED
    org.mockito.exceptions.verification.WantedButNotInvoked at LambdaSinkServiceTest.java:316

#3481 (comment)

Two changes:

  • Use a max event count of 1 to verify that we call the Lambda API.
  • Adds SLF4J logging to this project. That is partially how I was able to find the cause.

Issues Resolved

N/A

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…LF4J logging for these tests.

Signed-off-by: David Venable <dlv@amazon.com>
@dlvenable
Copy link
Member Author

Locally, I changed this test to be a @RepeatedTest(20). When running, I found that it typically failed 18 out of the 20 times! With the change introduced here, it passed in all 20 runs.

@dlvenable dlvenable merged commit 5420162 into opensearch-project:main Jul 11, 2024
45 of 47 checks passed
@dlvenable dlvenable deleted the lambda-sink-flaky branch July 12, 2024 14:18
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
…LF4J logging for these tests. (opensearch-project#4723)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
…LF4J logging for these tests. (opensearch-project#4723)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 30, 2024
…LF4J logging for these tests. (opensearch-project#4723)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 8, 2024
…LF4J logging for these tests. (opensearch-project#4723)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 12, 2024
…LF4J logging for these tests. (opensearch-project#4723)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 14, 2024
…LF4J logging for these tests. (opensearch-project#4723)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants