Search in sources :

Example 1 with RevTreeImpl

use of org.locationtech.geogig.api.RevTreeImpl in project GeoGig by boundlessgeo.

the class RevTreeSerializationTest method testRoundTripBucketsFull.

@Test
public void testRoundTripBucketsFull() {
    ObjectId id = ObjectId.forString("fake");
    long size = 100000000;
    int childTreeCount = 0;
    Map<Integer, Bucket> bucketTrees = createBuckets(32);
    final RevTreeImpl tree = RevTreeImpl.createNodeTree(id, size, childTreeCount, bucketTrees);
    RevTree roundTripped = read(tree.getId(), write(tree));
    assertTreesAreEqual(tree, roundTripped);
}
Also used : ObjectId(org.locationtech.geogig.api.ObjectId) Bucket(org.locationtech.geogig.api.Bucket) RevTreeImpl(org.locationtech.geogig.api.RevTreeImpl) RevTree(org.locationtech.geogig.api.RevTree) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Bucket (org.locationtech.geogig.api.Bucket)1 ObjectId (org.locationtech.geogig.api.ObjectId)1 RevTree (org.locationtech.geogig.api.RevTree)1 RevTreeImpl (org.locationtech.geogig.api.RevTreeImpl)1