You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2024/09/21 00:44:00 UTC

[jira] [Commented] (KAFKA-17589) Move JUnit extensions to test-common module

    [ https://issues.apache.org/jira/browse/KAFKA-17589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883437#comment-17883437 ] 

Chia-Ping Tsai commented on KAFKA-17589:
----------------------------------------

{quote}

In order to avoid compile-time dependencies on "core" for ClusterTestExtension, we can leverage JUnit automatic extension loading with SPI [https://junit.org/junit5/docs/current/user-guide/#extensions-registration-automatic]

{quote}

We can move the ClusterTest-related test base code (`IntegrationTestHarness`, `KafkaServerTestHarness`, ... and related utils) from core to the test-common which can make test-common depend on only other modules' production code. By this change, other modules' test code can depend on test-common without circular dependencies trouble. This approach can work without SPI, right?

 

 

> Move JUnit extensions to test-common module
> -------------------------------------------
>
>                 Key: KAFKA-17589
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17589
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: David Arthur
>            Assignee: David Arthur
>            Priority: Major
>
> Create a new Gradle module "test-common" where our JUnit extensions and annotations can live. This module should have minimal dependencies.
> In order to avoid compile-time dependencies on "core" for ClusterTestExtension, we can leverage JUnit automatic extension loading with SPI https://junit.org/junit5/docs/current/user-guide/#extensions-registration-automatic
> We can also use this module as a place to keep a single copy of junit-platform.properties



--
This message was sent by Atlassian Jira
(v8.20.10#820010)