Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-29956

Kafka-related test infrastructure code is scattered over multiple classes/environments

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      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 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:

      Topic creation
      Topic deletion
      Random name generation
      AdminClient creation
      Consumer creation
      Producer creation

      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 for Flink. Maybe, there's already something out there that can be used/extended.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mapohl Matthias Pohl

            Dates

              Created:
              Updated:

              Slack

                Issue deployment