Skip to content

Commit

Permalink
fix dangling tag in TasksClientDocumentationIT (#39157)
Browse files Browse the repository at this point in the history
fix dangling tag in TasksClientDocumentationIT
and fix tag mentions from list-tasks to cancel-tasks
  • Loading branch information
talevy committed Feb 20, 2019
1 parent f14da03 commit a90fcf0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,16 @@ public void testCancelTasks() throws IOException {
List<TaskInfo> tasks = response.getTasks(); // <1>
// end::cancel-tasks-response-tasks

// tag::cancel-tasks-response-calc
Map<String, List<TaskInfo>> perNodeTasks = response.getPerNodeTasks(); // <1>
List<TaskGroup> groups = response.getTaskGroups(); // <2>
// end::cancel-tasks-response-calc


// tag::cancel-tasks-response-failures
List<ElasticsearchException> nodeFailures = response.getNodeFailures(); // <1>
List<TaskOperationFailure> taskFailures = response.getTaskFailures(); // <2>
// end::-tasks-response-failures
// end::cancel-tasks-response-failures

assertThat(response.getNodeFailures(), equalTo(emptyList()));
assertThat(response.getTaskFailures(), equalTo(emptyList()));
Expand Down
10 changes: 5 additions & 5 deletions docs/java-rest/high-level/tasks/cancel_tasks.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ task selection parameters as the list tasks command.

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[list-tasks-request-filter]
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[cancel-tasks-request-filter]
--------------------------------------------------
<1> Cancel a task
<2> Cancel only cluster-related tasks
Expand All @@ -28,7 +28,7 @@ include-tagged::{doc-tests}/TasksClientDocumentationIT.java[list-tasks-request-f

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[list-tasks-execute]
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[cancel-tasks-execute]
--------------------------------------------------

==== Asynchronous Execution
Expand Down Expand Up @@ -62,20 +62,20 @@ provided as an argument

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[list-tasks-response-tasks]
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[cancel-tasks-response-tasks]
--------------------------------------------------
<1> List of cancelled tasks

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[list-tasks-response-calc]
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[cancel-tasks-response-calc]
--------------------------------------------------
<1> List of cancelled tasks grouped by a node
<2> List of cancelled tasks grouped by a parent task

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[list-tasks-response-failures]
include-tagged::{doc-tests}/TasksClientDocumentationIT.java[cancel-tasks-response-failures]
--------------------------------------------------
<1> List of node failures
<2> List of task cancellation failures
Expand Down

0 comments on commit a90fcf0

Please sign in to comment.