Skip to content

Conversation

@StephanEwen
Copy link
Contributor

This pull requests fixes maven project scopes:

  • No main scope must ever depend on a test scope
  • Common test utils (ForkableMiniCluster, TestEnvironment, ...) should not be in test-jars, but in reusable and user-exposed test utils projects in main scope.
  • The number of test-jar dependencies should be minimal

New Structure

  • Created a flink-test-utils-junit module that contains all JUnit related utils like
    • TestLogger
    • RetryRules
      This reduces the flink-core test-jar dependency.
  • The flink-test-utils project contains all necessary utils for most tests
    • ForkableMiniCluster
    • TestEnvironment & TestStreamEnvironment
    • MultipleProgramsTestBase & StreamingMultipleProgramsTestBase
    • ...
  • The flink-test-utils-junit and flink-test-utils are in the parent project flink-test-utils-parent.

Tons of tests have minor adjustments to use different ways of accessing a specific test utility function, to keep the dependencies smaller.

Other Fixes

  • Removed unnecessary dependencies in the test scope
  • The Table API no longer pulls the example projects into the main scope
  • The Kafka consumer no longer pulls zkclient into the main scope

The size of this pull request is very large, but most edits are straightforward minor changes due to moving certain util classes and consolidating duplicate util classes.

Makes the JUnit test utils (TestLogger, retry rules, ...) properly available to
other projects without the 'flink-core' test-jar, via the 'flink-test-utils-junit' project.

Makes the ForkableMiniCluster, TestEnvironment,  and other test utilities available in the 'main'
scope of the 'flink-test-utils' project.

Creates a 'flink-test-utils-parent' project that holds the 'flink-test-utils-junit' and
'flink-test-utils' project.

Also moves some tests between projects and inlines some very simple utility functions in
order to simplify some test jar dependencies.
…t utilities.

Test utilities include the StreamingMultipleProgramsTestBase and StreamingTestEnvironment.

This moves the ITCases for streaming into 'flink-tests' to achieve that.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_2.10</artifactId>
<version>1.1-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow. This is really bad.

@rmetzger
Copy link
Contributor

I quickly looked through the changed files. I think the changes are okay.
However, it seems that the the pull request doesn't build (and merge with master). I've started addressing those issues and will open a new PR once I've addressed all issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants