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:
Nik Everett 2016-03-30 08:57:32 -04:00
parent a39433ab48
commit 0531dd8b88
3 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ public class IndexAuditTrailTests extends ShieldIntegTestCase {
cluster2 = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name,
cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(),
useShield ? getClientWrapper() : Function.identity());
cluster2.beforeTest(getRandom(), 0.5);
cluster2.beforeTest(random(), 0.5);
remoteClient = cluster2.client();
NodesInfoResponse response = remoteClient.admin().cluster().prepareNodesInfo().execute().actionGet();

View File

@ -108,7 +108,7 @@ public class RemoteIndexAuditTrailStartingTests extends ShieldIntegTestCase {
};
remoteCluster = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name,
cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(), getClientWrapper());
remoteCluster.beforeTest(getRandom(), 0.5);
remoteCluster.beforeTest(random(), 0.5);
}
@After

View File

@ -269,7 +269,7 @@ public class HttpClientTests extends ESTestCase {
public void testHttpResponseWithAnyStatusCodeCanReturnBody() throws Exception {
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();
MockResponse mockResponse = new MockResponse().setResponseCode(statusCode);
if (hasBody) {