Skip to content

Check that delete index request succeeded in test teardown (#38903) #38914

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

Merged
merged 1 commit into from
Feb 14, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.BigArrays;
Expand Down Expand Up @@ -127,6 +128,9 @@ public void tearDown() throws Exception {
metaData.persistentSettings().size(), equalTo(0));
assertThat("test leaves transient cluster metadata behind: " + metaData.transientSettings().keySet(),
metaData.transientSettings().size(), equalTo(0));
GetIndexResponse indices = client().admin().indices().prepareGetIndex().addIndices("*").get();
assertThat("test leaves indices that were not deleted: " + Strings.arrayToCommaDelimitedString(indices.indices()),
indices.indices(), equalTo(Strings.EMPTY_ARRAY));
if (resetNodeAfterTest()) {
assert NODE != null;
stopNode();
Expand Down