Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safer Wait for Snapshot Success in ClusterPrivilegeTests #40943

Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ private SnapshotsStatusResponse buildResponse(SnapshotsStatusRequest request, Li
SnapshotIndexShardStatus shardStatus = new SnapshotIndexShardStatus(shardEntry.key, stage);
shardStatusBuilder.add(shardStatus);
}
builder.add(new SnapshotStatus(entry.snapshot(), entry.state(),
final SnapshotsInProgress.State state = entry.state();
builder.add(new SnapshotStatus(entry.snapshot(),
state == SnapshotsInProgress.State.SUCCESS ? SnapshotsInProgress.State.STARTED : state,
Collections.unmodifiableList(shardStatusBuilder), entry.includeGlobalState()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public void testThatClusterPrivilegesWorkAsExpectedViaHttp() throws Exception {
assertAccessIsDenied("user_d", "PUT", "/_cluster/settings", "{ \"transient\" : { \"search.default_search_timeout\": \"1m\" } }");
}

@AwaitsFix( bugUrl = "https://github.com/elastic/elasticsearch/issues/38030")
public void testThatSnapshotAndRestore() throws Exception {
String repoJson = Strings.toString(jsonBuilder().startObject().field("type", "fs").startObject("settings").field("location",
repositoryLocation.toString()).endObject().endObject());
Expand Down