Skip to content

Commit a60b668

Browse files
authored
Remove breaking changes from #15409 (#15624)
Signed-off-by: Lakshya Taragi <[email protected]>
1 parent 3fc0139 commit a60b668

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

client/rest-high-level/src/test/java/org/opensearch/client/SnapshotRequestConvertersTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public void testSnapshotsStatus() {
238238
boolean ignoreUnavailable = randomBoolean();
239239
String endpoint = "/_snapshot/" + repository + "/" + snapshotNames.toString() + "/_status";
240240

241-
SnapshotsStatusRequest snapshotsStatusRequest = new SnapshotsStatusRequest(repository, snapshots, indices);
241+
SnapshotsStatusRequest snapshotsStatusRequest = (new SnapshotsStatusRequest(repository, snapshots)).indices(indices);
242242
RequestConvertersTests.setRandomClusterManagerTimeout(snapshotsStatusRequest, expectedParams);
243243
snapshotsStatusRequest.ignoreUnavailable(ignoreUnavailable);
244244
expectedParams.put("ignore_unavailable", Boolean.toString(ignoreUnavailable));

qa/repository-multi-version/src/test/java/org/opensearch/upgrades/MultiVersionRepositoryAccessIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public void testUpgradeMovesRepoToNewMetaVersion() throws IOException {
243243
private static void assertSnapshotStatusSuccessful(RestHighLevelClient client, String repoName,
244244
String[] snapshots, String[] indices) throws IOException {
245245
final SnapshotsStatusResponse statusResponse = client.snapshot()
246-
.status(new SnapshotsStatusRequest(repoName, snapshots, indices), RequestOptions.DEFAULT);
246+
.status((new SnapshotsStatusRequest(repoName, snapshots)).indices(indices), RequestOptions.DEFAULT);
247247
for (SnapshotStatus status : statusResponse.getSnapshots()) {
248248
assertThat(status.getShardsStats().getFailedShards(), is(0));
249249
}

server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ public SnapshotsStatusRequest() {}
6767
* @param repository repository name
6868
* @param snapshots list of snapshots
6969
*/
70+
public SnapshotsStatusRequest(String repository, String[] snapshots) {
71+
this.repository = repository;
72+
this.snapshots = snapshots;
73+
}
74+
75+
/**
76+
* Constructs a new get snapshots request with given repository name and list of snapshots
77+
*
78+
* @param repository repository name
79+
* @param snapshots list of snapshots
80+
* @param indices list of indices
81+
*/
7082
public SnapshotsStatusRequest(String repository, String[] snapshots, String[] indices) {
7183
this.repository = repository;
7284
this.snapshots = snapshots;

0 commit comments

Comments
 (0)