From 26e271c285d3e1a3abe181f305d2eb2efba38f84 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Wed, 5 Dec 2018 16:57:38 +0000 Subject: [PATCH] Correct doc reference tag (#36262) Fixes a broken reference in the watcher documentation. --- .../documentation/WatcherDocumentationIT.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/WatcherDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/WatcherDocumentationIT.java index d990710dd9a..c6c0cea0e31 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/WatcherDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/WatcherDocumentationIT.java @@ -339,7 +339,7 @@ public class WatcherDocumentationIT extends ESRestHighLevelClientTestCase { RestHighLevelClient client = highLevelClient(); { - // tag::x-pack-execute-inline-watch + // tag::x-pack-execute-watch-inline String watchJson = "{ \n" + " \"trigger\": { \"schedule\": { \"interval\": \"10h\" } },\n" + " \"input\": { \"none\": {} },\n" + @@ -352,13 +352,13 @@ public class WatcherDocumentationIT extends ESRestHighLevelClientTestCase { request.setTriggerData("{\"triggered_time\":\"now\"}"); // <4> request.setDebug(true); // <5> ExecuteWatchResponse response = client.watcher().executeWatch(request, RequestOptions.DEFAULT); - // end::x-pack-execute-inline-watch + // end::x-pack-execute-watch-inline - // tag::x-pack-execute-watch-by-id-response + // tag::x-pack-execute-watch-inline-response String id = response.getRecordId(); // <1> Map watch = response.getRecordAsMap(); // <2> String watch_id = ObjectPath.eval("watch_record.watch_id", watch); // <3> - // end::x-pack-execute-watch-by-id-response + // end::x-pack-execute-watch-inline-response } { @@ -368,7 +368,7 @@ public class WatcherDocumentationIT extends ESRestHighLevelClientTestCase { " \"actions\": { \"logme\": { \"logging\": { \"text\": \"{{ctx.payload}}\" } } }\n" + "}"; ExecuteWatchRequest request = ExecuteWatchRequest.inline(watchJson); - // tag::x-pack-execute-inline-watch-execute-listener + // tag::x-pack-execute-watch-inline-execute-listener ActionListener listener = new ActionListener() { @Override public void onResponse(ExecuteWatchResponse response) { @@ -380,15 +380,15 @@ public class WatcherDocumentationIT extends ESRestHighLevelClientTestCase { // <2> } }; - // end::x-pack-execute-inline-watch-execute-listener + // end::x-pack-execute-watch-inline-execute-listener // Replace the empty listener by a blocking listener in test final CountDownLatch latch = new CountDownLatch(1); listener = new LatchedActionListener<>(listener, latch); - // tag::x-pack-execute-inline-watch-execute-async + // tag::x-pack-execute-watch-inline-execute-async client.watcher().executeWatchAsync(request, RequestOptions.DEFAULT, listener); // <1> - // end::x-pack-execute-inline-watch-execute-async + // end::x-pack-execute-watch-inline-execute-async assertTrue(latch.await(30L, TimeUnit.SECONDS)); }