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

Remove duplicated test #27091

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,39 +207,4 @@ public void testRepositoryVerification() throws Exception {
assertThat(ex.getMessage(), containsString("is not shared"));
}
}

public void testRepositoryVerificationTimeout() throws Exception {
Client client = client();

Settings settings = Settings.builder()
.put("location", randomRepoPath())
.put("random_control_io_exception_rate", 1.0).build();
logger.info("--> creating repository that cannot write any files - should fail");
assertThrows(client.admin().cluster().preparePutRepository("test-repo-1")
.setType("mock").setSettings(settings),
RepositoryVerificationException.class);

logger.info("--> creating repository that cannot write any files, but suppress verification - should be acked");
assertAcked(client.admin().cluster().preparePutRepository("test-repo-1")
.setType("mock").setSettings(settings).setVerify(false));

logger.info("--> verifying repository");
assertThrows(client.admin().cluster().prepareVerifyRepository("test-repo-1"), RepositoryVerificationException.class);

Path location = randomRepoPath();

logger.info("--> creating repository");
try {
client.admin().cluster().preparePutRepository("test-repo-1")
.setType("mock")
.setSettings(Settings.builder()
.put("location", location)
.put("localize_location", true)
).get();
fail("RepositoryVerificationException wasn't generated");
} catch (RepositoryVerificationException ex) {
assertThat(ex.getMessage(), containsString("is not shared"));
}
}

}