Skip to content

KAFKA-20553: Eliminate the dependencies on sourceSets.test.output for streams#22521

Open
FrankYang0529 wants to merge 1 commit into
apache:trunkfrom
FrankYang0529:KAFKA-20553
Open

KAFKA-20553: Eliminate the dependencies on sourceSets.test.output for streams#22521
FrankYang0529 wants to merge 1 commit into
apache:trunkfrom
FrankYang0529:KAFKA-20553

Conversation

@FrankYang0529

@FrankYang0529 FrankYang0529 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Gradle test fixtures to the clients module and removes all dependencies
on sourceSets.test.output. We should revisit other usages in this JIRA.
This will simplify the dependency graph and unblock the upgrade to
Gradle 9.5+

This patch is working on streams and streams:integration-tests.

Reviewers: Chia-Ping Tsai chia7712@gmail.com, Matthias J. Sax
matthias@confluent.io

@FrankYang0529 FrankYang0529 changed the title KAFKA-20553: Eliminate the dependencies on sourceSets.test.output for streams KAFKA-20553: Eliminate the dependencies on sourceSets.test.output for streams (WIP) Jun 9, 2026
@github-actions github-actions Bot added streams build Gradle build or GitHub Actions labels Jun 9, 2026
@FrankYang0529 FrankYang0529 changed the title KAFKA-20553: Eliminate the dependencies on sourceSets.test.output for streams (WIP) KAFKA-20553: Eliminate the dependencies on sourceSets.test.output for streams Jun 11, 2026
@FrankYang0529 FrankYang0529 requested a review from chia7712 June 11, 2026 00:49

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many tests that have been moved to testfixtures. Would you mind explaining the reasoning? IIRC, the test files should be in the test folder

@FrankYang0529

Copy link
Copy Markdown
Member Author

There are many tests that have been moved to testfixtures. Would you mind explaining the reasoning? IIRC, the test files should be in the test folder

These classes are referenced by test suite in integration tests:

  • ForeignKeyJoinSuite
    • KTableKTableForeignKeyJoinScenarioTest.java
    • CombinedKeySchemaTest.java
    • ResponseJoinProcessorSupplierTest.java
    • SubscriptionResponseWrapperSerdeTest.java
    • SubscriptionWrapperSerdeTest.java
  • StoreQuerySuite
    • CompositeReadOnlyKeyValueStoreTest.java
    • CompositeReadOnlySessionStoreTest.java
    • CompositeReadOnlyWindowStoreTest.java
    • GlobalStateStoreProviderTest.java
    • StreamThreadStateStoreProviderTest.java
    • WrappingStoreProviderTest.java

Following classes are referenced by above test classes:

  • InternalMockProcessorContext.java
  • MockInternalProcessorContext.java
  • MockRecordCollector.java
  • NoOpReadOnlyStore.java
  • ReadOnlySessionStoreStub.java
  • StateStoreProviderStub.java
  • KeyValueIteratorStub.java
  • StateManagerStub.java
  • MockStreamsMetrics.java
  • NoOpWindowStore.java
  • ReadOnlyWindowStoreStub.java

@chia7712

Copy link
Copy Markdown
Member

These classes are referenced by test suite in integration tests:

Would it be better to split ForeignKeyJoinSuite into both the streams and integration-tests modules? Stashing actual tests in testfixtures is a clear anti-pattern

Comment thread build.gradle Outdated
java {
srcDirs = []
}
scala {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only four files left that require Scala: StreamToTableJoinScalaIntegrationTestImplicitSerdes, StreamToTableJoinScalaIntegrationTestBase, StreamToTableJoinTestData, and WordCountTest. They seem to be quite old, and we already have similar tests like WordCountDemoTest. Since we are phasing out Scala, I would prefer to just remove them.

@mjsax WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would reduce test coverage, particularly StreamToTableJoinScalaIntegrationTestImplicitSerdes which tests Scala implicits.

But I can frankly not remember when I reviewed a Scala PR the last time, so the risk of reducing test coverage should be very small.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StreamToTableJoinScalaIntegrationTestImplicitSerdes which tests Scala implicits.

nice point. I'd like to open another PR to handle it first.

  1. rewrite StreamToTableJoinScalaIntegrationTestImplicitSerdes using TopologyTestDriver to avoid using a true kafka cluster
  2. move it to the streams-scala module
  3. remove StreamToTableJoinScalaIntegrationTestBase, StreamToTableJoinTestData, and WordCountTest
  4. remove the scala dependency from streams:integration-tests module

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chia7712

Copy link
Copy Markdown
Member

@FrankYang0529 please fix the conflicts

Signed-off-by: PoAn Yang <payang@apache.org>
Comment thread build.gradle
archivesName = "kafka-streams-integration-tests"
}

apply plugin: 'java-test-fixtures'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the purpose of adding testfixtures to streams:integration-tests was to let the tools module use EmbeddedKafkaCluster. However, I grepped the usages and it seems they can be replaced by ClusterInstance, which would prevent introducing unnecessary module complexity

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants