Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-17121

junit-platform.properties files in published artifacts pollute the test classpath of consumers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.7.1
    • 3.9.0
    • clients, core
    • None

    Description

      https://github.com/apache/kafka/commit/6e998cffdd33e343945877ccee1fec8337c7d57d added junit-platform.properties files to the test-classified kafka-clients and kafka-server-common artifacts. When a consumer is using these artifacts for its own Kafka-related tests, a warning is logged when the tests are launched:

      Jul 11, 2024 10:26:21 AM org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
      WARNING: Discovered 2 'junit-platform.properties' configuration files in the classpath; only the first will be used.
      

      The fact that only the first will be used is potentially problematic. Depending on the ordering of the classpath, it may result in a consumer's own properties being ignored and Kafka's being used instead.

      Can the junit-platform.properties files be removed from the published artifacts? As far as I can tell, they were only intended to affect Kafka's own tests.

      Attachments

        Issue Links

          Activity

            People

              kangning kangning.li
              awilkinson Andy Wilkinson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: