fix test bugs

This commit is contained in:
Michael McCandless 2015-05-30 18:09:44 -04:00 committed by mikemccand
parent 54a2ab9c03
commit 3997ed012b
1 changed files with 2 additions and 3 deletions

View File

@ -198,6 +198,7 @@ public class ClusterSettingsTests extends ElasticsearchIntegrationTest {
try {
createNode(Settings.builder().put(Settings.SETTINGS_REQUIRE_UNITS, "false").build());
assertAcked(prepareCreate("test"));
ensureGreen();
client().admin().indices().prepareUpdateSettings("test").setSettings(Settings.builder().put("index.refresh_interval", "10")).execute().actionGet();
} finally {
// Restore the default so subsequent tests require units:
@ -205,6 +206,7 @@ public class ClusterSettingsTests extends ElasticsearchIntegrationTest {
Settings.setSettingsRequireUnits(true);
}
}
private void createNode(Settings settings) {
internalCluster().startNode(Settings.builder()
.put(ClusterName.SETTING, "ClusterSettingsTests")
@ -213,10 +215,7 @@ public class ClusterSettingsTests extends ElasticsearchIntegrationTest {
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
.put(EsExecutors.PROCESSORS, 1) // limit the number of threads created
.put("http.enabled", false)
.put("index.store.type", "ram")
.put("config.ignore_system_properties", true) // make sure we get what we set :)
.put("gateway.type", "none")
.put("indices.memory.interval", "100ms")
.put(settings)
);
}