diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java index e2f976a10c68f..217084ddcda9c 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java @@ -466,9 +466,13 @@ public void testSnapshotGetSnapshots() throws IOException { createTestSnapshots(); // tag::get-snapshots-request - GetSnapshotsRequest request = new GetSnapshotsRequest(repositoryName); + GetSnapshotsRequest request = new GetSnapshotsRequest(); // end::get-snapshots-request + // tag::get-snapshots-request-repositoryName + request.repository(repositoryName); + // end::get-snapshots-request-repositoryName + // tag::get-snapshots-request-snapshots String[] snapshots = { snapshotName }; request.snapshots(snapshots); // <1> @@ -500,13 +504,13 @@ public void testSnapshotGetSnapshots() throws IOException { public void testSnapshotGetSnapshotsAsync() throws InterruptedException { RestHighLevelClient client = highLevelClient(); { - GetSnapshotsRequest request = new GetSnapshotsRequest(); + GetSnapshotsRequest request = new GetSnapshotsRequest(repositoryName); // tag::get-snapshots-execute-listener ActionListener listener = new ActionListener() { @Override - public void onResponse(GetSnapshotsResponse deleteSnapshotResponse) { + public void onResponse(GetSnapshotsResponse getSnapshotsResponse) { // <1> }