LIU Xiao created FLINK-22610:
--------------------------------
Summary: The test-jar of flink-connector-kafka should include all
test classes
Key: FLINK-22610
URL: https://issues.apache.org/jira/browse/FLINK-22610
Project: Flink
Issue Type: Bug
Components: Connectors / Kafka
Affects Versions: 1.12.3, 1.13.0
Reporter: LIU Xiao
The test-jar of old kafka connector (flink-connector-kafka-base and
flink-connector-kafka-0.11) includes convenient utility classes
(KafkaTestEnvironment and KafkaTestEnvironmentImpl, etc.) to start an embedded
kafka in unit test, and we used the utility classes to build some test cases
for our project.
Now the utility classes other than KafkaTestEnvironmentImpl seem to be gone in
test-jar of new kafka connector (flink-connector-kafka), and I find that is
because they are not included in the configuration of maven-jar-plugin in
pom.xml:
{code:java}
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>**/KafkaTestEnvironmentImpl*</include>
<include>META-INF/LICENSE</include>
<include>META-INF/NOTICE</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
{code}
This configuration seems to be inherited from flink-connector-kafka-0.11, but I
think the configuration of flink-connector-kafka-base should be used:
{code:java}
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)