[
https://issues.apache.org/jira/browse/FLINK-29956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676640#comment-17676640
]
Gabor Somogyi commented on FLINK-29956:
---------------------------------------
This is still open but I don't think this is the jira you should start with("I
am new to the library"). It's not only to move some lines here and there but to
plan end-to-end Kafka test lifecycle (including broker docker debugging in
failure, creating common base classes, defining topic lifecycle, making the
tests less flaky, etc...). If you still think it fits to you then go ahead :)
> Kafka-related test infrastructure code is scattered over multiple
> classes/environments
> --------------------------------------------------------------------------------------
>
> Key: FLINK-29956
> URL: https://issues.apache.org/jira/browse/FLINK-29956
> Project: Flink
> Issue Type: Technical Debt
> Components: Connectors / Kafka
> Affects Versions: 1.17.0
> Reporter: Matthias Pohl
> Priority: Major
> Labels: starter
>
> We had a few issues with the test stability of Kafka-related tests
> (FLINK-24119, FLINK-29914). A workaround was to add randomness to topic
> identifiers. This change required touching multiple code locations that made
> it obvious that there is some room for improvement (see [Gabor's
> comment|https://github.com/apache/flink/pull/21247#issuecomment-1307084416]
> comment in the related PR). We could put some effort into unifying this by
> providing a common test environment that provides utility methods he
> mentioned in his comment:
> {quote}
> Topic creation
> Topic deletion
> Random name generation
> AdminClient creation
> Consumer creation
> Producer creation
> {quote}
> Currently, we have Kafka instances created in different locations in our test
> suite (e.g. {{KafkaSourceTestEnv}}, {{KafkaTestEnvironmentImpl}},
> {{KafkaTableTestBase}}). One idea is to provide a JUnit5 extension for this
> similarly to what we do with the
> [MiniClusterExtension|https://github.com/apache/flink/blob/a6db6ee5d0d6e9b50c6d110793e2efbd0d57cc38/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/test/junit5/MiniClusterExtension.java]
> for Flink. Maybe, there's already something out there that can be
> used/extended.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)