Skip to content

Commit 3cd9ab4

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 fc7bf5e commit 3cd9ab4

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
@@ -344,7 +344,6 @@ public void testRollupAfterRestart() throws Exception {
344344
}
345345
}
346346

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

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

0 commit comments

Comments
 (0)