Skip to content

Commit ebed8f2

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 08b9247 commit ebed8f2

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ public void testRollupAfterRestart() throws Exception {
325325
}
326326
}
327327

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

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

0 commit comments

Comments
 (0)