org.umlg.sqlg.test.vertex.TestTinkerpopBug Maven / Gradle / Ivy
package org.umlg.sqlg.test.vertex;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Assert;
import org.junit.Test;
import org.umlg.sqlg.test.BaseTest;
import static org.junit.Assert.assertTrue;
/**
* Date: 2014/10/19
* Time: 8:55 AM
*/
public class TestTinkerpopBug extends BaseTest {
@Test(expected = IllegalStateException.class)
public void hasNextCountBug() {
this.sqlgGraph.addVertex(T.label, "Person");
this.sqlgGraph.addVertex(T.label, "Person");
this.sqlgGraph.addVertex(T.label, "Person");
this.sqlgGraph.tx().commit();
GraphTraversal gt = this.sqlgGraph.traversal().V().has(T.label, "Person");
assertTrue(gt.hasNext());
Assert.assertEquals(3, gt.count().next().intValue());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy