From 8ccb4660728739ce19d305a7529df5b21d70237d Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 4 Dec 2018 17:57:42 +0100 Subject: [PATCH] [TEST] Remove auto follow pattern at the end of the test, so that it does not collide with auto follow patterns in other tests. --- .../client/documentation/CCRDocumentationIT.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CCRDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CCRDocumentationIT.java index 95ee1b06f45..fea6ad0fbd7 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CCRDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CCRDocumentationIT.java @@ -559,6 +559,13 @@ public class CCRDocumentationIT extends ESRestHighLevelClientTestCase { // end::ccr-get-auto-follow-pattern-execute-async assertTrue(latch.await(30L, TimeUnit.SECONDS)); + + // Cleanup: + { + DeleteAutoFollowPatternRequest deleteRequest = new DeleteAutoFollowPatternRequest("my_pattern"); + AcknowledgedResponse deleteResponse = client.ccr().deleteAutoFollowPattern(deleteRequest, RequestOptions.DEFAULT); + assertThat(deleteResponse.isAcknowledged(), is(true)); + } } static Map toMap(Response response) throws IOException {