remove commented out debug changes

This commit is contained in:
Simon Willnauer 2016-01-28 12:23:10 +01:00
parent b07e3145d5
commit 744875e03f
1 changed files with 4 additions and 10 deletions

View File

@ -21,20 +21,15 @@ package org.elasticsearch.cluster.settings;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.ESLoggerFactory;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.index.store.IndexStoreConfig;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.junit.annotations.TestLogging;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
@ -332,7 +327,6 @@ public class ClusterSettingsIT extends ESIntegTestCase {
}
}
// @TestLogging("_root:DEBUG")
public void testLoggerLevelUpdate() {
assertAcked(prepareCreate("test"));
final String rootLevel = ESLoggerFactory.getRootLogger().getLevel();
@ -349,11 +343,11 @@ public class ClusterSettingsIT extends ESIntegTestCase {
assertEquals("TRACE", ESLoggerFactory.getLogger("test").getLevel());
assertEquals("TRACE", ESLoggerFactory.getRootLogger().getLevel());
} finally {
// if (randomBoolean()) {
if (randomBoolean()) {
client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().putNull("logger.test").putNull("logger._root")).execute().actionGet();
// } else {
// client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().putNull("logger.*")).execute().actionGet();
// }
} else {
client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().putNull("logger.*")).execute().actionGet();
}
assertEquals(testLevel, ESLoggerFactory.getLogger("test").getLevel());
assertEquals(rootLevel, ESLoggerFactory.getRootLogger().getLevel());
}