Adjusted assertion for watcher rolling upgrade test. (#52463)
Relates to #33185
This commit is contained in:
parent
d9ce0e6733
commit
606bc8037f
|
@ -23,9 +23,10 @@ import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
|
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||||
|
|
||||||
@TimeoutSuite(millis = 5 * TimeUnits.MINUTE) // to account for slow as hell VMs
|
@TimeoutSuite(millis = 5 * TimeUnits.MINUTE) // to account for slow as hell VMs
|
||||||
public class UpgradeClusterClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
public class UpgradeClusterClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||||
|
@ -46,12 +47,12 @@ public class UpgradeClusterClientYamlTestSuiteIT extends ESClientYamlSuiteTestCa
|
||||||
Response response = client().performRequest(new Request("GET", "_watcher/stats"));
|
Response response = client().performRequest(new Request("GET", "_watcher/stats"));
|
||||||
Map<String, Object> responseBody = entityAsMap(response);
|
Map<String, Object> responseBody = entityAsMap(response);
|
||||||
List<?> stats = (List<?>) responseBody.get("stats");
|
List<?> stats = (List<?>) responseBody.get("stats");
|
||||||
assertThat(stats.size(), equalTo(3));
|
assertThat(stats.size(), greaterThanOrEqualTo(3));
|
||||||
for (Object stat : stats) {
|
for (Object stat : stats) {
|
||||||
Map<?, ?> statAsMap = (Map<?, ?>) stat;
|
Map<?, ?> statAsMap = (Map<?, ?>) stat;
|
||||||
assertThat(statAsMap.get("watcher_state"), equalTo("started"));
|
assertThat(statAsMap.get("watcher_state"), equalTo("started"));
|
||||||
}
|
}
|
||||||
});
|
}, 1, TimeUnit.MINUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue