Adjusted assertion for watcher rolling upgrade test. (#52463)

Relates to #33185
This commit is contained in:
Martijn van Groningen 2020-02-18 13:28:15 +01:00 committed by GitHub
parent d9ce0e6733
commit 606bc8037f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -23,9 +23,10 @@ import java.nio.charset.StandardCharsets;
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 {
@ -46,12 +47,12 @@ public class UpgradeClusterClientYamlTestSuiteIT extends ESClientYamlSuiteTestCa
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