Skip to content

Commit fb03e74

Browse files
committed
Only execute slow-or-flaky-test if -Dtest= is not defined
1 parent e522239 commit fb03e74

1 file changed

Lines changed: 32 additions & 13 deletions

File tree

pom.xml

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,6 @@
277277
<argLine>${surefire.argLine}</argLine>
278278
</configuration>
279279
</execution>
280-
<execution>
281-
<id>slow-or-flaky-test</id>
282-
<phase>test</phase>
283-
<goals>
284-
<goal>test</goal>
285-
</goals>
286-
<configuration>
287-
<rerunFailingTestsCount>2</rerunFailingTestsCount>
288-
<!-- There are some tests that take longer or are a little flaky. Run them here. -->
289-
<includesFile>src/test/resources/slow-or-flaky-tests.txt</includesFile>
290-
<argLine>${surefire.argLine}</argLine>
291-
</configuration>
292-
</execution>
293280
</executions>
294281
</plugin>
295282
<plugin>
@@ -565,6 +552,38 @@
565552
</pluginRepository>
566553
</pluginRepositories>
567554
<profiles>
555+
<!-- only enable slow-or-flaky-test if -Dtest= is not present -->
556+
<profile>
557+
<id>slow-or-flaky-test</id>
558+
<activation>
559+
<property>
560+
<name>!test</name>
561+
</property>
562+
</activation>
563+
<build>
564+
<plugins>
565+
<plugin>
566+
<artifactId>maven-surefire-plugin</artifactId>
567+
<executions>
568+
<execution>
569+
<id>slow-or-flaky-test</id>
570+
<phase>test</phase>
571+
<goals>
572+
<goal>test</goal>
573+
</goals>
574+
<configuration>
575+
<rerunFailingTestsCount>2</rerunFailingTestsCount>
576+
<!-- There are some tests that take longer or are a little
577+
flaky. Run them here. -->
578+
<includesFile>src/test/resources/slow-or-flaky-tests.txt</includesFile>
579+
<argLine>${surefire.argLine}</argLine>
580+
</configuration>
581+
</execution>
582+
</executions>
583+
</plugin>
584+
</plugins>
585+
</build>
586+
</profile>
568587
<profile>
569588
<id>jdk11+</id>
570589
<activation>

0 commit comments

Comments
 (0)