Search in sources :

Example 6 with HeapObjectDatabse

use of org.locationtech.geogig.storage.memory.HeapObjectDatabse in project GeoGig by boundlessgeo.

the class DiffCountConsumerTest method setUp.

@Before
public void setUp() {
    odb = new HeapObjectDatabse();
    odb.open();
    {
        RevTreeBuilder builder = createFeaturesTree("", 10);
        this.childrenFeatureTree = builder.build();
    }
    {
        RevTreeBuilder rootBuilder = new RevTreeBuilder(odb);
        childTree1 = createFeaturesTree("tree1", 10);
        createFeatureTypesTree(rootBuilder, "tree1", childTree1);
        childTree2 = createFeaturesTree("tree2", 5);
        createFeatureTypesTree(rootBuilder, "tree2", childTree2);
        childrenFeatureTypesTree = rootBuilder.build();
    }
    {
        RevTreeBuilder builder = createFeaturesTree("", 2 * RevTree.NORMALIZED_SIZE_LIMIT);
        this.bucketsFeatureTree = builder.build();
        assertTrue(bucketsFeatureTree.buckets().isPresent());
    }
}
Also used : HeapObjectDatabse(org.locationtech.geogig.storage.memory.HeapObjectDatabse) RevTreeBuilder(org.locationtech.geogig.api.RevTreeBuilder) Before(org.junit.Before)

Aggregations

HeapObjectDatabse (org.locationtech.geogig.storage.memory.HeapObjectDatabse)6 Before (org.junit.Before)5 RevTreeBuilder (org.locationtech.geogig.api.RevTreeBuilder)2 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 Context (org.locationtech.geogig.api.Context)1 NodeRef (org.locationtech.geogig.api.NodeRef)1 Platform (org.locationtech.geogig.api.Platform)1 RevTree (org.locationtech.geogig.api.RevTree)1 RefParse (org.locationtech.geogig.api.plumbing.RefParse)1 UpdateRef (org.locationtech.geogig.api.plumbing.UpdateRef)1 UpdateSymRef (org.locationtech.geogig.api.plumbing.UpdateSymRef)1 Consumer (org.locationtech.geogig.api.plumbing.diff.PreOrderDiffWalk.Consumer)1 Repository (org.locationtech.geogig.repository.Repository)1 ObjectDatabase (org.locationtech.geogig.storage.ObjectDatabase)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1