Search in sources :

Example 1 with UseLocalDisk

use of com.google.gerrit.acceptance.UseLocalDisk in project gerrit by GerritCodeReview.

the class GarbageCollectionIT method testGcAlreadyScheduled.

@Test
@UseLocalDisk
public void testGcAlreadyScheduled() throws Exception {
    gcQueue.addAll(Arrays.asList(project));
    GarbageCollectionResult result = garbageCollectionFactory.create().run(Arrays.asList(allProjects, project, project2, project3));
    assertThat(result.hasErrors()).isTrue();
    assertThat(result.getErrors()).hasSize(1);
    GarbageCollectionResult.Error error = result.getErrors().get(0);
    assertThat(error.getType()).isEqualTo(GarbageCollectionResult.Error.Type.GC_ALREADY_SCHEDULED);
    assertThat(error.getProjectName()).isEqualTo(project);
}
Also used : GarbageCollectionResult(com.google.gerrit.common.data.GarbageCollectionResult) Test(org.junit.Test) AbstractDaemonTest(com.google.gerrit.acceptance.AbstractDaemonTest) UseLocalDisk(com.google.gerrit.acceptance.UseLocalDisk)

Aggregations

AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)1 UseLocalDisk (com.google.gerrit.acceptance.UseLocalDisk)1 GarbageCollectionResult (com.google.gerrit.common.data.GarbageCollectionResult)1 Test (org.junit.Test)1