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-15148: Some integration tests are running as unit tests #13973

Merged
merged 2 commits into from Jul 12, 2023

Conversation

eziosudo
Copy link
Contributor

@eziosudo eziosudo commented Jul 6, 2023

Change these tests by adding @tag("integration") and @category(IntegrationTest.class).
./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.MetricsReporterIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.LagFetchIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.OptimizedKTableIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.RegexSourceIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.PurgeRepartitionTopicIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.StandbyTaskCreationIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.MetricsIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.KTableKTableForeignKeyInnerJoinMultiIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.KTableKTableForeignKeyJoinDistributedTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.NamedTopologyIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.QueryableStateIntegrationTest.html ./streams/build/reports/tests/unitTest/classes/org.apache.kafka.streams.integration.KTableEfficientRangeQueryTest.html ./connect/runtime/build/reports/tests/unitTest/classes/org.apache.kafka.connect.integration.StartAndStopCounterTest.html ./connect/runtime/build/reports/tests/unitTest/classes/org.apache.kafka.connect.integration.StartAndStopLatchTest.html

"stream" module's unitTest time reduced from 25 minutes to 17 minutes, "connect" module's unitTest time reduced from 18 minutes to 12 minutes.
Screenshot 2023-07-06 at 12 51 21 PM
Screenshot 2023-07-06 at 12 52 33 PM

Committer Checklist (excluded from commit message)

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

@eziosudo eziosudo changed the title exclude integration tests in "./gradlew unitTest" by adding @Tag("integration") and @Category(IntegrationTest.class) KAFKA-15148: exclude integration tests in "./gradlew unitTest" by adding @Tag("integration") and @Category(IntegrationTest.class) Jul 6, 2023
@eziosudo eziosudo changed the title KAFKA-15148: exclude integration tests in "./gradlew unitTest" by adding @Tag("integration") and @Category(IntegrationTest.class) KAFKA-15148: Some integration tests are running as unit tests Jul 6, 2023
@eziosudo
Copy link
Contributor Author

eziosudo commented Jul 7, 2023

@divijvaidya Hi, can you help to review this PR?

@divijvaidya divijvaidya added the tests Test fixes (including flaky tests) label Jul 8, 2023
@divijvaidya
Copy link
Contributor

Thank you for addressing the comments. Are the results in the description updated after the latest change? If not, can you please update them. My motivation of asking this is to ensure that we are not accidentally removing the tests from running in either unitTest or integTests.

…egration")

exclude integration tests in "./gradlew unitTest" by adding @category(IntegrationTest.class)
@eziosudo eziosudo force-pushed the KAFKA-15148_tag_integration_ut branch from b0fb50f to 6479d5c Compare July 11, 2023 04:13
@eziosudo
Copy link
Contributor Author

Thank you for addressing the comments. Are the results in the description updated after the latest change? If not, can you please update them. My motivation of asking this is to ensure that we are not accidentally removing the tests from running in either unitTest or integTests.

I agree. We shall be careful with every merge. So I run all the tests agian.

These are integration tests in trunk branch after running './gradlew unitTest':
image

In my branch I run './gradlew unitTest' then filter integration tests and got nothing, which means integration cases are excluded.
image

After run './gradle integrationTest' in my branch, I get all the integration tests I changed in this PR, which means they are all included.
image
image

@divijvaidya
Copy link
Contributor

Thank you for the change. I have verified that the modified tests are running as part of the CI as well. Merging in.

@divijvaidya divijvaidya merged commit 170f5f4 into apache:trunk Jul 12, 2023
1 check failed
Cerchie pushed a commit to Cerchie/kafka that referenced this pull request Jul 25, 2023
…ning as unit tests (apache#13973)

Reviewers: Divij Vaidya <diviv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Test fixes (including flaky tests)
Projects
None yet
2 participants