keith-turner commented on code in PR #4670:
URL: https://github.com/apache/accumulo/pull/4670#discussion_r1639822556


##########
core/src/test/java/org/apache/accumulo/core/fate/FateCleanerTest.java:
##########
@@ -250,24 +252,47 @@ public void testNewCleaner() {
     assertEquals(Set.of(fateId2, fateId3),
         testStore.list().map(FateIdStatus::getFateId).collect(toSet()));
 
-    // create a new cleaner, it should ignore any data stored by previous 
cleaner
+    // create a new cleaner, it should use the steady times persisted by 
previous cleaner instance
     FateCleaner<String> cleaner2 = new FateCleaner<>(testStore, 
Duration.ofHours(10), tts);
 
     tts.time += Duration.ofHours(5).toNanos();
-    // since this is a new cleaner instance, it should reset the clock
+
     cleaner2.ageOff();
-    assertEquals(Set.of(fateId2, fateId3),
-        testStore.list().map(FateIdStatus::getFateId).collect(toSet()));
+    assertEquals(Set.of(fateId3), 
testStore.list().map(FateIdStatus::getFateId).collect(toSet()));
 
-    // since the clock was reset, advancing time should not age anything off
-    tts.time += Duration.ofHours(9).toNanos();
+    tts.time += Duration.ofHours(4).toNanos();
     cleaner2.ageOff();
-    assertEquals(Set.of(fateId2, fateId3),
-        testStore.list().map(FateIdStatus::getFateId).collect(toSet()));
+    assertEquals(Set.of(fateId3), 
testStore.list().map(FateIdStatus::getFateId).collect(toSet()));
 
     // this should advance time enough to age everything off
     tts.time += Duration.ofHours(2).toNanos();
     cleaner2.ageOff();
     assertEquals(Set.of(), 
testStore.list().map(FateIdStatus::getFateId).collect(toSet()));
   }
+
+  @Test
+  public void testErrors() {
+    // this test ensures that a new cleaner instance ignores data from another 
cleaner instance

Review Comment:
   Fixed those comments in 6282184



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to