Test fix, wait for auto follower to have stopped in the background

Relates to #36761
This commit is contained in:
Martijn van Groningen 2019-01-11 17:26:01 +01:00
parent bb6d8784e7
commit e4391afd98
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 6 additions and 0 deletions

View File

@ -139,7 +139,13 @@ public class AutoFollowIT extends CcrIntegTestCase {
assertThat(autoFollowStats.getNumberOfSuccessfulFollowIndices(), equalTo((long) expectedVal1));
});
// Delete auto follow pattern and make sure that in the background the auto follower has stopped
// then the leader index created after that should never be auto followed:
deleteAutoFollowPatternSetting();
assertBusy(() -> {
AutoFollowStats autoFollowStats = getAutoFollowStats();
assertThat(autoFollowStats.getAutoFollowedClusters().size(), equalTo(0));
});
createLeaderIndex("logs-does-not-count", leaderIndexSettings);
putAutoFollowPatterns("my-pattern", new String[] {"logs-*"});