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/05/11 13:43:33 UTC
[02/50] [abbrv] incubator-tinkerpop git commit: Added the persistence
feature to a couple of Transaction tests
Added the persistence feature to a couple of Transaction tests
These tests were opening and closing the graph so an in-memory graph with transactions would have problems without that feature.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/08ee0fb2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/08ee0fb2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/08ee0fb2
Branch: refs/heads/TINKERPOP3-666
Commit: 08ee0fb246111953cdb2b52194ba855c6a0b84ee
Parents: caabdb1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 07:03:11 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 07:03:11 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/structure/TransactionTest.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/08ee0fb2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
index 8ba47d5..7feb698 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java
@@ -356,6 +356,7 @@ public class TransactionTest extends AbstractGremlinTest {
@Test
@FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
@FeatureRequirement(featureClass = Graph.Features.GraphFeatures.class, feature = Graph.Features.GraphFeatures.FEATURE_TRANSACTIONS)
+ @FeatureRequirement(featureClass = Graph.Features.GraphFeatures.class, feature = Graph.Features.GraphFeatures.FEATURE_PERSISTENCE)
public void shouldCommitOnShutdownByDefault() throws Exception {
final Vertex v1 = graph.addVertex("name", "marko");
final Object oid = v1.id();
@@ -369,14 +370,23 @@ public class TransactionTest extends AbstractGremlinTest {
@Test
@FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
@FeatureRequirement(featureClass = Graph.Features.GraphFeatures.class, feature = Graph.Features.GraphFeatures.FEATURE_TRANSACTIONS)
+ @FeatureRequirement(featureClass = Graph.Features.GraphFeatures.class, feature = Graph.Features.GraphFeatures.FEATURE_PERSISTENCE)
public void shouldRollbackOnShutdownWhenConfigured() throws Exception {
+ final Vertex v2 = graph.addVertex("name", "stephen");
+ graph.tx().commit();
+
final Vertex v1 = graph.addVertex("name", "marko");
final Object oid = v1.id();
g.tx().onClose(Transaction.CLOSE_BEHAVIOR.ROLLBACK);
graph.close();
graph = graphProvider.openTestGraph(config);
+
+ // this was committed
+ assertTrue(graph.vertices(v2.id()).hasNext());
+
try {
+ // this was not
graph.vertices(oid).next();
fail("Vertex should not be found as close behavior was set to rollback");
} catch (Exception ex) {