Skip to content

Commit

Permalink
Adjust cancellation message in task tests (elastic#110546)
Browse files Browse the repository at this point in the history
Adding `parent task was cancelled [test cancel]` to the list 
of allowed cancellation messages.
  • Loading branch information
dnhatn committed Jul 7, 2024
1 parent 6b18568 commit c1a4e31
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.in;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.not;

Expand Down Expand Up @@ -325,7 +326,7 @@ private void assertCancelled(ActionFuture<EsqlQueryResponse> response) throws Ex
*/
assertThat(
cancelException.getMessage(),
either(equalTo("test cancel")).or(equalTo("task cancelled")).or(equalTo("request cancelled test cancel"))
in(List.of("test cancel", "task cancelled", "request cancelled test cancel", "parent task was cancelled [test cancel]"))
);
assertBusy(
() -> assertThat(
Expand Down

0 comments on commit c1a4e31

Please sign in to comment.