All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.sqlg.test.vertex.TestTinkerpopBug Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy