Skip to content

Commit 052b04d

Browse files
committed
[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 #32773
1 parent 99f91dc commit 052b04d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/qa/full-cluster-restart/src/test/java/org/elasticsearch/xpack/restart/FullClusterRestartIT.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ public void testRollupAfterRestart() throws Exception {
345345
}
346346
}
347347

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

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

0 commit comments

Comments
 (0)