import org.elasticsearch.test.NodeConfigurationSource;
import org.junit.rules.ExternalResource;
import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.utils.log.Logger;
+import org.sonar.api.utils.log.LoggerLevel;
+import org.sonar.api.utils.log.Loggers;
import org.sonar.core.config.ConfigurationProvider;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.elasticsearch.test.EsTestCluster;
container.addSingleton(MetadataIndex.class);
container.addSingleton(MetadataIndexDefinition.class);
container.addSingleton(TestEsDbCompatibility.class);
- container.startComponents();
+
+ Logger logger = Loggers.get(IndexCreator.class);
+ LoggerLevel oldLevel = logger.getLevel();
+ if (oldLevel == LoggerLevel.INFO) {
+ logger.setLevel(LoggerLevel.WARN);
+ }
+
+ try {
+ container.startComponents();
+ } finally {
+ logger.setLevel(oldLevel);
+ }
+
container.stopComponents();
client().close();
}