Skip to content

Commit

Permalink
test: Run flush before upgrade and refresh after upgrade.
Browse files Browse the repository at this point in the history
Relates to #25311
  • Loading branch information
martijnvg committed Jul 3, 2017
1 parent 5f2a011 commit 129f53d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,14 @@ void assertUpgradeWorks() throws Exception {
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:
Expand Down

0 comments on commit 129f53d

Please sign in to comment.