This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git

commit b0d0973fd9815e0e87a6f42fdccfefa45426c012
Author: aherbert <aherb...@apache.org>
AuthorDate: Thu Oct 13 16:26:15 2022 +0100

    Move legacy flaky tests into a separate execution
    
    This can increase the rerunFailingTestsCount to improve robustness of
    the test suite.
---
 commons-math-legacy/pom.xml | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/commons-math-legacy/pom.xml b/commons-math-legacy/pom.xml
index 7a55ef1d6..9e8be36de 100644
--- a/commons-math-legacy/pom.xml
+++ b/commons-math-legacy/pom.xml
@@ -133,8 +133,35 @@
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <rerunFailingTestsCount>9</rerunFailingTestsCount>
+          <!-- This is configured at a level to pass most of the tests.
+            Very flaky tests can be moved to a separate execution. -->
+          <rerunFailingTestsCount>5</rerunFailingTestsCount>
         </configuration>
+        <executions>
+          <execution>
+            <!-- This uses the default ID to exclude the flaky tests -->
+            <id>default-test</id>
+            <configuration>
+              <excludes>
+                <exclude>**/SimplexOptimizerTest</exclude>
+              </excludes>
+            </configuration>
+          </execution>
+          <execution>
+            <!-- Add a second exceution of the flaky tests -->
+            <id>flaky-tests</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <rerunFailingTestsCount>14</rerunFailingTestsCount>
+              <includes>
+                <include>**/SimplexOptimizerTest</include>
+              </includes>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
       <!-- Ignore spotbugs in the legacy module.
            New development will move code to a new package and should address 
issues. -->

Reply via email to