tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject [14/50] incubator-tinkerpop git commit: Rollback the implicit transaction on multi threaded tests.
Date Thu, 03 Dec 2015 16:43:10 GMT
Rollback the implicit transaction on multi threaded tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/8bcebbae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/8bcebbae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/8bcebbae

Branch: refs/heads/TINKERPOP3-982
Commit: 8bcebbaef66af670d9226be807a45943120d87c2
Parents: df887ac
Author: pieter <pieter.martin@gmail.com>
Authored: Fri Nov 27 21:42:51 2015 +0200
Committer: pieter <pieter.martin@gmail.com>
Committed: Fri Nov 27 21:42:51 2015 +0200

----------------------------------------------------------------------
 .../GremlinGroovyScriptEngineOverGraphTest.java | 21 ++++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8bcebbae/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineOverGraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineOverGraphTest.java
b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineOverGraphTest.java
index f1838ce..ebbc306 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineOverGraphTest.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineOverGraphTest.java
@@ -36,21 +36,10 @@ import javax.script.Bindings;
 import javax.script.CompiledScript;
 import javax.script.ScriptEngine;
 import javax.script.ScriptException;
-import javax.script.SimpleBindings;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
 import java.util.concurrent.CountDownLatch;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -195,6 +184,9 @@ public class GremlinGroovyScriptEngineOverGraphTest extends AbstractGremlinTest
                             assertNotNull(result);
                     } catch (ScriptException e) {
                         assertFalse(true);
+                    } finally {
+                        if (graph.features().graph().supportsTransactions())
+                            g.tx().rollback();
                     }
                     latch.countDown();
                 }
@@ -230,6 +222,9 @@ public class GremlinGroovyScriptEngineOverGraphTest extends AbstractGremlinTest
                     } catch (ScriptException e) {
                         //System.out.println(e);
                         assertFalse(true);
+                    } finally {
+                        if (graph.features().graph().supportsTransactions())
+                            g.tx().rollback();
                     }
                     latch.countDown();
                 }


Mime
View raw message