You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/10/22 15:08:29 UTC
[09/17] incubator-tinkerpop git commit: Tweaked test timeout
arguments to try to assure consistent success.
Tweaked test timeout arguments to try to assure consistent success.
Maintained the same test runtime from the last change by reducing the number of iterations. Treating that as ctr as the change is just to test parameters.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9a92f9bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9a92f9bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9a92f9bd
Branch: refs/heads/TINKERPOP3-861
Commit: 9a92f9bd2e8cb5989debbe44d5bd38bf504b353f
Parents: a1d4f19
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Oct 21 11:41:01 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 21 11:41:01 2015 -0400
----------------------------------------------------------------------
.../GremlinGroovyScriptEngineTimedInterruptTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9a92f9bd/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
index d857598..18fcbd6 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java
@@ -64,19 +64,19 @@ public class GremlinGroovyScriptEngineTimedInterruptTest {
@Test
public void shouldContinueToEvalScriptsEvenWithTimedInterrupt() throws Exception {
final ScriptEngine engine = new GremlinGroovyScriptEngine(
- new TimedInterruptCustomizerProvider(100), new DefaultImportCustomizerProvider());
+ new TimedInterruptCustomizerProvider(1000), new DefaultImportCustomizerProvider());
- for (int ix = 0; ix < 10; ix++) {
+ for (int ix = 0; ix < 5; ix++) {
try {
- // this script takes 10 ms longer than the interruptionTimeout
- engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 200) {}");
+ // this script takes 1000 ms longer than the interruptionTimeout
+ engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 2000) {}");
fail("This should have timed out");
} catch (ScriptException se) {
assertEquals(TimeoutException.class, se.getCause().getCause().getClass());
}
- // this script takes 10 ms less than the interruptionTimeout
- assertEquals("test", engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 50) {};'test'"));
+ // this script takes 500 ms less than the interruptionTimeout
+ assertEquals("test", engine.eval("s = System.currentTimeMillis();\nwhile((System.currentTimeMillis() - s) < 500) {};'test'"));
}
assertEquals(2, engine.eval("1+1"));