private void testKeptObjectsAreIncluded() throws Exception {
BranchBuilder bb = tr.branch("refs/heads/master");
ObjectId commitObjectInLockedPack = bb.commit().create().toObjectId();
- gc.gc();
+ gc.gc().get();
stats = gc.getStatistics();
assertEquals(COMMIT_AND_TREE_OBJECTS, stats.numberOfPackedObjects);
assertEquals(1, stats.numberOfPackFiles);
.createNewFile());
bb.commit().create();
- gc.gc();
+ gc.gc().get();
stats = gc.getStatistics();
assertEquals(2 * COMMIT_AND_TREE_OBJECTS + 1,
stats.numberOfPackedObjects);
private void testKeptObjectsAreNotIncluded() throws Exception {
BranchBuilder bb = tr.branch("refs/heads/master");
ObjectId commitObjectInLockedPack = bb.commit().create().toObjectId();
- gc.gc();
+ gc.gc().get();
stats = gc.getStatistics();
assertEquals(COMMIT_AND_TREE_OBJECTS, stats.numberOfPackedObjects);
assertEquals(1, stats.numberOfPackFiles);
.createNewFile());
bb.commit().create();
- gc.gc();
+ gc.gc().get();
stats = gc.getStatistics();
assertEquals(COMMIT_AND_TREE_OBJECTS + 1, stats.numberOfPackedObjects);
assertEquals(2, stats.numberOfPackFiles);
tr.branch(mainBranch).update(commit1);
gc.setExpireAgeMillis(0);
- gc.gc();
+ gc.gc().get();
// Create only 2 bitmaps, for commit0 and commit1, excluding commit2
assertEquals(2, gc.getStatistics().numberOfBitmaps);
PackConfig packConfig = new PackConfig();
packConfig.setBitmapExcludedRefsPrefixes(new String[] { "refs/heads/other" });
gc.setPackConfig(packConfig);
- gc.gc();
+ gc.gc().get();
assertEquals(1,
gc.getStatistics().numberOfBitmaps);
}
try {
addNewCommit();
- new GC(remote.getRepository()).gc();
+ new GC(remote.getRepository()).gc().get();
pack.getPackFile().create(packExt).delete();
} catch (Exception e) {
.create();
remote.update("master", commit0);
- new GC(remote.getRepository()).gc(); // create pack files
+ new GC(remote.getRepository()).gc().get(); // create pack files
head = remote.commit().message("1").parent(commit0)
.add("test1.txt", remote.blob("1"))
"-Xep:FromTemporalAccessor:ERROR",
"-Xep:FunctionalInterfaceClash:ERROR",
"-Xep:FunctionalInterfaceMethodChanged:ERROR",
- "-Xep:FutureReturnValueIgnored:WARN",
+ "-Xep:FutureReturnValueIgnored:ERROR",
"-Xep:FuturesGetCheckedIllegalExceptionType:ERROR",
"-Xep:GetClassOnAnnotation:ERROR",
"-Xep:GetClassOnClass:ERROR",