Search in sources :

Example 6 with OGraphRepair

use of com.tinkerpop.blueprints.impls.orient.OGraphRepair in project orientdb by orientechnologies.

the class TestGraphRecovering method testRecoverPerfectGraphNonLW.

@Test
public void testRecoverPerfectGraphNonLW() {
    final OrientBaseGraph g = new OrientGraphNoTx("memory:testRecoverPerfectGraphNonLW");
    try {
        init(g, false);
        final TestListener eventListener = new TestListener();
        new OGraphRepair().setEventListener(eventListener).repair(g, null, null);
        Assert.assertEquals(eventListener.scannedEdges, 3);
        Assert.assertEquals(eventListener.removedEdges, 0);
        Assert.assertEquals(eventListener.scannedVertices, 3);
        Assert.assertEquals(eventListener.scannedLinks, 6);
        Assert.assertEquals(eventListener.removedLinks, 0);
        Assert.assertEquals(eventListener.repairedVertices, 0);
    } finally {
        g.shutdown();
    }
}
Also used : OGraphRepair(com.tinkerpop.blueprints.impls.orient.OGraphRepair) OrientGraphNoTx(com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx) OrientBaseGraph(com.tinkerpop.blueprints.impls.orient.OrientBaseGraph) Test(org.junit.Test)

Aggregations

OGraphRepair (com.tinkerpop.blueprints.impls.orient.OGraphRepair)6 OrientBaseGraph (com.tinkerpop.blueprints.impls.orient.OrientBaseGraph)5 OrientGraphNoTx (com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx)5 Test (org.junit.Test)5 Vertex (com.tinkerpop.blueprints.Vertex)2 OrientVertex (com.tinkerpop.blueprints.impls.orient.OrientVertex)2 ConsoleCommand (com.orientechnologies.common.console.annotation.ConsoleCommand)1 ORecordId (com.orientechnologies.orient.core.id.ORecordId)1 ODocument (com.orientechnologies.orient.core.record.impl.ODocument)1 Edge (com.tinkerpop.blueprints.Edge)1 OBonsaiTreeRepair (com.tinkerpop.blueprints.impls.orient.OBonsaiTreeRepair)1 OrientEdge (com.tinkerpop.blueprints.impls.orient.OrientEdge)1 List (java.util.List)1