You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by StephanEwen <gi...@git.apache.org> on 2016/06/11 00:49:05 UTC

[GitHub] flink pull request #2092: [FLINK-3395] [build] Make test utils properly avai...

GitHub user StephanEwen opened a pull request:

    https://github.com/apache/flink/pull/2092

    [FLINK-3395] [build] Make test utils properly available and fix Maven dependencies

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/StephanEwen/incubator-flink test_utils

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2092.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2092
    
----
commit 0c10ccb1aab18d0709861297f6aa2b8c58512d51
Author: Stephan Ewen <se...@apache.org>
Date:   2016-05-30T18:56:05Z

    [FLINK-3995] [build] Properly structure test scopes and dependencies
    
    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.

commit 151324df1d314ce46737bf9994ca7a960c29e6ed
Author: Stephan Ewen <se...@apache.org>
Date:   2016-06-11T00:14:07Z

    [FLINK-3995] [build] flink-test-utils also contains the streaming test utilities.
    
    Test utilities include the StreamingMultipleProgramsTestBase and StreamingTestEnvironment.
    
    This moves the ITCases for streaming into 'flink-tests' to achieve that.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2092: [FLINK-3395] [build] Make test utils properly available a...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the issue:

    https://github.com/apache/flink/pull/2092
  
    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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2092: [FLINK-3395] [build] Make test utils properly avai...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2092#discussion_r67688097
  
    --- Diff: flink-scala-shell/pom.xml ---
    @@ -70,27 +71,19 @@ under the License.
     			<artifactId>scala-library</artifactId>
     			<version>${scala.version}</version>
     		</dependency>
    +
     		<dependency>
     			<groupId>org.scala-lang</groupId>
     			<artifactId>scala-reflect</artifactId>
     			<version>${scala.version}</version>
     		</dependency>
    -		<dependency>
    -			<groupId>org.apache.flink</groupId>
    -			<artifactId>flink-streaming-java_2.10</artifactId>
    -			<version>1.1-SNAPSHOT</version>
    -		</dependency>
    -		<dependency>
    -			<groupId>org.apache.flink</groupId>
    -			<artifactId>flink-streaming-scala_2.10</artifactId>
    -			<version>1.1-SNAPSHOT</version>
    --- End diff --
    
    Oh wow. This is really bad.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2092: [FLINK-3395] [build] Make test utils properly avai...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/2092


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---