Skip to content

Commit

Permalink
Adjusted assertion for watcher rolling upgrade test. (#52463)
Browse files Browse the repository at this point in the history
Relates to #33185
  • Loading branch information
martijnvg committed Feb 18, 2020
1 parent 99397a4 commit 306d7a0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
import java.util.Base64;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import static org.hamcrest.Matchers.equalTo;

import static org.hamcrest.Matchers.greaterThanOrEqualTo;

@TimeoutSuite(millis = 5 * TimeUnits.MINUTE) // to account for slow as hell VMs
public class UpgradeClusterClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
Expand All @@ -46,12 +47,12 @@ public void waitForWatcher() throws Exception {
Response response = client().performRequest(new Request("GET", "_watcher/stats"));
Map<String, Object> responseBody = entityAsMap(response);
List<?> stats = (List<?>) responseBody.get("stats");
assertThat(stats.size(), equalTo(3));
assertThat(stats.size(), greaterThanOrEqualTo(3));
for (Object stat : stats) {
Map<?, ?> statAsMap = (Map<?, ?>) stat;
assertThat(statAsMap.get("watcher_state"), equalTo("started"));
}
});
}, 1, TimeUnit.MINUTES);
}

@Override
Expand Down

0 comments on commit 306d7a0

Please sign in to comment.