commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1103418 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java
Date Sun, 15 May 2011 15:00:34 GMT
Author: luc
Date: Sun May 15 15:00:33 2011
New Revision: 1103418

URL: http://svn.apache.org/viewvc?rev=1103418&view=rev
Log:
add a retry feature for randomly failing CMA-ES optimizer test

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java?rev=1103418&r1=1103417&r2=1103418&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/CMAESOptimizerTest.java
Sun May 15 15:00:33 2011
@@ -20,6 +20,8 @@ import java.util.Arrays;
 import java.util.Random;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.Retry;
+import org.apache.commons.math.RetryRunner;
 import org.apache.commons.math.analysis.MultivariateRealFunction;
 import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.MultiDimensionMismatchException;
@@ -32,10 +34,12 @@ import org.apache.commons.math.optimizat
 import org.apache.commons.math.random.MersenneTwister;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Test for {@link CMAESOptimizer}.
  */
+@RunWith(RetryRunner.class)
 public class CMAESOptimizerTest {
 
     static final int DIM = 13;
@@ -130,6 +134,7 @@ public class CMAESOptimizerTest {
     }
 
     @Test
+    @Retry(3)
     public void testMaximize() throws MathException {
         double[] startPoint = point(DIM,1.0);
         double[] insigma = point(DIM,0.1);



Mime
View raw message