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

KAFKA-8319: Make KafkaStreamsTest a non-integration test class #8352

Merged
merged 1 commit into from Mar 25, 2020

Conversation

cadonna
Copy link
Contributor

@cadonna cadonna commented Mar 25, 2020

Previous KafkaStreamsTest takes 2min20s on my local laptop, because lots of its integration test which is producing / consuming records, and checking state directory file system takes lots of time. On the other hand, these tests should be well simplified with mocks.

This test reduces the test from a clumsy integration test class into a unit tests with mocks of its internal modules. And some other test functions should not be in KafkaStreamsTest actually and have been moved to other modular test classes. Now it takes 2s.

Also it helps removing the potential flakiness of the following (some of them are claimed resolved only because we have not seen them recently, but after looking at the test code I can verify they are still flaky):

Reviewers: Bill Bejeck bill@confluent.io, John Roesler john@confluent.io, Bruno Cadonna bruno@confluent.io

This commit was cherry-picked from trunk and adapted.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

…e#7382)

Previous KafkaStreamsTest takes 2min20s on my local laptop, because lots of its integration test which is producing / consuming records, and checking state directory file system takes lots of time. On the other hand, these tests should be well simplified with mocks.

This test reduces the test from a clumsy integration test class into a unit tests with mocks of its internal modules. And some other test functions should not be in KafkaStreamsTest actually and have been moved to other modular test classes. Now it takes 2s.

Also it helps removing the potential flakiness of the following (some of them are claimed resolved only because we have not seen them recently, but after looking at the test code I can verify they are still flaky):

* KAFKA-5818 (the original JIRA ticket indeed exposed a real issue that has been fixed, but the test itself remains flaky)
* KAFKA-6215
* KAFKA-7921
* KAFKA-7990
* KAFKA-8319
* KAFKA-8427

Reviewers: Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Bruno Cadonna <bruno@confluent.io>

This commit was cherry-picked from trunk and adapted.
@cadonna
Copy link
Contributor Author

cadonna commented Mar 25, 2020

Call for review: @guozhangwang

@guozhangwang
Copy link
Contributor

test this please

@guozhangwang guozhangwang merged commit b9dd203 into apache:2.1 Mar 25, 2020
@mjsax mjsax added the streams label Mar 25, 2020
@cadonna cadonna deleted the fix_flaky_KafkaStreamsTest_2.1 branch March 26, 2020 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants