Skip to content

Commit af50962

Browse files
authored
Fix CoreFullClusterRestartIT testRollover (#104373)
1 parent 932208c commit af50962

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ public void testShrinkAfterUpgrade() throws IOException {
605605
* <li>Make sure the document count is correct
606606
* </ol>
607607
*/
608-
public void testRollover() throws IOException {
608+
public void testRollover() throws Exception {
609609
if (isRunningAgainstOldCluster()) {
610610
client().performRequest(
611611
newXContentRequest(
@@ -637,9 +637,12 @@ public void testRollover() throws IOException {
637637
)
638638
);
639639

640-
assertThat(
641-
EntityUtils.toString(client().performRequest(new Request("GET", "/_cat/indices?v")).getEntity()),
642-
containsString("testrollover-000002")
640+
// assertBusy to work around https://github.com/elastic/elasticsearch/issues/104371
641+
assertBusy(
642+
() -> assertThat(
643+
EntityUtils.toString(client().performRequest(new Request("GET", "/_cat/indices?v&error_trace")).getEntity()),
644+
containsString("testrollover-000002")
645+
)
643646
);
644647
}
645648

0 commit comments

Comments
 (0)