Andy Wilkinson created KAFKA-17121:
--------------------------------------
Summary: junit-platform.properties files in published artifacts
pollute the test classpath of consumers
Key: KAFKA-17121
URL: https://issues.apache.org/jira/browse/KAFKA-17121
Project: Kafka
Issue Type: Bug
Components: clients, core
Affects Versions: 3.7.1
Reporter: Andy Wilkinson
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:
{code}
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.
{code}
The fact that only the first will be used is potentially problematic. Depending
on the ordering 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 attended to affect Kafka's own
tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)