From b9a38d9b9737e0c4acebc07d746144532c937521 Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Tue, 20 Dec 2016 08:54:26 +0100 Subject: [PATCH] Enable trace logging for LocalExporterTests#testSimpleExport() This test fails due to a changing cluster state(?). The test checks that a local exporter is ready and then continues. However, during the test, we see output similar to: skipping exporter [_local] as it isn't ready yet Which indicates that the cluster state has changed and the exporter does not return a bulk anymore. Hence, the test is failing although at one point in time it returned a bulk. By enabling trace logging we should be able to find out what's going on. Original commit: elastic/x-pack-elasticsearch@d7e2200dd971ec35fc0c69bc1948ddaeeb1731b5 --- .../xpack/monitoring/exporter/local/LocalExporterTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java index cfc9ae5609b..0a6af45da9e 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java @@ -17,6 +17,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.xpack.monitoring.MonitoredSystem; import org.elasticsearch.xpack.monitoring.MonitoringSettings; import org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStateMonitoringDoc; @@ -63,6 +64,7 @@ public class LocalExporterTests extends MonitoringIntegTestCase { wipeMonitoringIndices(); } + @TestLogging("org.elasticsearch.xpack.monitoring.exporter.local:TRACE") public void testSimpleExport() throws Exception { internalCluster().startNode(Settings.builder() .put("xpack.monitoring.exporters._local.type", LocalExporter.TYPE)