From 3d658c3f1ea55d77fde952d2bb7b92805574b777 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 19 Oct 2016 11:23:29 -0400 Subject: [PATCH] Adjust ClusterStatsResponse constructor calls A commit in core removed the UUID parameter from the ClusterStatsResponse constructor. This commit adjusts x-plugins to this. Original commit: elastic/x-pack-elasticsearch@6f2f26168e4886d5181041d0457cd304e6f7664a --- .../resolver/cluster/ClusterInfoResolverTests.java | 8 ++++++-- .../resolver/cluster/ClusterStatsResolverTests.java | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java index 1a266d281bf..4deece85c65 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java @@ -47,8 +47,12 @@ public class ClusterInfoResolverTests extends MonitoringIndexNameResolverTestCas doc.setVersion(randomFrom(Version.V_2_0_0, Version.CURRENT).toString()); doc.setLicense(licenseBuilder.build()); doc.setClusterName(randomAsciiOfLength(5)); - doc.setClusterStats(new ClusterStatsResponse(Math.abs(randomLong()), ClusterName.CLUSTER_NAME_SETTING - .getDefault(Settings.EMPTY), randomAsciiOfLength(5), Collections.emptyList(), Collections.emptyList())); + doc.setClusterStats( + new ClusterStatsResponse( + Math.abs(randomLong()), + ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY), + Collections.emptyList(), + Collections.emptyList())); doc.setUsage(Collections.singletonList(new MonitoringFeatureSet.Usage(randomBoolean(), randomBoolean(), emptyMap()))); return doc; } catch (Exception e) { diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java b/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java index 116ae651fee..bb37b85c583 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java @@ -100,8 +100,11 @@ public class ClusterStatsResolverTests extends MonitoringIndexNameResolverTestCa emptyMap(), emptySet(), Version.CURRENT), ClusterHealthStatus.GREEN, randomNodeInfo(), randomNodeStats(), randomShardStats()) ); - return new ClusterStatsResponse(Math.abs(randomLong()), ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY), - UUID.randomUUID().toString(), responses, Collections.emptyList()); + return new ClusterStatsResponse( + Math.abs(randomLong()), + ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY), + responses, + Collections.emptyList()); } /**