MINOR: use relative counts for restores
Use a relative count from using 0 for totalNumbRestores to prevent flakiness.
Reviewers: Anna Sophie Blee-Goldman
@@ -371,7 +371,7 @@ public class RestoreIntegrationTest {
// Sometimes the store happens to have already been closed sometime during startup, so just keep track
// of where it started and make sure it doesn't happen more times from there
final int initialStoreCloseCount = CloseCountingInMemoryStore.numStoresClosed();
- assertThat(restoreListener.totalNumRestored(), CoreMatchers.equalTo(0L));
+ final long initialNunRestoredCount = restoreListener.totalNumRestored();
client2.close();
waitForApplicationState(singletonList(client2), State.NOT_RUNNING, Duration.ofSeconds(60));
@@ -381,7 +381,7 @@ public class RestoreIntegrationTest {
waitForCompletion(client1, 1, 30 * 1000L);
waitForStandbyCompletion(client1, 1, 30 * 1000L);
- assertThat(restoreListener.totalNumRestored(), CoreMatchers.equalTo(0L));
+ assertThat(restoreListener.totalNumRestored(), CoreMatchers.equalTo(initialNunRestoredCount));
// After stopping instance 2 and letting instance 1 take over its tasks, we should have closed just two stores
// total: the active and standby tasks on instance 2
