Matthias Pohl created FLINK-34107: ------------------------------------- Summary: Clearer separation of unit test and integration tests Key: FLINK-34107 URL: https://issues.apache.org/jira/browse/FLINK-34107 Project: Flink Issue Type: Bug Components: Build System, Build System / CI Affects Versions: 1.17.2, 1.18.0, 1.19.0 Reporter: Matthias Pohl
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}}: {code} mvn -pl flink-clients surefire:test@integration-tests -Dtest=DefaultPackagedProgramRetrieverITCase -Dfast {code} 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)