Skip to content

Commit

Permalink
ensure transform has done something before stop gets called with (#88696
Browse files Browse the repository at this point in the history
)

ensure transform has done something before stop gets called with wait_for_checkpoint=true

fixes #79621
  • Loading branch information
Hendrik Muhs authored Jul 22, 2022
1 parent 4d09ac8 commit 498e1c5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ public void testStopWaitForCheckpoint() throws Exception {

startTransform(config.getId(), RequestOptions.DEFAULT);

// wait until transform has been triggered and indexed at least 1 document
assertBusy(() -> {
var stateAndStats = getTransformStats(config.getId());
assertThat((Integer) XContentMapValues.extractValue("stats.documents_indexed", stateAndStats), greaterThan(1));
});

// waitForCheckpoint: true should make the transform continue until we hit the first checkpoint, then it will stop
stopTransform(transformId, false, null, true);

Expand Down

0 comments on commit 498e1c5

Please sign in to comment.