[Rollup] Fix FullClusterRestart test
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
@@ -344,7 +344,6 @@ public class FullClusterRestartIT extends ESRestTestCase {
}
}
- @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));
@@ -412,6 +411,8 @@ public class FullClusterRestartIT extends ESRestTestCase {
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));
