test: Run flush before upgrade and refresh after upgrade.

Relates to #25311
This commit is contained in:
Martijn van Groningen 2017-07-03 09:49:06 +02:00
parent 5f2a0118b8
commit 129f53d914
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 7 additions and 1 deletions

View File

@ -471,8 +471,14 @@ public class FullClusterRestartIT extends ESRestTestCase {
int toUpgradeBytes = (Integer) indexUpgradeStatus.get("size_to_upgrade_in_bytes");
assertThat(toUpgradeBytes, greaterThan(0));
Response r = client().performRequest("POST", "/" + index + "/_flush");
assertEquals(200, r.getStatusLine().getStatusCode());
// Upgrade segments:
Response r = client().performRequest("POST", "/" + index + "/_upgrade");
r = client().performRequest("POST", "/" + index + "/_upgrade");
assertEquals(200, r.getStatusLine().getStatusCode());
r = client().performRequest("POST", "/" + index + "/_refresh");
assertEquals(200, r.getStatusLine().getStatusCode());
// Post upgrade checks: