Skip to content

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

Merged
guozhangwang merged 1 commit intoapache:2.1from
cadonna:fix_flaky_KafkaStreamsTest_2.1
Mar 25, 2020
Merged

KAFKA-8319: Make KafkaStreamsTest a non-integration test class#8352
guozhangwang merged 1 commit intoapache:2.1from
cadonna:fix_flaky_KafkaStreamsTest_2.1

Conversation

@cadonna
Copy link
Copy Markdown
Member

@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
Copy Markdown
Member Author

cadonna commented Mar 25, 2020

Call for review: @guozhangwang

@guozhangwang
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

3 participants