db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1335378 - /db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
Date Tue, 08 May 2012 08:38:34 GMT
Author: tfischer
Date: Tue May  8 08:38:33 2012
New Revision: 1335378

URL: http://svn.apache.org/viewvc?rev=1335378&view=rev
Log:
raise test time limit for slow computers

Modified:
    db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java?rev=1335378&r1=1335377&r2=1335378&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/sql/SqlBuilderTest.java
Tue May  8 08:38:33 2012
@@ -43,6 +43,9 @@ import org.apache.torque.om.NumberKey;
  */
 public class SqlBuilderTest extends BaseTestCase
 {
+	/** Time limit in ms of builing a query from a large array. */
+	private static final long LARGE_ARRAY_TIME_LIMIT = 100L;
+	
     /**
      * Test where condition with several ANDs compairing against Strings.
      */
@@ -1944,7 +1947,9 @@ public class SqlBuilderTest extends Base
         List<Object> replacements = query.getPreparedStatementReplacements();
         assertEquals(size, replacements.size());
         // time limit 50 ms
-        assertTrue(end - start < 50L);
+        assertTrue("Exceeded time limit of " + LARGE_ARRAY_TIME_LIMIT 
+        		  + " ms. Execution time was " + (end - start) + " ms",
+        		end - start < LARGE_ARRAY_TIME_LIMIT);
     }
 
     public void testInString() throws Exception



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message