Only execute slow-or-flaky-test if -Dtest= is not defined

This commit is contained in:
Guillaume Smet
2021-03-22 16:10:22 +01:00
parent e522239832
commit fb03e749bd

45
pom.xml
View File

@@ -277,19 +277,6 @@
<argLine>${surefire.argLine}</argLine>
</configuration>
</execution>
<execution>
<id>slow-or-flaky-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<rerunFailingTestsCount>2</rerunFailingTestsCount>
<!-- There are some tests that take longer or are a little flaky. Run them here. -->
<includesFile>src/test/resources/slow-or-flaky-tests.txt</includesFile>
<argLine>${surefire.argLine}</argLine>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
@@ -565,6 +552,38 @@
</pluginRepository>
</pluginRepositories>
<profiles>
<!-- only enable slow-or-flaky-test if -Dtest= is not present -->
<profile>
<id>slow-or-flaky-test</id>
<activation>
<property>
<name>!test</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>slow-or-flaky-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<rerunFailingTestsCount>2</rerunFailingTestsCount>
<!-- There are some tests that take longer or are a little
flaky. Run them here. -->
<includesFile>src/test/resources/slow-or-flaky-tests.txt</includesFile>
<argLine>${surefire.argLine}</argLine>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk11+</id>
<activation>