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

Clearer separation of unit test and integration tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.18.0, 1.17.2, 1.19.0
    • None
    • None

    Description

      FLINK-33907 revealed an issue in the current Maven setup where the surefire-plugin is in charge of executing both, the unit and the integration tests in two separate executions: The -Dtest system parameter is overwriting the <includes/> and <excludes/> configuration of the two executions. That results in a test being executed twice if specifically selected for execution (i.e. mvn [...] verify -Dtest=???).

      That's especially problematic in cases where the ITCase relies on artifacts that are build during the Maven run (see the discussion in FLINK-33907 where DefaultPackagedProgramRetrieverITCase relies on flink-client-test-utils to provide test jars). The artifacts should be moved in the pre-integration-test phase from a conceptual point of view.

      A workaround for this issue is to directly call the execution surefire:test@integration-tests:

      mvn -pl flink-clients surefire:test@integration-tests -Dtest=DefaultPackagedProgramRetrieverITCase -Dfast
      

      This approach has the flow that the Maven lifecycle is ignored. You would have to do a mvn -pl flink-clients clean verify run upfront to build all the artifacts the test relies on.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mapohl Matthias Pohl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: