Hi,

Testing Sqlg on 3.2.5 I am getting failures EventStrategyProcessTest.shouldDetachVertexPropertyWhenRemoved

    final GraphTraversalSource gts = create(eventStrategy);

    gts.V(v).properties("to-remove").drop().iterate();
    tryCommit(graph);

    assertEquals(1, IteratorUtils.count(v.properties()));

The code assumes that the v that is currently in memory will automatically be kept in sync.

This is not my understanding of TinkerPop's semantics.
The v object was not itself updated. So I expect for the assertion to first re-fetch before asserting.

Here is a simpler test to illustrate the issue.

    @Test
    public void test() {
        Vertex a1 = this.sqlgGraph.addVertex(T.label, "A", "name", "John");
        this.sqlgGraph.tx().commit();

        Vertex a1Again = this.sqlgGraph.traversal().V(a1).next();
        a1Again.property("name", "Peter");
        this.sqlgGraph.tx().commit();

//This fails, TinkerPop does not specify transaction memory visibility
        Assert.assertEquals("Peter", a1.value("name"));
    }

Am I correct in my understanding here, or is the test suppose to pass?

Thanks
Pieter

Reply via email to