Skip to content

Commit

Permalink
Fixing some more titan-test compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dalaro committed Apr 10, 2015
1 parent 261d00b commit d22fbd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Expand Up @@ -16,6 +16,7 @@
import com.thinkaurelius.titan.diskstorage.util.StandardBaseTransactionConfig; import com.thinkaurelius.titan.diskstorage.util.StandardBaseTransactionConfig;
import com.thinkaurelius.titan.diskstorage.util.time.Timestamps; import com.thinkaurelius.titan.diskstorage.util.time.Timestamps;
import com.thinkaurelius.titan.graphdb.types.StandardEdgeLabelMaker; import com.thinkaurelius.titan.graphdb.types.StandardEdgeLabelMaker;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;


import java.util.Random; import java.util.Random;
import java.util.concurrent.*; import java.util.concurrent.*;
Expand Down
Expand Up @@ -7,9 +7,11 @@
import java.util.Random; import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;


import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.commons.math.stat.descriptive.SummaryStatistics; import org.apache.commons.math.stat.descriptive.SummaryStatistics;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
Expand Down Expand Up @@ -121,7 +123,7 @@ public void run() {
TitanVertex v = getVertex(tx,"uid", random.nextInt(maxUID) + 1); TitanVertex v = getVertex(tx,"uid", random.nextInt(maxUID) + 1);
assertCount(2, v.properties()); assertCount(2, v.properties());
int count = 0; int count = 0;
for (Edge e : v.bothE().toList()) { for (TitanEdge e : v.query().direction(Direction.BOTH).edges()) {
count++; count++;
assertTrue(e.<Integer>value("time") >= 0); assertTrue(e.<Integer>value("time") >= 0);
} }
Expand Down
Expand Up @@ -33,6 +33,7 @@
import com.thinkaurelius.titan.graphdb.types.IndexType; import com.thinkaurelius.titan.graphdb.types.IndexType;
import com.thinkaurelius.titan.testcategory.SerialTests; import com.thinkaurelius.titan.testcategory.SerialTests;
import com.thinkaurelius.titan.util.stats.MetricManager; import com.thinkaurelius.titan.util.stats.MetricManager;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty; import org.apache.tinkerpop.gremlin.structure.VertexProperty;
Expand Down Expand Up @@ -185,7 +186,7 @@ public void testReadOperations(boolean cache) {
tx = graph.buildTransaction().groupName(metricsPrefix).start(); tx = graph.buildTransaction().groupName(metricsPrefix).start();
v = getOnlyElement(tx.query().has("uid",1).vertices()); v = getOnlyElement(tx.query().has("uid",1).vertices());
assertEquals(1,v.<Integer>value("uid").intValue()); assertEquals(1,v.<Integer>value("uid").intValue());
u = getOnlyElement(v.both("knows")); u = getOnlyElement(v.query().direction(Direction.BOTH).labels("knows").vertices());
e = getOnlyElement(u.query().direction(Direction.IN).labels("knows").edges()); e = getOnlyElement(u.query().direction(Direction.IN).labels("knows").edges());
assertEquals("juju",u.value("name")); assertEquals("juju",u.value("name"));
assertEquals("edge",e.value("name")); assertEquals("edge",e.value("name"));
Expand Down Expand Up @@ -382,7 +383,7 @@ public void checkFastPropertyAndLocking(boolean fastProperty) {
//Check no further locks on read all //Check no further locks on read all
tx = graph.buildTransaction().groupName(metricsPrefix).start(); tx = graph.buildTransaction().groupName(metricsPrefix).start();
v = getV(tx,v); v = getV(tx,v);
for (VertexProperty p : v.properties().toList()) { for (TitanVertexProperty p : v.query().properties()) {
assertNotNull(p.value()); assertNotNull(p.value());
assertNotNull(p.key()); assertNotNull(p.key());
} }
Expand Down

0 comments on commit d22fbd4

Please sign in to comment.