echauchot commented on code in PR #23:
URL: 
https://github.com/apache/flink-connector-shared-utils/pull/23#discussion_r1374827779


##########
.github/workflows/ci.yml:
##########
@@ -88,6 +93,10 @@ jobs:
         if: ${{ inputs.run_dependency_convergence }}
         run: echo 
"MVN_DEPENDENCY_CONVERGENCE=-Dflink.convergence.phase=install 
-Pcheck-convergence" >> $GITHUB_ENV
 
+      - name: "Disable archunit tests"
+        if: ${{ inputs.skip_archunit_tests }}
+        run: echo "MVN_ARCHUNIT_TESTS=-Dtest='!*ArchitectureTest'" >> 
$GITHUB_ENV

Review Comment:
   > the idea which seems working at least for my setup with opensearch 
connector is using `<include>`, `<exclude>` for surefire plugin and different 
profiles like
   > 
   > ```
   > <properties>
   >            <exclude.tests>nothing-to-exclude</exclude.tests>
   > </properties>
   > ...
   > <plugin>
   >            <groupId>org.apache.maven.plugins</groupId>
   >            <artifactId>maven-surefire-plugin</artifactId>
   >            <configuration>
   >                    ...
   >            </configuration>
   >            <executions>
   >                    <execution>
   >                            <!--execute all the unit tests-->
   >                       <id>default-test</id>                        
   >                             <configuration>
   >                             
   >                                <includes>
   >                                        
<include>${test.unit.pattern}</include>
   >                                </includes>
   >                                <excludes>
   >                                        <exclude>${exclude.tests}</exclude>
   >                                </excludes>
   >                                    ...
   >                             </configuration>
   >                       ...          
   >                  </execution>
   >                  <execution>
   >                  <!--execute all the integration tests-->
   >                  <id>integration-tests</id>
   >                  ...
   >                  <configuration>
   >                          <includes>
   >                                  <include>**/*.*</include>
   >                          </includes>
   >                          <excludes>
   >                                  <exclude>${test.unit.pattern}</exclude>
   >                                  <exclude>${exclude.tests}</exclude>
   >                          </excludes>
   >                          ...
   >                  </configuration>
   >          </execution>
   >               </executions>
   > </plugin>
   > ...
   >    <profiles>
   >            <profile>
   >                    <id>noArchUnit</id>
   >                    <properties>
   >                            
<exclude.tests>**/org/apache/flink/architecture/**/*.java</exclude.tests>
   >                    </properties>
   >            </profile>
   >    </profiles>
   > ...
   > ```
   
   This solution is the first I proposed but it requires having a profile for 
exclusions in the pom of all the connectors so it is a breaking change and the 
solution was abandoned toward the -Dtest that does not require a change to the 
poms.
   See my comment above -Dtest works as expected.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to