Re-enable FullClusterRestartIT#testWatcher test (#50463)
Previously this test failed waiting for yellow: https://gradle-enterprise.elastic.co/s/fv55holsa36tg/console-log#L2676 Oddly cluster health returned red status, but there were no unassigned, relocating or initializing shards. Placed the waiting for green in a try-catch block, so that when this fails again then cluster state gets printed. Relates to #48381
This commit is contained in:
parent
53ac28e398
commit
d3078c5b40
|
@ -146,7 +146,6 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/48381")
|
||||
public void testWatcher() throws Exception {
|
||||
if (isRunningAgainstOldCluster()) {
|
||||
logger.info("Adding a watch on old cluster {}", getOldClusterVersion());
|
||||
|
@ -169,13 +168,25 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase {
|
|||
client().performRequest(createFunnyTimeout);
|
||||
|
||||
logger.info("Waiting for watch results index to fill up...");
|
||||
waitForYellow(".watches,bwc_watch_index,.watcher-history*");
|
||||
try {
|
||||
waitForYellow(".watches,bwc_watch_index,.watcher-history*");
|
||||
} catch (ResponseException e) {
|
||||
String rsp = toStr(client().performRequest(new Request("GET", "/_cluster/state")));
|
||||
logger.info("cluster_state_response=\n{}", rsp);
|
||||
throw e;
|
||||
}
|
||||
waitForHits("bwc_watch_index", 2);
|
||||
waitForHits(".watcher-history*", 2);
|
||||
logger.info("Done creating watcher-related indices");
|
||||
} else {
|
||||
logger.info("testing against {}", getOldClusterVersion());
|
||||
waitForYellow(".watches,bwc_watch_index,.watcher-history*");
|
||||
try {
|
||||
waitForYellow(".watches,bwc_watch_index,.watcher-history*");
|
||||
} catch (ResponseException e) {
|
||||
String rsp = toStr(client().performRequest(new Request("GET", "/_cluster/state")));
|
||||
logger.info("cluster_state_response=\n{}", rsp);
|
||||
throw e;
|
||||
}
|
||||
|
||||
logger.info("checking that the Watches index is the correct version");
|
||||
|
||||
|
|
Loading…
Reference in New Issue