**Build scan:**
https://gradle-enterprise.elastic.co/s/pky3bwfrwrpjs/tests/:x-pack:plugin:yamlRestTest/org.elasticsearch.xpack.test.rest.XPackRestIT/test%20%7Bp0=transform%2Ftransforms_start_stop%2FTest%20stop%20all%7D

**Reproduction line:**
`./gradlew ':x-pack:plugin:yamlRestTest' --tests "org.elasticsearch.xpack.test.rest.XPackRestIT.test {p0=transform/transforms_start_stop/Test stop all}" -Dtests.seed=1F8B9F800B9DEB00 -Dtests.locale=he-IL -Dtests.timezone=US/Michigan -Druntime.java=17`

**Applicable branches:**
main

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.test.rest.XPackRestIT&tests.test=test%20%7Bp0%3Dtransform/transforms_start_stop/Test%20stop%20all%7D

**Failure excerpt:**
```
java.lang.AssertionError: Failure at [transform/transforms_start_stop:373]: expected [2xx] status code but api [transform.stop_transform] returned [409 Conflict] [{"error":{"root_cause":[{"type":"status_exception","reason":"Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]","stack_trace":"org.elasticsearch.ElasticsearchStatusException: Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.buildException(TransportStopTransformAction.java:323)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$waitForStopListener$9(TransportStopTransformAction.java:299)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.finishHim(TransportTasksAction.java:323)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.onOperation(TransportTasksAction.java:297)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:277)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:269)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1380)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.processResponse(TransportService.java:1465)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1445)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:41)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.respondIfFinished(TransportTasksAction.java:134)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:108)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:104)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$2(TransportStopTransformAction.java:241)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.xpack.transform.transforms.TransformTask.setShouldStopAtCheckpoint(TransformTask.java:319)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$4(TransportStopTransformAction.java:238)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:808)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"}],"type":"status_exception","reason":"Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]","stack_trace":"org.elasticsearch.ElasticsearchStatusException: Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.buildException(TransportStopTransformAction.java:323)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$waitForStopListener$9(TransportStopTransformAction.java:299)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.finishHim(TransportTasksAction.java:323)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.onOperation(TransportTasksAction.java:297)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:277)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:269)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1380)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.processResponse(TransportService.java:1465)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1445)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:41)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.respondIfFinished(TransportTasksAction.java:134)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:108)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:104)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$2(TransportStopTransformAction.java:241)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.xpack.transform.transforms.TransformTask.setShouldStopAtCheckpoint(TransformTask.java:319)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$4(TransportStopTransformAction.java:238)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:808)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"},"status":409}]

  at __randomizedtesting.SeedInfo.seed([1F8B9F800B9DEB00:97DFA05AA56186F8]:0)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:510)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:479)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:568)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:833)

  Caused by: java.lang.AssertionError: expected [2xx] status code but api [transform.stop_transform] returned [409 Conflict] [{"error":{"root_cause":[{"type":"status_exception","reason":"Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]","stack_trace":"org.elasticsearch.ElasticsearchStatusException: Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.buildException(TransportStopTransformAction.java:323)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$waitForStopListener$9(TransportStopTransformAction.java:299)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.finishHim(TransportTasksAction.java:323)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.onOperation(TransportTasksAction.java:297)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:277)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:269)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1380)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.processResponse(TransportService.java:1465)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1445)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:41)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.respondIfFinished(TransportTasksAction.java:134)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:108)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:104)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$2(TransportStopTransformAction.java:241)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.xpack.transform.transforms.TransformTask.setShouldStopAtCheckpoint(TransformTask.java:319)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$4(TransportStopTransformAction.java:238)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:808)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"}],"type":"status_exception","reason":"Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]","stack_trace":"org.elasticsearch.ElasticsearchStatusException: Failed to update transform task [airline-transform-start-stop-continuous] state value should_stop_at_checkpoint from [false] to [false]\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.buildException(TransportStopTransformAction.java:323)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$waitForStopListener$9(TransportStopTransformAction.java:299)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.finishHim(TransportTasksAction.java:323)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction.onOperation(TransportTasksAction.java:297)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:277)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$AsyncAction$1.handleResponse(TransportTasksAction.java:269)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1380)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.processResponse(TransportService.java:1465)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1445)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:41)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.respondIfFinished(TransportTasksAction.java:134)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:108)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.support.tasks.TransportTasksAction$1.onResponse(TransportTasksAction.java:104)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$2(TransportStopTransformAction.java:241)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:162)\n\tat org.elasticsearch.xpack.transform.transforms.TransformTask.setShouldStopAtCheckpoint(TransformTask.java:319)\n\tat org.elasticsearch.xpack.transform.action.TransportStopTransformAction.lambda$taskOperation$4(TransportStopTransformAction.java:238)\n\tat org.elasticsearch.server@8.5.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:808)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"},"status":409}]

    at org.junit.Assert.fail(Assert.java:88)
    at org.elasticsearch.test.rest.yaml.section.DoSection.execute(DoSection.java:373)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:499)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:479)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:568)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
    at java.lang.Thread.run(Thread.java:833)

```
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java
"[%s] task object got modified while processing. Expected: %s, was: %s",
                        scheduledTask.getTransformId(),
                        scheduledTask,
                        task
                    )
                );
            }
            return new TransformScheduledTask(
                task.getTransformId(),
                task.getFrequency(),
                currentTimeMillis,
                task.getFailureCount(),
                task.getListener()
            );
        });
        return true;
    }
    /**
     * Stops the processing.
     */
    public void stop() {
        if (scheduledFuture != null) {
            scheduledFuture.cancel();
            scheduledFuture = null;
        }
    }
    /**
     * Registers and triggers the transform.
     * The transform is registered by adding it to the queue and then the transform is triggered immediately so that it does not have to
     * wait until the next scheduled run.