Skip to content

Commit 12ff76a

Browse files
authored
Fix testRolloverForFreshInstalledIndexTemplate (#116450) (#116454)
Fix IndexTemplateRegistryTests.testRolloverForFreshInstalledIndexTemplate by using assertBusy, now that we're expecting a rollover.
1 parent 395482e commit 12ff76a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/template/IndexTemplateRegistryTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,7 @@ public void testRolloverForFreshInstalledIndexTemplate() throws Exception {
475475
assertBusy(() -> assertThat(putIndexTemplateCounter.get(), equalTo(1)));
476476
// rollover should be triggered even for the first installation, since the template
477477
// may now take precedence over a data stream's existing index template
478-
Thread.sleep(100L);
479-
assertThat(rolloverCounter.get(), equalTo(2));
478+
assertBusy(() -> assertThat(rolloverCounter.get(), equalTo(2)));
480479
}
481480

482481
public void testThatTemplatesAreNotUpgradedWhenNotNeeded() throws Exception {

0 commit comments

Comments
 (0)