Skip to content

Commit

Permalink
[Rollup] Fix FullClusterRestart test
Browse files Browse the repository at this point in the history
We need to wait for the job to fully initialize and start before
we can attempt to stop it.  If we don't, it's possible for the stop
API to be called before the persistent task is fully loaded and it'll
throw an exception.

Closes #32773
  • Loading branch information
polyfractal committed Aug 31, 2018
1 parent fc7bf5e commit 3cd9ab4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ public void testRollupAfterRestart() throws Exception {
}
}

@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/32773")
public void testRollupIDSchemeAfterRestart() throws Exception {
assumeTrue("Rollup can be tested with 6.3.0 and onwards", oldClusterVersion.onOrAfter(Version.V_6_3_0));
assumeTrue("Rollup ID scheme changed in 6.4", oldClusterVersion.before(Version.V_6_4_0));
Expand Down Expand Up @@ -412,6 +411,8 @@ public void testRollupIDSchemeAfterRestart() throws Exception {
indexRequest.setJsonEntity("{\"timestamp\":\"2018-01-02T00:00:01\",\"value\":345}");
client().performRequest(indexRequest);

assertRollUpJob("rollup-id-test");

// stop the rollup job to force a state save, which will upgrade the ID
final Request stopRollupJobRequest = new Request("POST", "_xpack/rollup/job/rollup-id-test/_stop");
Map<String, Object> stopRollupJobResponse = entityAsMap(client().performRequest(stopRollupJobRequest));
Expand Down

0 comments on commit 3cd9ab4

Please sign in to comment.