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@6f2f26168e
This commit is contained in:
Jason Tedor 2016-10-19 11:23:29 -04:00
parent 09a4882a4c
commit 3d658c3f1e
2 changed files with 11 additions and 4 deletions

View File

@ -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) {

View File

@ -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());
}
/**