test: verify `size_to_upgrade_in_bytes` in assertBusy(...)
Relates to #25311
This commit is contained in:
parent
645bb9d0fb
commit
926527adc3
|
@ -427,12 +427,14 @@ public class FullClusterRestartIT extends ESRestTestCase {
|
||||||
assertEquals(200, r.getStatusLine().getStatusCode());
|
assertEquals(200, r.getStatusLine().getStatusCode());
|
||||||
|
|
||||||
// Post upgrade checks:
|
// Post upgrade checks:
|
||||||
rsp = toMap(client().performRequest("GET", "/" + index + "/_upgrade"));
|
assertBusy(() -> {
|
||||||
indexUpgradeStatus = (Map<?, ?>) XContentMapValues.extractValue("indices." + index, rsp);
|
Map<String, Object> rsp2 = toMap(client().performRequest("GET", "/" + index + "/_upgrade"));
|
||||||
totalBytes = (Integer) indexUpgradeStatus.get("size_in_bytes");
|
Map<?, ?> indexUpgradeStatus2 = (Map<?, ?>) XContentMapValues.extractValue("indices." + index, rsp2);
|
||||||
assertThat(totalBytes, greaterThan(0));
|
int totalBytes2 = (Integer) indexUpgradeStatus2.get("size_in_bytes");
|
||||||
toUpgradeBytes = (Integer) indexUpgradeStatus.get("size_to_upgrade_in_bytes");
|
assertThat(totalBytes2, greaterThan(0));
|
||||||
assertEquals(0, toUpgradeBytes);
|
int toUpgradeBytes2 = (Integer) indexUpgradeStatus2.get("size_to_upgrade_in_bytes");
|
||||||
|
assertEquals(0, toUpgradeBytes2);
|
||||||
|
});
|
||||||
|
|
||||||
rsp = toMap(client().performRequest("GET", "/" + index + "/_segments"));
|
rsp = toMap(client().performRequest("GET", "/" + index + "/_segments"));
|
||||||
Map<?, ?> shards = (Map<?, ?>) XContentMapValues.extractValue("indices." + index + ".shards", rsp);
|
Map<?, ?> shards = (Map<?, ?>) XContentMapValues.extractValue("indices." + index + ".shards", rsp);
|
||||||
|
|
Loading…
Reference in New Issue