From 1d81ec15624492397f9c9dcb2499c435d86613d3 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Thu, 26 Apr 2018 11:32:46 -0400 Subject: [PATCH] [Monitoring] Remove unhelpful Monitoring tests (#30144) This removes some monitoring tests that have been silenced for a long time. These tests don't really provide any value for the upgrade suite and they just create noise due to their occasional timing-related failures. --- .../UpgradeClusterClientYamlTestSuiteIT.java | 28 ---------- .../test/mixed_cluster/60_monitoring.yml | 48 ----------------- .../test/old_cluster/60_monitoring.yml | 33 ------------ .../test/upgraded_cluster/60_monitoring.yml | 54 ------------------- 4 files changed, 163 deletions(-) delete mode 100644 x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_monitoring.yml delete mode 100644 x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_monitoring.yml delete mode 100644 x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_monitoring.yml diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java index 168cda6eeda59..c9ad4b3053cbe 100644 --- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java +++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java @@ -39,34 +39,6 @@ public void waitForTemplates() throws Exception { XPackRestTestHelper.waitForMlTemplates(client()); } - /** - * Enables an HTTP exporter for monitoring so that we can test the production-level exporter (not the local exporter). - * - * The build.gradle file disables data collection, so the expectation is that any monitoring rest tests will use the - * "_xpack/monitoring/_bulk" endpoint to lazily setup the templates on-demand and fill in data without worrying about - * timing. - */ - @Before - public void waitForMonitoring() throws Exception { - final String[] nodes = System.getProperty("tests.rest.cluster").split(","); - final Map settings = new HashMap<>(); - - settings.put("xpack.monitoring.exporters._http.enabled", true); - // only select the last node to avoid getting the "old" node in a mixed cluster - // if we ever randomize the order that the nodes are restarted (or add more nodes), then we need to verify which node we select - settings.put("xpack.monitoring.exporters._http.host", nodes[nodes.length - 1]); - - assertBusy(() -> { - final ClientYamlTestResponse response = - getAdminExecutionContext().callApi("cluster.put_settings", - emptyMap(), - singletonList(singletonMap("transient", settings)), - emptyMap()); - - assertThat(response.evaluate("acknowledged"), is(true)); - }); - } - @Override protected boolean preserveIndicesUponCompletion() { return true; diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_monitoring.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_monitoring.yml deleted file mode 100644 index a5711cfd46c67..0000000000000 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_monitoring.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -setup: - - do: - cluster.health: - wait_for_status: yellow - ---- -"Index monitoring data and search on the mixed cluster": - - skip: - version: "all" - reason: "AwaitsFix'ing, see x-pack-elasticsearch #2948" - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "old_cluster" } } } - - match: { hits.total: 2 } - - - do: - xpack.monitoring.bulk: - system_id: "kibana" - system_api_version: "6" - interval: "123456ms" - type: "mixed_cluster" - body: - - '{"index": {}}' - - '{"field": "value_3"}' - - '{"index": {}}' - - '{"field": "value_4"}' - - '{"index": {}}' - - '{"field": "value_5"}' - - - is_false: errors - - - do: - indices.refresh: {} - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "old_cluster" } } } - - match: { hits.total: 2 } - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "mixed_cluster" } } } - - match: { hits.total: 3 } diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_monitoring.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_monitoring.yml deleted file mode 100644 index 5185e6b5c2261..0000000000000 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_monitoring.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -setup: - - do: - cluster.health: - wait_for_status: yellow - ---- -"Index monitoring data and search on the old cluster": - - skip: - version: "all" - reason: "AwaitsFix'ing, see x-pack-elasticsearch #2948" - - do: - xpack.monitoring.bulk: - system_id: "kibana" - system_api_version: "6" - interval: "123456ms" - type: "old_cluster" - body: - - '{"index": {}}' - - '{"field": "value_1"}' - - '{"index": {}}' - - '{"field": "value_2"}' - - - is_false: errors - - - do: - indices.refresh: {} - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "old_cluster" } } } - - match: { hits.total: 2 } diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_monitoring.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_monitoring.yml deleted file mode 100644 index 5d3501f778387..0000000000000 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_monitoring.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -setup: - - do: - cluster.health: - wait_for_status: yellow - ---- -"Index monitoring data and search on the upgraded cluster": - - skip: - version: "all" - reason: "AwaitsFix'ing, see x-pack-elasticsearch #2948" - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "old_cluster" } } } - - match: { hits.total: 2 } - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "mixed_cluster" } } } - - match: { hits.total: 3 } - - - do: - xpack.monitoring.bulk: - system_id: "kibana" - system_api_version: "6" - interval: "123456ms" - type: "upgraded_cluster" - body: - - '{"index": {}}' - - '{"field": "value_6"}' - - '{"index": {}}' - - '{"field": "value_7"}' - - '{"index": {}}' - - '{"field": "value_8"}' - - - is_false: errors - - - do: - indices.refresh: {} - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "terms" : { "type": [ "old_cluster", "mixed_cluster" ] } } } - - match: { hits.total: 5 } - - - do: - search: - index: .monitoring-kibana-* - body: { "query": { "term" : { "type": "upgraded_cluster" } } } - - match: { hits.total: 3 }