Browse Source

Upgrade to lucene-6.3.0-snapshot-ed102d6 (#21150)

Lucene 6.3 is expected to be released in the next weeks so it'd be good to give
it some integration testing. I had to upgrade randomized-testing too so that
both Lucene and Elasticsearch are on the same version.
Adrien Grand 9 years ago
parent
commit
b3cc54cf0d
64 changed files with 114 additions and 118 deletions
  1. 1 1
      buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy
  2. 2 2
      buildSrc/version.properties
  3. 5 5
      client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java
  4. 7 7
      client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsTests.java
  5. 8 8
      client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java
  6. 6 6
      client/sniffer/src/test/java/org/elasticsearch/client/sniff/SnifferBuilderTests.java
  7. 1 1
      core/src/main/java/org/elasticsearch/Version.java
  8. 3 3
      core/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java
  9. 2 2
      core/src/main/resources/org/elasticsearch/bootstrap/security.policy
  10. 2 2
      core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
  11. 3 3
      core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksTests.java
  12. 1 5
      core/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java
  13. 4 4
      core/src/test/java/org/elasticsearch/index/query/RandomQueryBuilder.java
  14. 2 2
      core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTests.java
  15. 7 7
      core/src/test/java/org/elasticsearch/test/geo/RandomShapeGenerator.java
  16. 0 1
      distribution/licenses/lucene-analyzers-common-6.2.0.jar.sha1
  17. 1 0
      distribution/licenses/lucene-analyzers-common-6.3.0-snapshot-ed102d6.jar.sha1
  18. 0 1
      distribution/licenses/lucene-backward-codecs-6.2.0.jar.sha1
  19. 1 0
      distribution/licenses/lucene-backward-codecs-6.3.0-snapshot-ed102d6.jar.sha1
  20. 0 1
      distribution/licenses/lucene-core-6.2.0.jar.sha1
  21. 1 0
      distribution/licenses/lucene-core-6.3.0-snapshot-ed102d6.jar.sha1
  22. 0 1
      distribution/licenses/lucene-grouping-6.2.0.jar.sha1
  23. 1 0
      distribution/licenses/lucene-grouping-6.3.0-snapshot-ed102d6.jar.sha1
  24. 0 1
      distribution/licenses/lucene-highlighter-6.2.0.jar.sha1
  25. 1 0
      distribution/licenses/lucene-highlighter-6.3.0-snapshot-ed102d6.jar.sha1
  26. 0 1
      distribution/licenses/lucene-join-6.2.0.jar.sha1
  27. 1 0
      distribution/licenses/lucene-join-6.3.0-snapshot-ed102d6.jar.sha1
  28. 0 1
      distribution/licenses/lucene-memory-6.2.0.jar.sha1
  29. 1 0
      distribution/licenses/lucene-memory-6.3.0-snapshot-ed102d6.jar.sha1
  30. 0 1
      distribution/licenses/lucene-misc-6.2.0.jar.sha1
  31. 1 0
      distribution/licenses/lucene-misc-6.3.0-snapshot-ed102d6.jar.sha1
  32. 0 1
      distribution/licenses/lucene-queries-6.2.0.jar.sha1
  33. 1 0
      distribution/licenses/lucene-queries-6.3.0-snapshot-ed102d6.jar.sha1
  34. 0 1
      distribution/licenses/lucene-queryparser-6.2.0.jar.sha1
  35. 1 0
      distribution/licenses/lucene-queryparser-6.3.0-snapshot-ed102d6.jar.sha1
  36. 0 1
      distribution/licenses/lucene-sandbox-6.2.0.jar.sha1
  37. 1 0
      distribution/licenses/lucene-sandbox-6.3.0-snapshot-ed102d6.jar.sha1
  38. 0 1
      distribution/licenses/lucene-spatial-6.2.0.jar.sha1
  39. 1 0
      distribution/licenses/lucene-spatial-6.3.0-snapshot-ed102d6.jar.sha1
  40. 0 1
      distribution/licenses/lucene-spatial-extras-6.2.0.jar.sha1
  41. 1 0
      distribution/licenses/lucene-spatial-extras-6.3.0-snapshot-ed102d6.jar.sha1
  42. 0 1
      distribution/licenses/lucene-spatial3d-6.2.0.jar.sha1
  43. 1 0
      distribution/licenses/lucene-spatial3d-6.3.0-snapshot-ed102d6.jar.sha1
  44. 0 1
      distribution/licenses/lucene-suggest-6.2.0.jar.sha1
  45. 1 0
      distribution/licenses/lucene-suggest-6.3.0-snapshot-ed102d6.jar.sha1
  46. 1 1
      docs/plugins/index.asciidoc
  47. 1 1
      docs/reference/index.asciidoc
  48. 0 1
      modules/lang-expression/licenses/lucene-expressions-6.2.0.jar.sha1
  49. 1 0
      modules/lang-expression/licenses/lucene-expressions-6.3.0-snapshot-ed102d6.jar.sha1
  50. 0 1
      plugins/analysis-icu/licenses/lucene-analyzers-icu-6.2.0.jar.sha1
  51. 1 0
      plugins/analysis-icu/licenses/lucene-analyzers-icu-6.3.0-snapshot-ed102d6.jar.sha1
  52. 0 1
      plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.2.0.jar.sha1
  53. 1 0
      plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.3.0-snapshot-ed102d6.jar.sha1
  54. 0 1
      plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.2.0.jar.sha1
  55. 1 0
      plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.3.0-snapshot-ed102d6.jar.sha1
  56. 0 1
      plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.2.0.jar.sha1
  57. 1 0
      plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.3.0-snapshot-ed102d6.jar.sha1
  58. 0 1
      plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.2.0.jar.sha1
  59. 1 0
      plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.3.0-snapshot-ed102d6.jar.sha1
  60. 9 9
      test/framework/src/main/java/org/elasticsearch/ingest/RandomDocumentPicks.java
  61. 3 3
      test/framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java
  62. 7 7
      test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java
  63. 2 2
      test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java
  64. 16 16
      test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java

+ 1 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy

@@ -38,7 +38,7 @@ public class DocsTestPlugin extends RestTestPlugin {
              * the last released version for docs. */
             '\\{version\\}':
                 VersionProperties.elasticsearch.replace('-SNAPSHOT', ''),
-            '\\{lucene_version\\}' : VersionProperties.lucene,
+            '\\{lucene_version\\}' : VersionProperties.lucene.replaceAll('-snapshot-\\w+$', ''),
         ]
         Task listSnippets = project.tasks.create('listSnippets', SnippetsTask)
         listSnippets.group 'Docs'

+ 2 - 2
buildSrc/version.properties

@@ -1,5 +1,5 @@
 elasticsearch     = 6.0.0-alpha1
-lucene            = 6.2.0
+lucene            = 6.3.0-snapshot-ed102d6
 
 # optional dependencies
 spatial4j         = 0.6
@@ -11,7 +11,7 @@ slf4j             = 1.6.2
 jna               = 4.2.2
 
 # test dependencies
-randomizedrunner  = 2.3.2
+randomizedrunner  = 2.4.0
 junit             = 4.11
 httpclient        = 4.5.2
 httpcore          = 4.4.5

+ 5 - 5
client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.client;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpHost;
@@ -62,7 +62,7 @@ public class RequestLoggerTests extends RestClientTestCase {
         }
 
         HttpRequestBase request;
-        int requestType = RandomInts.randomIntBetween(getRandom(), 0, 7);
+        int requestType = RandomNumbers.randomIntBetween(getRandom(), 0, 7);
         switch(requestType) {
             case 0:
                 request = new HttpGetWithEntity(uri);
@@ -99,7 +99,7 @@ public class RequestLoggerTests extends RestClientTestCase {
             expected += " -d '" + requestBody + "'";
             HttpEntityEnclosingRequest enclosingRequest = (HttpEntityEnclosingRequest) request;
             HttpEntity entity;
-            switch(RandomInts.randomIntBetween(getRandom(), 0, 3)) {
+            switch(RandomNumbers.randomIntBetween(getRandom(), 0, 3)) {
                 case 0:
                     entity = new StringEntity(requestBody, StandardCharsets.UTF_8);
                     break;
@@ -128,12 +128,12 @@ public class RequestLoggerTests extends RestClientTestCase {
 
     public void testTraceResponse() throws IOException {
         ProtocolVersion protocolVersion = new ProtocolVersion("HTTP", 1, 1);
-        int statusCode = RandomInts.randomIntBetween(getRandom(), 200, 599);
+        int statusCode = RandomNumbers.randomIntBetween(getRandom(), 200, 599);
         String reasonPhrase = "REASON";
         BasicStatusLine statusLine = new BasicStatusLine(protocolVersion, statusCode, reasonPhrase);
         String expected = "# " + statusLine.toString();
         BasicHttpResponse httpResponse = new BasicHttpResponse(statusLine);
-        int numHeaders = RandomInts.randomIntBetween(getRandom(), 0, 3);
+        int numHeaders = RandomNumbers.randomIntBetween(getRandom(), 0, 3);
         for (int i = 0; i < numHeaders; i++) {
             httpResponse.setHeader("header" + i, "value");
             expected += "\n# header" + i + ": value";

+ 7 - 7
client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsTests.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.client;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
@@ -95,7 +95,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase {
                 return null;
             }
         });
-        int numHosts = RandomInts.randomIntBetween(getRandom(), 2, 5);
+        int numHosts = RandomNumbers.randomIntBetween(getRandom(), 2, 5);
         httpHosts = new HttpHost[numHosts];
         for (int i = 0; i < numHosts; i++) {
             httpHosts[i] = new HttpHost("localhost", 9200 + i);
@@ -105,7 +105,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase {
     }
 
     public void testRoundRobinOkStatusCodes() throws IOException {
-        int numIters = RandomInts.randomIntBetween(getRandom(), 1, 5);
+        int numIters = RandomNumbers.randomIntBetween(getRandom(), 1, 5);
         for (int i = 0; i < numIters; i++) {
             Set<HttpHost> hostsSet = new HashSet<>();
             Collections.addAll(hostsSet, httpHosts);
@@ -121,7 +121,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase {
     }
 
     public void testRoundRobinNoRetryErrors() throws IOException {
-        int numIters = RandomInts.randomIntBetween(getRandom(), 1, 5);
+        int numIters = RandomNumbers.randomIntBetween(getRandom(), 1, 5);
         for (int i = 0; i < numIters; i++) {
             Set<HttpHost> hostsSet = new HashSet<>();
             Collections.addAll(hostsSet, httpHosts);
@@ -198,7 +198,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase {
             assertEquals("every host should have been used but some weren't: " + hostsSet, 0, hostsSet.size());
         }
 
-        int numIters = RandomInts.randomIntBetween(getRandom(), 2, 5);
+        int numIters = RandomNumbers.randomIntBetween(getRandom(), 2, 5);
         for (int i = 1; i <= numIters; i++) {
             //check that one different host is resurrected at each new attempt
             Set<HttpHost> hostsSet = new HashSet<>();
@@ -228,7 +228,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase {
             if (getRandom().nextBoolean()) {
                 //mark one host back alive through a successful request and check that all requests after that are sent to it
                 HttpHost selectedHost = null;
-                int iters = RandomInts.randomIntBetween(getRandom(), 2, 10);
+                int iters = RandomNumbers.randomIntBetween(getRandom(), 2, 10);
                 for (int y = 0; y < iters; y++) {
                     int statusCode = randomErrorNoRetryStatusCode(getRandom());
                     Response response;
@@ -269,7 +269,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase {
     }
 
     private static String randomErrorRetryEndpoint() {
-        switch(RandomInts.randomIntBetween(getRandom(), 0, 3)) {
+        switch(RandomNumbers.randomIntBetween(getRandom(), 0, 3)) {
             case 0:
                 return "/" + randomErrorRetryStatusCode(getRandom());
             case 1:

+ 8 - 8
client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.client.sniff;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
 import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 import com.fasterxml.jackson.core.JsonFactory;
@@ -69,7 +69,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
 
     @Before
     public void startHttpServer() throws IOException {
-        this.sniffRequestTimeout = RandomInts.randomIntBetween(getRandom(), 1000, 10000);
+        this.sniffRequestTimeout = RandomNumbers.randomIntBetween(getRandom(), 1000, 10000);
         this.scheme = RandomPicks.randomFrom(getRandom(), ElasticsearchHostsSniffer.Scheme.values());
         if (rarely()) {
             this.sniffResponse = SniffResponse.buildFailure();
@@ -101,7 +101,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
                 assertEquals(e.getMessage(), "scheme cannot be null");
             }
             try {
-                new ElasticsearchHostsSniffer(restClient, RandomInts.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0),
+                new ElasticsearchHostsSniffer(restClient, RandomNumbers.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0),
                         ElasticsearchHostsSniffer.Scheme.HTTP);
                 fail("should have failed");
             } catch (IllegalArgumentException e) {
@@ -175,7 +175,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
     }
 
     private static SniffResponse buildSniffResponse(ElasticsearchHostsSniffer.Scheme scheme) throws IOException {
-        int numNodes = RandomInts.randomIntBetween(getRandom(), 1, 5);
+        int numNodes = RandomNumbers.randomIntBetween(getRandom(), 1, 5);
         List<HttpHost> hosts = new ArrayList<>(numNodes);
         JsonFactory jsonFactory = new JsonFactory();
         StringWriter writer = new StringWriter();
@@ -205,7 +205,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
             boolean isHttpEnabled = rarely() == false;
             if (isHttpEnabled) {
                 String host = "host" + i;
-                int port = RandomInts.randomIntBetween(getRandom(), 9200, 9299);
+                int port = RandomNumbers.randomIntBetween(getRandom(), 9200, 9299);
                 HttpHost httpHost = new HttpHost(host, port, scheme.toString());
                 hosts.add(httpHost);
                 generator.writeObjectFieldStart("http");
@@ -228,7 +228,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
             }
             if (getRandom().nextBoolean()) {
                 String[] roles = {"master", "data", "ingest"};
-                int numRoles = RandomInts.randomIntBetween(getRandom(), 0, 3);
+                int numRoles = RandomNumbers.randomIntBetween(getRandom(), 0, 3);
                 Set<String> nodeRoles = new HashSet<>(numRoles);
                 for (int j = 0; j < numRoles; j++) {
                     String role;
@@ -242,7 +242,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
                 }
                 generator.writeEndArray();
             }
-            int numAttributes = RandomInts.randomIntBetween(getRandom(), 0, 3);
+            int numAttributes = RandomNumbers.randomIntBetween(getRandom(), 0, 3);
             Map<String, String> attributes = new HashMap<>(numAttributes);
             for (int j = 0; j < numAttributes; j++) {
                 attributes.put("attr" + j, "value" + j);
@@ -291,6 +291,6 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase {
     }
 
     private static int randomErrorResponseCode() {
-        return RandomInts.randomIntBetween(getRandom(), 400, 599);
+        return RandomNumbers.randomIntBetween(getRandom(), 400, 599);
     }
 }

+ 6 - 6
client/sniffer/src/test/java/org/elasticsearch/client/sniff/SnifferBuilderTests.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.client.sniff;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import org.apache.http.HttpHost;
 import org.elasticsearch.client.RestClient;
 import org.elasticsearch.client.RestClientTestCase;
@@ -31,7 +31,7 @@ import static org.junit.Assert.fail;
 public class SnifferBuilderTests extends RestClientTestCase {
 
     public void testBuild() throws Exception {
-        int numNodes = RandomInts.randomIntBetween(getRandom(), 1, 5);
+        int numNodes = RandomNumbers.randomIntBetween(getRandom(), 1, 5);
         HttpHost[] hosts = new HttpHost[numNodes];
         for (int i = 0; i < numNodes; i++) {
             hosts[i] = new HttpHost("localhost", 9200 + i);
@@ -46,14 +46,14 @@ public class SnifferBuilderTests extends RestClientTestCase {
             }
 
             try {
-                Sniffer.builder(client).setSniffIntervalMillis(RandomInts.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0));
+                Sniffer.builder(client).setSniffIntervalMillis(RandomNumbers.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0));
                 fail("should have failed");
             } catch(IllegalArgumentException e) {
                 assertEquals("sniffIntervalMillis must be greater than 0", e.getMessage());
             }
 
             try {
-                Sniffer.builder(client).setSniffAfterFailureDelayMillis(RandomInts.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0));
+                Sniffer.builder(client).setSniffAfterFailureDelayMillis(RandomNumbers.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0));
                 fail("should have failed");
             } catch(IllegalArgumentException e) {
                 assertEquals("sniffAfterFailureDelayMillis must be greater than 0", e.getMessage());
@@ -74,10 +74,10 @@ public class SnifferBuilderTests extends RestClientTestCase {
 
             SnifferBuilder builder = Sniffer.builder(client);
             if (getRandom().nextBoolean()) {
-                builder.setSniffIntervalMillis(RandomInts.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE));
+                builder.setSniffIntervalMillis(RandomNumbers.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE));
             }
             if (getRandom().nextBoolean()) {
-                builder.setSniffAfterFailureDelayMillis(RandomInts.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE));
+                builder.setSniffAfterFailureDelayMillis(RandomNumbers.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE));
             }
             if (getRandom().nextBoolean()) {
                 builder.setHostsSniffer(new MockHostsSniffer());

+ 1 - 1
core/src/main/java/org/elasticsearch/Version.java

@@ -90,7 +90,7 @@ public class Version {
     public static final int V_5_0_0_rc1_ID = 5000051;
     public static final Version V_5_0_0_rc1 = new Version(V_5_0_0_rc1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
     public static final int V_6_0_0_alpha1_ID = 6000001;
-    public static final Version V_6_0_0_alpha1 = new Version(V_6_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
+    public static final Version V_6_0_0_alpha1 = new Version(V_6_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_3_0);
     public static final Version CURRENT = V_6_0_0_alpha1;
 
     /* NOTE: don't add unreleased version to this list except of the version assigned to CURRENT.

+ 3 - 3
core/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java

@@ -185,8 +185,8 @@ public class XContentMapValues {
         // we want all sub properties to match as soon as an object matches
 
         return (map) -> filter(map,
-            include, include.getInitialState(),
-            exclude, exclude.getInitialState(),
+            include, 0,
+            exclude, 0,
             matchAllAutomaton);
     }
 
@@ -237,7 +237,7 @@ public class XContentMapValues {
                     // the object matched, so consider that the include matches every inner property
                     // we only care about excludes now
                     subIncludeAutomaton = matchAllAutomaton;
-                    subIncludeState = includeAutomaton.getInitialState();
+                    subIncludeState = 0;
                 }
             }
 

+ 2 - 2
core/src/main/resources/org/elasticsearch/bootstrap/security.policy

@@ -31,7 +31,7 @@ grant codeBase "${codebase.securesm-1.1.jar}" {
 //// Very special jar permissions:
 //// These are dangerous permissions that we don't want to grant to everything.
 
-grant codeBase "${codebase.lucene-core-6.2.0.jar}" {
+grant codeBase "${codebase.lucene-core-6.3.0-snapshot-ed102d6.jar}" {
   // needed to allow MMapDirectory's "unmap hack" (die unmap hack, die)
   // java 8 package
   permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
@@ -42,7 +42,7 @@ grant codeBase "${codebase.lucene-core-6.2.0.jar}" {
   permission java.lang.RuntimePermission "accessDeclaredMembers";
 };
 
-grant codeBase "${codebase.lucene-misc-6.2.0.jar}" {
+grant codeBase "${codebase.lucene-misc-6.3.0-snapshot-ed102d6.jar}" {
   // needed to allow shard shrinking to use hard-links if possible via lucenes HardlinkCopyDirectoryWrapper
   permission java.nio.file.LinkPermission "hard";
 };

+ 2 - 2
core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy

@@ -33,7 +33,7 @@ grant codeBase "${codebase.securemock-1.2.jar}" {
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
 };
 
-grant codeBase "${codebase.lucene-test-framework-6.2.0.jar}" {
+grant codeBase "${codebase.lucene-test-framework-6.3.0-snapshot-ed102d6.jar}" {
   // needed by RamUsageTester
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
   // needed for testing hardlinks in StoreRecoveryTests since we install MockFS
@@ -42,7 +42,7 @@ grant codeBase "${codebase.lucene-test-framework-6.2.0.jar}" {
   permission java.lang.RuntimePermission "accessDeclaredMembers";
 };
 
-grant codeBase "${codebase.randomizedtesting-runner-2.3.2.jar}" {
+grant codeBase "${codebase.randomizedtesting-runner-2.4.0.jar}" {
   // optionally needed for access to private test methods (e.g. beforeClass)
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
   // needed to fail tests on uncaught exceptions from other threads

+ 3 - 3
core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksTests.java

@@ -19,7 +19,7 @@
 package org.elasticsearch.action.admin.cluster.node.tasks;
 
 import com.carrotsearch.randomizedtesting.RandomizedContext;
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import org.elasticsearch.action.ActionListener;
 import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest;
 import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse;
@@ -380,9 +380,9 @@ public class CancellableTasksTests extends TaskManagerTestCase {
         // Introduce an additional pseudo random repeatable race conditions
         String delayName = RandomizedContext.current().getRunnerSeedAsString() + ":" + nodeId + ":" + name;
         Random random = new Random(delayName.hashCode());
-        if (RandomInts.randomIntBetween(random, 0, 10) < 1) {
+        if (RandomNumbers.randomIntBetween(random, 0, 10) < 1) {
             try {
-                Thread.sleep(RandomInts.randomIntBetween(random, 20, 50));
+                Thread.sleep(RandomNumbers.randomIntBetween(random, 20, 50));
             } catch (InterruptedException ex) {
                 Thread.currentThread().interrupt();
             }

+ 1 - 5
core/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java

@@ -19,10 +19,7 @@
 
 package org.elasticsearch.client.transport;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
-import org.elasticsearch.Version;
 import org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse;
-import org.elasticsearch.action.admin.cluster.node.liveness.TransportLivenessAction;
 import org.elasticsearch.cluster.ClusterName;
 import org.elasticsearch.cluster.node.DiscoveryNode;
 import org.elasticsearch.common.component.Lifecycle;
@@ -37,7 +34,6 @@ import org.elasticsearch.transport.TransportRequest;
 import org.elasticsearch.transport.TransportRequestOptions;
 import org.elasticsearch.transport.TransportResponse;
 import org.elasticsearch.transport.TransportResponseHandler;
-import org.elasticsearch.transport.TransportService;
 import org.elasticsearch.transport.TransportServiceAdapter;
 
 import java.io.IOException;
@@ -83,7 +79,7 @@ abstract class FailAndRetryMockTransport<Response extends TransportResponse> imp
         //once nodes are connected we'll just return errors for each sendRequest call
         triedNodes.add(node);
 
-        if (RandomInts.randomInt(random, 100) > 10) {
+        if (random.nextInt(100) > 10) {
             connectTransportExceptions.incrementAndGet();
             throw new ConnectTransportException(node, "node not available");
         } else {

+ 4 - 4
core/src/test/java/org/elasticsearch/index/query/RandomQueryBuilder.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.index.query;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 import org.elasticsearch.test.AbstractQueryTestCase;
 
@@ -38,7 +38,7 @@ public class RandomQueryBuilder {
      * @return a random {@link QueryBuilder}
      */
     public static QueryBuilder createQuery(Random r) {
-        switch (RandomInts.randomIntBetween(r, 0, 3)) {
+        switch (RandomNumbers.randomIntBetween(r, 0, 3)) {
             case 0:
                 return new MatchAllQueryBuilderTests().createTestQueryBuilder();
             case 1:
@@ -61,7 +61,7 @@ public class RandomQueryBuilder {
         // for now, only use String Rangequeries for MultiTerm test, numeric and date makes little sense
         // see issue #12123 for discussion
         MultiTermQueryBuilder multiTermQueryBuilder;
-        switch(RandomInts.randomIntBetween(r, 0, 3)) {
+        switch(RandomNumbers.randomIntBetween(r, 0, 3)) {
             case 0:
                 RangeQueryBuilder stringRangeQuery = new RangeQueryBuilder(AbstractQueryTestCase.STRING_FIELD_NAME);
                 stringRangeQuery.from("a" + RandomStrings.randomAsciiOfLengthBetween(r, 1, 10));
@@ -81,7 +81,7 @@ public class RandomQueryBuilder {
                 throw new UnsupportedOperationException();
         }
         if (r.nextBoolean()) {
-            multiTermQueryBuilder.boost(2.0f / RandomInts.randomIntBetween(r, 1, 20));
+            multiTermQueryBuilder.boost(2.0f / RandomNumbers.randomIntBetween(r, 1, 20));
         }
         return multiTermQueryBuilder;
     }

+ 2 - 2
core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTests.java

@@ -18,7 +18,7 @@
  */
 package org.elasticsearch.index.snapshots.blobstore;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import org.elasticsearch.test.ESTestCase;
 
 import java.io.ByteArrayInputStream;
@@ -111,7 +111,7 @@ public class SlicedInputStreamTests extends ESTestCase {
     }
 
     private byte[] randomBytes(Random random) {
-        int length = RandomInts.randomIntBetween(random, 1, 10);
+        int length = RandomNumbers.randomIntBetween(random, 1, 10);
         byte[] data = new byte[length];
         random.nextBytes(data);
         return data;

+ 7 - 7
core/src/test/java/org/elasticsearch/test/geo/RandomShapeGenerator.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.test.geo;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.vividsolutions.jts.algorithm.ConvexHull;
 import com.vividsolutions.jts.geom.Coordinate;
 import com.vividsolutions.jts.geom.Geometry;
@@ -61,7 +61,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator {
         private static final ShapeType[] types = values();
 
         public static ShapeType randomType(Random r) {
-            return types[RandomInts.randomIntBetween(r, 0, types.length - 1)];
+            return types[RandomNumbers.randomIntBetween(r, 0, types.length - 1)];
         }
     }
 
@@ -115,7 +115,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator {
             throws InvalidShapeException {
         if (numGeometries <= 0) {
             // cap geometry collection at 4 shapes (to save test time)
-            numGeometries = RandomInts.randomIntBetween(r, 2, 4);
+            numGeometries = RandomNumbers.randomIntBetween(r, 2, 4);
         }
 
         if (nearPoint == null) {
@@ -187,7 +187,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator {
                 // for random testing having a maximum number of 10 points for a line string is more than sufficient
                 // if this number gets out of hand, the number of self intersections for a linestring can become
                 // (n^2-n)/2 and computing the relation intersection matrix will become NP-Hard
-                int numPoints = RandomInts.randomIntBetween(r, 3, 10);
+                int numPoints = RandomNumbers.randomIntBetween(r, 3, 10);
                 CoordinatesBuilder coordinatesBuilder = new CoordinatesBuilder();
                 for (int i=0; i<numPoints; ++i) {
                     p = xRandomPointIn(r, within);
@@ -197,12 +197,12 @@ public class RandomShapeGenerator extends RandomGeoGenerator {
                 return pcb;
             case MULTILINESTRING:
                 MultiLineStringBuilder mlsb = new MultiLineStringBuilder();
-                for (int i=0; i<RandomInts.randomIntBetween(r, 1, 10); ++i) {
+                for (int i=0; i<RandomNumbers.randomIntBetween(r, 1, 10); ++i) {
                     mlsb.linestring((LineStringBuilder) createShape(r, nearPoint, within, ShapeType.LINESTRING, false));
                 }
                 return mlsb;
             case POLYGON:
-                numPoints = RandomInts.randomIntBetween(r, 5, 25);
+                numPoints = RandomNumbers.randomIntBetween(r, 5, 25);
                 Coordinate[] coordinates = new Coordinate[numPoints];
                 for (int i=0; i<numPoints; ++i) {
                     p = (Point) createShape(r, nearPoint, within, ShapeType.POINT, false).build();
@@ -298,7 +298,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator {
     }
 
     private static boolean rarely(Random r) {
-        return RandomInts.randomInt(r, 100) >= 90;
+        return r.nextInt(100) >= 90;
     }
 
     private static Range xRandomRange(Random r, double near, Range bounds) {

+ 0 - 1
distribution/licenses/lucene-analyzers-common-6.2.0.jar.sha1

@@ -1 +0,0 @@
-d254d52dd394b5079129f3d5f3bf4f2d44a5936e

+ 1 - 0
distribution/licenses/lucene-analyzers-common-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+6a96375ee285920400266dfc411342f2e3d3d623

+ 0 - 1
distribution/licenses/lucene-backward-codecs-6.2.0.jar.sha1

@@ -1 +0,0 @@
-b625bb21456b3c0d1e5e431bced125cb060c1abd

+ 1 - 0
distribution/licenses/lucene-backward-codecs-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+aa0403f90ac23f50667477b314175e58175c8067

+ 0 - 1
distribution/licenses/lucene-core-6.2.0.jar.sha1

@@ -1 +0,0 @@
-849ee62525a294416802be2cacc66c80352f6f13

+ 1 - 0
distribution/licenses/lucene-core-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+6510e4e4af2b90a2d1e2e8c27e92120667c0bff8

+ 0 - 1
distribution/licenses/lucene-grouping-6.2.0.jar.sha1

@@ -1 +0,0 @@
-9527fedfd5acc624b2bb3f862bd99fb8f470b053

+ 1 - 0
distribution/licenses/lucene-grouping-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+16fb10b3b006a4a7cb2ed9b436e59c91dc9edf47

+ 0 - 1
distribution/licenses/lucene-highlighter-6.2.0.jar.sha1

@@ -1 +0,0 @@
-7ca342372a3f45e32bbd21cecaa757e38eccb8a5

+ 1 - 0
distribution/licenses/lucene-highlighter-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+47a3c05e1be7f593a0860c744c752807fb4d44fb

+ 0 - 1
distribution/licenses/lucene-join-6.2.0.jar.sha1

@@ -1 +0,0 @@
-da0b8de98511abd4fe9c7d48a353d17854c5ed46

+ 1 - 0
distribution/licenses/lucene-join-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+2bbe25506f997056555c8bfba64382663433517e

+ 0 - 1
distribution/licenses/lucene-memory-6.2.0.jar.sha1

@@ -1 +0,0 @@
-bc9e075b1ee051c8e5246c237c38d8e71dab8a66

+ 1 - 0
distribution/licenses/lucene-memory-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+76a1c370acfa5ad74beef243512a1dda64d01d79

+ 0 - 1
distribution/licenses/lucene-misc-6.2.0.jar.sha1

@@ -1 +0,0 @@
-94ddde6312566a4da4a50a88e453b6c82c759b41

+ 1 - 0
distribution/licenses/lucene-misc-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+ce459756eb7210c1bf7cd2a0cb25c7c5660de224

+ 0 - 1
distribution/licenses/lucene-queries-6.2.0.jar.sha1

@@ -1 +0,0 @@
-dce47238f78e3e97d91dc6fefa9f46f07866bc2b

+ 1 - 0
distribution/licenses/lucene-queries-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+1c27529566f2b8ab8856e8b0a4779ad2071588fc

+ 0 - 1
distribution/licenses/lucene-queryparser-6.2.0.jar.sha1

@@ -1 +0,0 @@
-17ef728ac15e668bfa1105321611548424637645

+ 1 - 0
distribution/licenses/lucene-queryparser-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+b5a9d1e55751dc193879c22a48823a863492bbe2

+ 0 - 1
distribution/licenses/lucene-sandbox-6.2.0.jar.sha1

@@ -1 +0,0 @@
-520183f7b9aba77a26e224760c420a3844b0631a

+ 1 - 0
distribution/licenses/lucene-sandbox-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+8d73ab3c889d386b3a594941992a5d942c57513a

+ 0 - 1
distribution/licenses/lucene-spatial-6.2.0.jar.sha1

@@ -1 +0,0 @@
-8dba929b66927b936fbc76103b109ad6c824daee

+ 1 - 0
distribution/licenses/lucene-spatial-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+85e74df9bc722f9a858775496cad7f35dce65aa0

+ 0 - 1
distribution/licenses/lucene-spatial-extras-6.2.0.jar.sha1

@@ -1 +0,0 @@
-3b5a6ef5cd90c0218a72e9e2f7e60104be2447da

+ 1 - 0
distribution/licenses/lucene-spatial-extras-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+cc12ac933b39ef33e186e77f7f6af6bdc99f9108

+ 0 - 1
distribution/licenses/lucene-spatial3d-6.2.0.jar.sha1

@@ -1 +0,0 @@
-fcdb0567725722c5145149d1502848b6a96ec18d

+ 1 - 0
distribution/licenses/lucene-spatial3d-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+8dfc7a42839db1e4ef69dbfc23d9ef2fb6c43ff6

+ 0 - 1
distribution/licenses/lucene-suggest-6.2.0.jar.sha1

@@ -1 +0,0 @@
-3d9d526c51f483d27f425c75d7e56bc0849242d6

+ 1 - 0
distribution/licenses/lucene-suggest-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+0b065269e76aa5cf56fa30dcb0cb4641974b6bed

+ 1 - 1
docs/plugins/index.asciidoc

@@ -3,7 +3,7 @@
 :ref:            https://www.elastic.co/guide/en/elasticsearch/reference/master
 :guide:          https://www.elastic.co/guide
 :version:        6.0.0-alpha1
-:lucene_version: 6.2.0
+:lucene_version: 6.3.0
 :plugin_url:      https://artifacts.elastic.co/downloads/elasticsearch-plugins
 
 [[intro]]

+ 1 - 1
docs/reference/index.asciidoc

@@ -9,7 +9,7 @@ release-state can be: released | prerelease | unreleased
 //////////
 
 :release-state:  unreleased
-:lucene_version: 6.2.0
+:lucene_version: 6.3.4
 :branch:         master
 :jdk:            1.8.0_73
 :defguide:       https://www.elastic.co/guide/en/elasticsearch/guide/master

+ 0 - 1
modules/lang-expression/licenses/lucene-expressions-6.2.0.jar.sha1

@@ -1 +0,0 @@
-99764b20aba5443f8a181f7015a806443c589844

+ 1 - 0
modules/lang-expression/licenses/lucene-expressions-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+3ad2da8a2c48520f05723050252b131c96cc3b7c

+ 0 - 1
plugins/analysis-icu/licenses/lucene-analyzers-icu-6.2.0.jar.sha1

@@ -1 +0,0 @@
-68de5f298090b92aa9a803eb4f5aed0c9104e685

+ 1 - 0
plugins/analysis-icu/licenses/lucene-analyzers-icu-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+2794258f69dd65abe1d991013b6ba98ae8a2ab60

+ 0 - 1
plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.2.0.jar.sha1

@@ -1 +0,0 @@
-17ee76df332c0342a172790472b777086487a299

+ 1 - 0
plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+7e325a21b6bde7a86861bf380b40aeaafabe8c90

+ 0 - 1
plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.2.0.jar.sha1

@@ -1 +0,0 @@
-8d2a6b8679563d9f044eb1cee580282b20d8e149

+ 1 - 0
plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+746a7888f48f3be86f7a31d95a1ca1e033cf0c3f

+ 0 - 1
plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.2.0.jar.sha1

@@ -1 +0,0 @@
-ba3fd99d1cf47d31b82817accdb199fc7a8d838d

+ 1 - 0
plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+fec95fc0b5bb2e0855a9c9be3dc2982c0ab0fa16

+ 0 - 1
plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.2.0.jar.sha1

@@ -1 +0,0 @@
-09d2a759a765f73e2e7becbc560411469c464cfa

+ 1 - 0
plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.3.0-snapshot-ed102d6.jar.sha1

@@ -0,0 +1 @@
+8663b181f65dadffa6f0f42e56a7ab36ff447fd4

+ 9 - 9
test/framework/src/main/java/org/elasticsearch/ingest/RandomDocumentPicks.java

@@ -19,7 +19,7 @@
 
 package org.elasticsearch.ingest;
 
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
 import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 
@@ -41,7 +41,7 @@ public final class RandomDocumentPicks {
      * path to refer to a field name using the dot notation.
      */
     public static String randomFieldName(Random random) {
-        int numLevels = RandomInts.randomIntBetween(random, 1, 5);
+        int numLevels = RandomNumbers.randomIntBetween(random, 1, 5);
         String fieldName = "";
         for (int i = 0; i < numLevels; i++) {
             if (i > 0) {
@@ -169,7 +169,7 @@ public final class RandomDocumentPicks {
     }
 
     private static Object randomFieldValue(Random random, int currentDepth) {
-        switch(RandomInts.randomIntBetween(random, 0, 9)) {
+        switch(RandomNumbers.randomIntBetween(random, 0, 9)) {
             case 0:
                 return randomString(random);
             case 1:
@@ -180,28 +180,28 @@ public final class RandomDocumentPicks {
                 return random.nextDouble();
             case 4:
                 List<String> stringList = new ArrayList<>();
-                int numStringItems = RandomInts.randomIntBetween(random, 1, 10);
+                int numStringItems = RandomNumbers.randomIntBetween(random, 1, 10);
                 for (int j = 0; j < numStringItems; j++) {
                     stringList.add(randomString(random));
                 }
                 return stringList;
             case 5:
                 List<Integer> intList = new ArrayList<>();
-                int numIntItems = RandomInts.randomIntBetween(random, 1, 10);
+                int numIntItems = RandomNumbers.randomIntBetween(random, 1, 10);
                 for (int j = 0; j < numIntItems; j++) {
                     intList.add(random.nextInt());
                 }
                 return intList;
             case 6:
                 List<Boolean> booleanList = new ArrayList<>();
-                int numBooleanItems = RandomInts.randomIntBetween(random, 1, 10);
+                int numBooleanItems = RandomNumbers.randomIntBetween(random, 1, 10);
                 for (int j = 0; j < numBooleanItems; j++) {
                     booleanList.add(random.nextBoolean());
                 }
                 return booleanList;
             case 7:
                 List<Double> doubleList = new ArrayList<>();
-                int numDoubleItems = RandomInts.randomIntBetween(random, 1, 10);
+                int numDoubleItems = RandomNumbers.randomIntBetween(random, 1, 10);
                 for (int j = 0; j < numDoubleItems; j++) {
                     doubleList.add(random.nextDouble());
                 }
@@ -211,7 +211,7 @@ public final class RandomDocumentPicks {
                 addRandomFields(random, newNode, ++currentDepth);
                 return newNode;
             case 9:
-                byte[] byteArray = new byte[RandomInts.randomIntBetween(random, 1, 1024)];
+                byte[] byteArray = new byte[RandomNumbers.randomIntBetween(random, 1, 1024)];
                 random.nextBytes(byteArray);
                 return byteArray;
             default:
@@ -230,7 +230,7 @@ public final class RandomDocumentPicks {
         if (currentDepth > 5) {
             return;
         }
-        int numFields = RandomInts.randomIntBetween(random, 1, 10);
+        int numFields = RandomNumbers.randomIntBetween(random, 1, 10);
         for (int i = 0; i < numFields; i++) {
             String fieldName = randomLeafFieldName(random);
             Object fieldValue = randomFieldValue(random, currentDepth);

+ 3 - 3
test/framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java

@@ -18,7 +18,7 @@ package org.elasticsearch.test;/*
  */
 
 import com.carrotsearch.randomizedtesting.RandomizedTest;
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.message.ParameterizedMessage;
@@ -208,10 +208,10 @@ public class BackgroundIndexer implements AutoCloseable {
     }
 
     private XContentBuilder generateSource(long id, Random random) throws IOException {
-        int contentLength = RandomInts.randomIntBetween(random, minFieldSize, maxFieldSize);
+        int contentLength = RandomNumbers.randomIntBetween(random, minFieldSize, maxFieldSize);
         StringBuilder text = new StringBuilder(contentLength);
         while (text.length() < contentLength) {
-            int tokenLength = RandomInts.randomIntBetween(random, 1, Math.min(contentLength - text.length(), 10));
+            int tokenLength = RandomNumbers.randomIntBetween(random, 1, Math.min(contentLength - text.length(), 10));
             text.append(" ").append(RandomStrings.randomRealisticUnicodeOfCodepointLength(random, tokenLength));
         }
         XContentBuilder builder = XContentFactory.smileBuilder();

+ 7 - 7
test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java

@@ -20,7 +20,7 @@ package org.elasticsearch.test;
 
 import com.carrotsearch.randomizedtesting.RandomizedContext;
 import com.carrotsearch.randomizedtesting.annotations.TestGroup;
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
 import org.apache.http.HttpHost;
 import org.apache.lucene.util.IOUtils;
@@ -433,7 +433,7 @@ public abstract class ESIntegTestCase extends ESTestCase {
 
         if (randomBoolean()) {
             // keep this low so we don't stall tests
-            builder.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), RandomInts.randomIntBetween(random, 1, 15) + "ms");
+            builder.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 1, 15) + "ms");
         }
 
         return builder;
@@ -446,8 +446,8 @@ public abstract class ESIntegTestCase extends ESTestCase {
         }
         switch (random.nextInt(4)) {
             case 3:
-                final int maxThreadCount = RandomInts.randomIntBetween(random, 1, 4);
-                final int maxMergeCount = RandomInts.randomIntBetween(random, maxThreadCount, maxThreadCount + 4);
+                final int maxThreadCount = RandomNumbers.randomIntBetween(random, 1, 4);
+                final int maxMergeCount = RandomNumbers.randomIntBetween(random, maxThreadCount, maxThreadCount + 4);
                 builder.put(MergeSchedulerConfig.MAX_MERGE_COUNT_SETTING.getKey(), maxMergeCount);
                 builder.put(MergeSchedulerConfig.MAX_THREAD_COUNT_SETTING.getKey(), maxThreadCount);
                 break;
@@ -458,7 +458,7 @@ public abstract class ESIntegTestCase extends ESTestCase {
 
     private static Settings.Builder setRandomIndexTranslogSettings(Random random, Settings.Builder builder) {
         if (random.nextBoolean()) {
-            builder.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 300), ByteSizeUnit.MB));
+            builder.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 1, 300), ByteSizeUnit.MB));
         }
         if (random.nextBoolean()) {
             builder.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), new ByteSizeValue(1, ByteSizeUnit.PB)); // just don't flush
@@ -468,14 +468,14 @@ public abstract class ESIntegTestCase extends ESTestCase {
         }
 
         if (random.nextBoolean()) {
-            builder.put(IndexSettings.INDEX_TRANSLOG_SYNC_INTERVAL_SETTING.getKey(), RandomInts.randomIntBetween(random, 100, 5000), TimeUnit.MILLISECONDS);
+            builder.put(IndexSettings.INDEX_TRANSLOG_SYNC_INTERVAL_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 100, 5000), TimeUnit.MILLISECONDS);
         }
 
         return builder;
     }
 
     private TestCluster buildWithPrivateContext(final Scope scope, final long seed) throws Exception {
-        return RandomizedContext.current().runWithPrivateRandomness(new com.carrotsearch.randomizedtesting.Randomness(seed), new Callable<TestCluster>() {
+        return RandomizedContext.current().runWithPrivateRandomness(seed, new Callable<TestCluster>() {
             @Override
             public TestCluster call() throws Exception {
                 return buildTestCluster(scope, seed);

+ 2 - 2
test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java

@@ -25,7 +25,7 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
 import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope;
 import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
 import com.carrotsearch.randomizedtesting.generators.CodepointSetGenerator;
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
 import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 import com.carrotsearch.randomizedtesting.rules.TestRuleAdapter;
@@ -288,7 +288,7 @@ public abstract class ESTestCase extends LuceneTestCase {
      * @see #scaledRandomIntBetween(int, int)
      */
     public static int randomIntBetween(int min, int max) {
-        return RandomInts.randomIntBetween(random(), min, max);
+        return RandomNumbers.randomIntBetween(random(), min, max);
     }
 
     /**

+ 16 - 16
test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java

@@ -21,7 +21,7 @@ package org.elasticsearch.test;
 import com.carrotsearch.randomizedtesting.RandomizedTest;
 import com.carrotsearch.randomizedtesting.SeedUtils;
 import com.carrotsearch.randomizedtesting.SysGlobals;
-import com.carrotsearch.randomizedtesting.generators.RandomInts;
+import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
 import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 import org.apache.logging.log4j.Logger;
@@ -249,7 +249,7 @@ public final class InternalTestCluster extends TestCluster {
 
         boolean useDedicatedMasterNodes = randomlyAddDedicatedMasters ? random.nextBoolean() : false;
 
-        this.numSharedDataNodes = RandomInts.randomIntBetween(random, minNumDataNodes, maxNumDataNodes);
+        this.numSharedDataNodes = RandomNumbers.randomIntBetween(random, minNumDataNodes, maxNumDataNodes);
         assert this.numSharedDataNodes >= 0;
 
         if (numSharedDataNodes == 0) {
@@ -267,7 +267,7 @@ public final class InternalTestCluster extends TestCluster {
                 this.numSharedDedicatedMasterNodes = 0;
             }
             if (numClientNodes < 0) {
-                this.numSharedCoordOnlyNodes = RandomInts.randomIntBetween(random, DEFAULT_MIN_NUM_CLIENT_NODES, DEFAULT_MAX_NUM_CLIENT_NODES);
+                this.numSharedCoordOnlyNodes = RandomNumbers.randomIntBetween(random, DEFAULT_MIN_NUM_CLIENT_NODES, DEFAULT_MAX_NUM_CLIENT_NODES);
             } else {
                 this.numSharedCoordOnlyNodes = numClientNodes;
             }
@@ -321,14 +321,14 @@ public final class InternalTestCluster extends TestCluster {
         // Some tests make use of scripting quite a bit, so increase the limit for integration tests
         builder.put(ScriptService.SCRIPT_MAX_COMPILATIONS_PER_MINUTE.getKey(), 1000);
         if (TEST_NIGHTLY) {
-            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 5, 10));
-            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 5, 10));
+            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 5, 10));
+            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 5, 10));
         } else if (random.nextInt(100) <= 90) {
-            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5));
-            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5));
+            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 2, 5));
+            builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 2, 5));
         }
         // always reduce this - it can make tests really slow
-        builder.put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING.getKey(), TimeValue.timeValueMillis(RandomInts.randomIntBetween(random, 20, 50)));
+        builder.put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING.getKey(), TimeValue.timeValueMillis(RandomNumbers.randomIntBetween(random, 20, 50)));
         defaultSettings = builder.build();
         executor = EsExecutors.newScaling("test runner", 0, Integer.MAX_VALUE, 0, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory("test_" + clusterName), new ThreadContext(Settings.EMPTY));
     }
@@ -396,7 +396,7 @@ public final class InternalTestCluster extends TestCluster {
         }
 
         if (random.nextBoolean()) {
-            builder.put(MappingUpdatedAction.INDICES_MAPPING_DYNAMIC_TIMEOUT_SETTING.getKey(), new TimeValue(RandomInts.randomIntBetween(random, 10, 30), TimeUnit.SECONDS));
+            builder.put(MappingUpdatedAction.INDICES_MAPPING_DYNAMIC_TIMEOUT_SETTING.getKey(), new TimeValue(RandomNumbers.randomIntBetween(random, 10, 30), TimeUnit.SECONDS));
         }
 
         if (random.nextInt(10) == 0) {
@@ -406,9 +406,9 @@ public final class InternalTestCluster extends TestCluster {
 
         if (random.nextBoolean()) {
             if (random.nextInt(10) == 0) { // do something crazy slow here
-                builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
+                builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
             } else {
-                builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
+                builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
             }
         }
         if (random.nextBoolean()) {
@@ -417,21 +417,21 @@ public final class InternalTestCluster extends TestCluster {
 
         if (random.nextBoolean()) {
             if (random.nextInt(10) == 0) { // do something crazy slow here
-                builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
+                builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
             } else {
-                builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
+                builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
             }
         }
 
         if (random.nextBoolean()) {
-            builder.put(TcpTransport.PING_SCHEDULE.getKey(), RandomInts.randomIntBetween(random, 100, 2000) + "ms");
+            builder.put(TcpTransport.PING_SCHEDULE.getKey(), RandomNumbers.randomIntBetween(random, 100, 2000) + "ms");
         }
 
         if (random.nextBoolean()) {
-            builder.put(ScriptService.SCRIPT_CACHE_SIZE_SETTING.getKey(), RandomInts.randomIntBetween(random, 0, 2000));
+            builder.put(ScriptService.SCRIPT_CACHE_SIZE_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 0, 2000));
         }
         if (random.nextBoolean()) {
-            builder.put(ScriptService.SCRIPT_CACHE_EXPIRE_SETTING.getKey(), TimeValue.timeValueMillis(RandomInts.randomIntBetween(random, 750, 10000000)).getStringRep());
+            builder.put(ScriptService.SCRIPT_CACHE_EXPIRE_SETTING.getKey(), TimeValue.timeValueMillis(RandomNumbers.randomIntBetween(random, 750, 10000000)).getStringRep());
         }
 
         return builder.build();