You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/06/01 13:01:49 UTC
svn commit: r1130097 -
/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Author: sebb
Date: Wed Jun 1 11:01:48 2011
New Revision: 1130097
URL: http://svn.apache.org/viewvc?rev=1130097&view=rev
Log:
Quieten test
Modified:
commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java?rev=1130097&r1=1130096&r2=1130097&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java Wed Jun 1 11:01:48 2011
@@ -27,11 +27,13 @@ import org.apache.commons.jexl2.introspe
/**
* Test cases for reported issues
*/
+@SuppressWarnings("boxing")
public class IssuesTest extends JexlTestCase {
+
@Override
public void setUp() throws Exception {
// ensure jul logging is only error to avoid warning in silent mode
- //java.util.logging.Logger.getLogger(JexlEngine.class.getName()).setLevel(java.util.logging.Level.SEVERE);
+ java.util.logging.Logger.getLogger(JexlEngine.class.getName()).setLevel(java.util.logging.Level.SEVERE);
}
// JEXL-49: blocks not parsed (fixed)
@@ -346,7 +348,10 @@ public class IssuesTest extends JexlTest
Object value = script.evaluate(ctxt);
assertEquals(Integer.valueOf(11), value);
long end = System.nanoTime();
- System.out.printf("Parse took %.3f seconds\n", (end - start) / 1e+9);
+ long millis=end-start;
+ double millisec = (end - start) / 1e6;
+ double limit = 100.0; // Allow plenty of slack
+ assertTrue("Expected parse to take less than "+limit+"ms, actual "+millisec, millisec < limit);
}
public static class fn98 {