Avoid ConcurrentModificationException when reading logs from LogTester.
underTest = newRecoveryIndexer(emptySettings.asConfig());
underTest.start();
+ underTest.stop();
assertThat(logTester.logs(LoggerLevel.DEBUG)).contains(
"Elasticsearch recovery - sonar.search.recovery.delayInMs=300000",
Thread.sleep(1L);
}
+ underTest.stop();
+
// No rows treated
assertThatQueueHasSize(1);
assertThatLogsContain(ERROR, "Elasticsearch recovery - fail to recover documents");
Thread.sleep(1L);
}
+ underTest.stop();
+
// No rows treated
assertThatQueueHasSize(1);
assertThatLogsContain(INFO, "Elasticsearch recovery - 1 documents processed [1 failures]");