[TEST] Remove auto follow pattern at the end of the test,

so that it does not collide with auto follow patterns in other tests.
This commit is contained in:
Martijn van Groningen 2018-12-04 17:57:42 +01:00
parent 0df08dd458
commit 8ccb466072
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 7 additions and 0 deletions

View File

@ -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<String, Object> toMap(Response response) throws IOException {