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

Use awaitility to read data in Kafka buffer tests to fix flakiness #4703

Merged

Conversation

dlvenable
Copy link
Member

@dlvenable dlvenable commented Jul 2, 2024

Description

The current tests for KafkaBufferIT and KafkaBuffer_KmsIT wait on the buffer in a single call. These tests are flaky with Kafka 2.8.1. I found that there are transient errors happening here. But, 10 seconds may not be enough time for these errors.

So I've updated these tests to use awaitility. The tests can wait up to 20 seconds, but each call only waits half a second, so the tests are little faster overall.

I'm seeing that the tests against 2.8.1 are working well now.

Issues Resolved

Contributes toward #4168

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.

@dlvenable
Copy link
Member Author

These changes resulted in passing builds locally and in my fork. However, now the tests are failing. Interestingly, the failures have moved further down the tests.

New failures:

KafkaBufferIT > writeBigJson_and_read() FAILED
    java.lang.AssertionError at KafkaBufferIT.java:220

KafkaBufferIT > write_and_read() FAILED
    java.lang.AssertionError at KafkaBufferIT.java:149

KafkaBufferIT > write_and_read_max_request_test() FAILED
    java.lang.AssertionError at KafkaBufferIT.java:190

@dlvenable dlvenable merged commit 82d811a into opensearch-project:main Sep 4, 2024
45 of 50 checks passed
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.

2 participants