Switch from getRandom to random
This is a reaction to https://github.com/elastic/elasticsearch/pull/17394 which handled a long standing TODO in core. Original commit: elastic/x-pack-elasticsearch@76425300a2
This commit is contained in:
parent
a39433ab48
commit
0531dd8b88
|
@ -173,7 +173,7 @@ public class IndexAuditTrailTests extends ShieldIntegTestCase {
|
||||||
cluster2 = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name,
|
cluster2 = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name,
|
||||||
cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(),
|
cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(),
|
||||||
useShield ? getClientWrapper() : Function.identity());
|
useShield ? getClientWrapper() : Function.identity());
|
||||||
cluster2.beforeTest(getRandom(), 0.5);
|
cluster2.beforeTest(random(), 0.5);
|
||||||
remoteClient = cluster2.client();
|
remoteClient = cluster2.client();
|
||||||
|
|
||||||
NodesInfoResponse response = remoteClient.admin().cluster().prepareNodesInfo().execute().actionGet();
|
NodesInfoResponse response = remoteClient.admin().cluster().prepareNodesInfo().execute().actionGet();
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class RemoteIndexAuditTrailStartingTests extends ShieldIntegTestCase {
|
||||||
};
|
};
|
||||||
remoteCluster = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name,
|
remoteCluster = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name,
|
||||||
cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(), getClientWrapper());
|
cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(), getClientWrapper());
|
||||||
remoteCluster.beforeTest(getRandom(), 0.5);
|
remoteCluster.beforeTest(random(), 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
|
@ -269,7 +269,7 @@ public class HttpClientTests extends ESTestCase {
|
||||||
|
|
||||||
public void testHttpResponseWithAnyStatusCodeCanReturnBody() throws Exception {
|
public void testHttpResponseWithAnyStatusCodeCanReturnBody() throws Exception {
|
||||||
int statusCode = randomFrom(200, 201, 400, 401, 403, 404, 405, 409, 413, 429, 500, 503);
|
int statusCode = randomFrom(200, 201, 400, 401, 403, 404, 405, 409, 413, 429, 500, 503);
|
||||||
String body = RandomStrings.randomAsciiOfLength(getRandom(), 100);
|
String body = RandomStrings.randomAsciiOfLength(random(), 100);
|
||||||
boolean hasBody = usually();
|
boolean hasBody = usually();
|
||||||
MockResponse mockResponse = new MockResponse().setResponseCode(statusCode);
|
MockResponse mockResponse = new MockResponse().setResponseCode(statusCode);
|
||||||
if (hasBody) {
|
if (hasBody) {
|
||||||
|
|
Loading…
Reference in New Issue