Skip to content

Commit 2b0651d

Browse files
committed
[TEST] Remove auto follow pattern at the end of the test,
so that it does not collide with auto follow patterns in other tests.
1 parent 6c72925 commit 2b0651d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CCRDocumentationIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,13 @@ public void onFailure(Exception e) {
559559
// end::ccr-get-auto-follow-pattern-execute-async
560560

561561
assertTrue(latch.await(30L, TimeUnit.SECONDS));
562+
563+
// Cleanup:
564+
{
565+
DeleteAutoFollowPatternRequest deleteRequest = new DeleteAutoFollowPatternRequest("my_pattern");
566+
AcknowledgedResponse deleteResponse = client.ccr().deleteAutoFollowPattern(deleteRequest, RequestOptions.DEFAULT);
567+
assertThat(deleteResponse.isAcknowledged(), is(true));
568+
}
562569
}
563570

564571
static Map<String, Object> toMap(Response response) throws IOException {

0 commit comments

Comments
 (0)