Author: markt
Date: Thu Feb  5 14:28:37 2015
New Revision: 1657580

URL: http://svn.apache.org/r1657580
Log:
First pass at reducing false failures on CI system.

Modified:
    tomcat/trunk/build.xml
    tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1657580&r1=1657579&r2=1657580&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Thu Feb  5 14:28:37 2015
@@ -168,6 +168,7 @@
   <!-- Tests To Run -->
   <property name="test.name" value="**/Test*.java"/>
   <property name="test.formatter" 
value="-Dorg.apache.juli.formatter=java.util.logging.SimpleFormatter"/>
+  <property name="test.relaxTiming" value="false"/>
 
   <!-- Cobertura code coverage settings -->
   <property name="cobertura.out" value="${tomcat.output}/coverage"/>
@@ -1413,6 +1414,7 @@
         <sysproperty key="tomcat.test.accesslog" value="${test.accesslog}" />
         <sysproperty key="tomcat.test.reports" value="${test.reports}" />
         <sysproperty key="tomcat.test.openssl.path" 
value="${test.openssl.path}" />
+       <sysproperty key="tomcat.test.relaxTiming" value="${test.relaxTiming}" 
/> 
         <!-- File for Cobertura to write coverage results to -->
         <sysproperty key="net.sourceforge.cobertura.datafile" 
file="${cobertura.datafile}" />
 
@@ -1436,7 +1438,9 @@
             <!-- Exclude the tests known to fail -->
             <exclude name="org/apache/catalina/tribes/test/**" />
             <!-- Exclude the OpenSSL tests unless OpenSSL is available -->
-            <exclude name="org/apache/tomcat/util/net/jsse/openssl/**" 
unless="${test.openssl.exists}"/>
+            <exclude name="org/apache/tomcat/util/net/jsse/openssl/**" 
unless="${test.openssl.exists}" />
+               <!-- Exclude performance tests. E.g. on systems with 
slow/inconsistent timing -->
+               <exclude name="**/*Performance.java" 
if="${test.excludePerformance}" />
           </fileset>
         </batchtest>
       </junit>

Modified: tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java?rev=1657580&r1=1657579&r2=1657580&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java Thu 
Feb  5 14:28:37 2015
@@ -31,8 +31,10 @@ import org.apache.catalina.connector.Res
 
 public class TesterAccessLogValve extends ValveBase implements AccessLog {
 
-    // Timing tests need a small error margin to prevent failures
-    private static final long ERROR_MARGIN = 500;
+    private static boolean RELAX_TIMING = 
Boolean.getBoolean("tomcat.test.relaxTiming");
+
+    // Timing tests need an error margin to prevent failures.
+    private static final long ERROR_MARGIN = RELAX_TIMING ? 1000 : 100;
 
     private final List<Entry> entries = new ArrayList<>();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to