diff --git a/TESTING.asciidoc b/TESTING.asciidoc index 06a3a3f7552..c65cd30407e 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -260,10 +260,10 @@ To run all verification tasks, including static checks, unit tests, and integrat --------------------------------------------------------------------------- Note that this will also run the unit tests and precommit tasks first. If you want to just -run the integration tests (because you are debugging them): +run the in memory cluster integration tests (because you are debugging them): --------------------------------------------------------------------------- -./gradlew integTest +./gradlew internalClusterTest --------------------------------------------------------------------------- If you want to just run the precommit checks: diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy index 7705e6c125f..d1e544fbd5c 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy @@ -165,8 +165,7 @@ class PrecommitTasks { } SourceSet sourceSet = project.sourceSets.getByName(sourceSetName) - FileCollection runtime = sourceSet.runtimeClasspath - classpath = runtime.plus(sourceSet.compileClasspath) + classpath = project.files { sourceSet.runtimeClasspath.plus(sourceSet.compileClasspath) } targetCompatibility = BuildParams.runtimeJavaVersion.majorVersion if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_13) { diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java b/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java index 3657808b919..3609907afe0 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/TestingConventionsTasks.java @@ -20,6 +20,7 @@ package org.elasticsearch.gradle.precommit; import groovy.lang.Closure; import org.elasticsearch.gradle.util.GradleUtils; +import org.elasticsearch.gradle.util.Util; import org.gradle.api.DefaultTask; import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.Task; @@ -46,9 +47,12 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.nio.file.attribute.BasicFileAttributes; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -62,6 +66,8 @@ public class TestingConventionsTasks extends DefaultTask { private final NamedDomainObjectContainer naming; + private List tasks = null; + public TestingConventionsTasks() { setDescription("Tests various testing conventions"); // Run only after everything is compiled @@ -74,6 +80,7 @@ public class TestingConventionsTasks extends DefaultTask { return getProject().getTasks() .withType(Test.class) .stream() + .filter(t -> tasks == null || tasks.contains(t.getName())) .filter(Task::getEnabled) .collect(Collectors.toMap(Task::getPath, task -> task.getCandidateClassFiles().getFiles())); } @@ -81,8 +88,8 @@ public class TestingConventionsTasks extends DefaultTask { @Input public Map getTestClassNames() { if (testClassNames == null) { - testClassNames = GradleUtils.getJavaSourceSets(getProject()) - .getByName("test") + testClassNames = Util.getJavaTestSourceSet(getProject()) + .get() .getOutput() .getClassesDirs() .getFiles() @@ -108,6 +115,10 @@ public class TestingConventionsTasks extends DefaultTask { naming.configure(action); } + public void setTasks(String... tasks) { + this.tasks = Arrays.asList(tasks); + } + @Input public Set getMainClassNamedLikeTests() { SourceSetContainer javaSourceSets = GradleUtils.getJavaSourceSets(getProject()); @@ -319,6 +330,7 @@ public class TestingConventionsTasks extends DefaultTask { } private boolean implementsNamingConvention(Class clazz) { + Objects.requireNonNull(clazz); return implementsNamingConvention(clazz.getName()); } @@ -349,13 +361,7 @@ public class TestingConventionsTasks extends DefaultTask { // the classes these don't influence the checks done by this task. // A side effect is that we could mark as up-to-date with missing dependencies, but these will be found when // running the tests. - return getProject().files( - getProject().getConfigurations().getByName("testRuntime").resolve(), - GradleUtils.getJavaSourceSets(getProject()) - .stream() - .flatMap(sourceSet -> sourceSet.getOutput().getClassesDirs().getFiles().stream()) - .collect(Collectors.toList()) - ); + return Util.getJavaTestSourceSet(getProject()).get().getRuntimeClasspath(); } private Map walkPathAndLoadClasses(File testRoot) { diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/test/InternalClusterTestPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/test/InternalClusterTestPlugin.java new file mode 100644 index 00000000000..98b3eaa933f --- /dev/null +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/test/InternalClusterTestPlugin.java @@ -0,0 +1,41 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.elasticsearch.gradle.test; + +import org.elasticsearch.gradle.util.GradleUtils; +import org.gradle.api.Plugin; +import org.gradle.api.Project; +import org.gradle.api.tasks.SourceSet; + +public class InternalClusterTestPlugin implements Plugin { + + public static final String SOURCE_SET_NAME = "internalClusterTest"; + + @Override + public void apply(Project project) { + GradleUtils.addTestSourceSet(project, SOURCE_SET_NAME); + + // TODO: fix usages of IT tests depending on Tests methods so this extension is not necessary + GradleUtils.extendSourceSet(project, SourceSet.TEST_SOURCE_SET_NAME, SOURCE_SET_NAME); + + // add alias task that is easier to type + project.getTasks().register("icTest").configure(alias -> alias.dependsOn(SOURCE_SET_NAME)); + } +} diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java b/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java index 81de7ea8176..21dfe3120d1 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java @@ -18,6 +18,7 @@ */ package org.elasticsearch.gradle.util; +import org.elasticsearch.gradle.ElasticsearchJavaPlugin; import org.gradle.api.Action; import org.gradle.api.GradleException; import org.gradle.api.NamedDomainObjectContainer; @@ -25,16 +26,26 @@ import org.gradle.api.PolymorphicDomainObjectContainer; import org.gradle.api.Project; import org.gradle.api.Task; import org.gradle.api.UnknownTaskException; +import org.gradle.api.artifacts.Configuration; +import org.gradle.api.plugins.JavaBasePlugin; import org.gradle.api.plugins.JavaPluginConvention; import org.gradle.api.provider.Provider; import org.gradle.api.services.BuildService; import org.gradle.api.services.BuildServiceRegistration; import org.gradle.api.services.BuildServiceRegistry; +import org.gradle.api.tasks.SourceSet; import org.gradle.api.tasks.SourceSetContainer; import org.gradle.api.tasks.TaskContainer; import org.gradle.api.tasks.TaskProvider; +import org.gradle.api.tasks.testing.Test; +import org.gradle.plugins.ide.eclipse.model.EclipseModel; +import org.gradle.plugins.ide.idea.model.IdeaModel; +import java.util.Arrays; +import java.util.List; +import java.util.Map; import java.util.Optional; +import java.util.function.Function; public abstract class GradleUtils { @@ -120,4 +131,79 @@ public abstract class GradleUtils { return (Provider) registration.getService(); } + + /** + * Add a source set and task of the same name that runs tests. + * + * IDEs are also configured if setup, and the test task is added to check. The new test source + * set extends from the normal test source set to allow sharing of utilities. + * + * @return A task provider for the newly created test task + */ + public static TaskProvider addTestSourceSet(Project project, String sourceSetName) { + project.getPluginManager().apply(ElasticsearchJavaPlugin.class); + + // create our test source set and task + SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); + SourceSet testSourceSet = sourceSets.create(sourceSetName); + TaskProvider testTask = project.getTasks().register(sourceSetName, Test.class); + testTask.configure(task -> { + task.setGroup(JavaBasePlugin.VERIFICATION_GROUP); + task.setTestClassesDirs(testSourceSet.getOutput().getClassesDirs()); + task.setClasspath(testSourceSet.getRuntimeClasspath()); + }); + + Configuration testCompileConfig = project.getConfigurations().getByName(testSourceSet.getCompileClasspathConfigurationName()); + Configuration testRuntimeConfig = project.getConfigurations().getByName(testSourceSet.getRuntimeClasspathConfigurationName()); + testSourceSet.setCompileClasspath(testCompileConfig); + testSourceSet.setRuntimeClasspath(project.getObjects().fileCollection().from(testSourceSet.getOutput(), testRuntimeConfig)); + + extendSourceSet(project, SourceSet.MAIN_SOURCE_SET_NAME, sourceSetName); + + // setup IDEs + String runtimeClasspathName = testSourceSet.getRuntimeClasspathConfigurationName(); + Configuration runtimeClasspathConfiguration = project.getConfigurations().getByName(runtimeClasspathName); + project.getPluginManager().withPlugin("idea", p -> { + IdeaModel idea = project.getExtensions().getByType(IdeaModel.class); + idea.getModule().setTestSourceDirs(testSourceSet.getJava().getSrcDirs()); + idea.getModule().getScopes().put("TEST", Map.of("plus", List.of(runtimeClasspathConfiguration))); + }); + project.getPluginManager().withPlugin("eclipse", p -> { + EclipseModel eclipse = project.getExtensions().getByType(EclipseModel.class); + eclipse.getClasspath().setSourceSets(List.of(testSourceSet)); + eclipse.getClasspath().getPlusConfigurations().add(runtimeClasspathConfiguration); + }); + + // add to the check task + project.getTasks().named(JavaBasePlugin.CHECK_TASK_NAME).configure(check -> check.dependsOn(testTask)); + + return testTask; + } + + /** + * Extend the configurations of one source set from another. + */ + public static void extendSourceSet(Project project, String parentSourceSetName, String childSourceSetName) { + final List> configNameFunctions = Arrays.asList( + SourceSet::getCompileConfigurationName, + SourceSet::getImplementationConfigurationName, + SourceSet::getRuntimeConfigurationName, + SourceSet::getRuntimeOnlyConfigurationName + ); + SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); + SourceSet parent = sourceSets.getByName(parentSourceSetName); + SourceSet child = sourceSets.getByName(childSourceSetName); + + for (Function configNameFunction : configNameFunctions) { + String parentConfigName = configNameFunction.apply(parent); + String childConfigName = configNameFunction.apply(child); + Configuration parentConfig = project.getConfigurations().getByName(parentConfigName); + Configuration childConfig = project.getConfigurations().getByName(childConfigName); + childConfig.extendsFrom(parentConfig); + } + + // tie this new test source set to the main and test source sets + child.setCompileClasspath(project.getObjects().fileCollection().from(child.getCompileClasspath(), parent.getOutput())); + child.setRuntimeClasspath(project.getObjects().fileCollection().from(child.getRuntimeClasspath(), parent.getOutput())); + } } diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-cluster-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-cluster-test.properties new file mode 100644 index 00000000000..dc521b0b81b --- /dev/null +++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-cluster-test.properties @@ -0,0 +1,20 @@ +# +# Licensed to Elasticsearch under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +implementation-class=org.elasticsearch.gradle.test.InternalClusterTestPlugin diff --git a/docs/java-api/index.asciidoc b/docs/java-api/index.asciidoc index 4a7fd7482d2..4f947cbfd5b 100644 --- a/docs/java-api/index.asciidoc +++ b/docs/java-api/index.asciidoc @@ -131,7 +131,7 @@ and add it as a dependency. As an example, we will use the `slf4j-simple` logger -------------------------------------------------- -:client-tests: {docdir}/../../server/src/test/java/org/elasticsearch/client/documentation +:client-tests: {docdir}/../../server/src/internalClusterTest/java/org/elasticsearch/client/documentation :hlrc-tests: {docdir}/../../client/rest-high-level/src/test/java/org/elasticsearch/client :client-reindex-tests: {docdir}/../../modules/reindex/src/test/java/org/elasticsearch/client/documentation diff --git a/server/build.gradle b/server/build.gradle index 239cb3af964..5df6e1edc5d 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -22,6 +22,7 @@ import org.elasticsearch.gradle.info.BuildParams apply plugin: 'elasticsearch.build' apply plugin: 'nebula.optional-base' apply plugin: 'nebula.maven-base-publish' +apply plugin: 'elasticsearch.internal-cluster-test' publishing { publications { @@ -130,10 +131,14 @@ dependencies { // tests use the locally compiled version of server exclude group: 'org.elasticsearch', module: 'server' } + internalClusterTestCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'server' + } } compileJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked" compileTestJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked" +compileInternalClusterTestJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked" // Until this project is always being formatted with spotless, we need to // guard against `spotless()` not existing. @@ -170,6 +175,7 @@ testingConventions { baseClass "org.elasticsearch.test.ESSingleNodeTestCase" } } + tasks = ['test'] } task generateModulesList { @@ -328,20 +334,12 @@ dependencyLicenses { } -task integTest(type: Test) { - description = 'Multi-node tests' - mustRunAfter test - - include '**/*IT.class' +tasks.named('internalClusterTest').configure { if (org.elasticsearch.gradle.info.BuildParams.isSnapshotBuild() == false) { systemProperty 'es.datastreams_feature_enabled', 'true' } } -check.dependsOn integTest - -task internalClusterTest { - dependsOn integTest +licenseHeaders { + excludes << 'org/elasticsearch/client/documentation/placeholder.txt' } - - diff --git a/server/src/test/java/org/elasticsearch/action/IndicesRequestIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/IndicesRequestIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/IndicesRequestIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/IndicesRequestIT.java diff --git a/server/src/test/java/org/elasticsearch/action/ListenerActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/ListenerActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/ListenerActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/ListenerActionIT.java diff --git a/server/src/test/java/org/elasticsearch/action/RejectionActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/RejectionActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/RejectionActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/RejectionActionIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/HotThreadsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/HotThreadsIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/alias/ValidateIndiesAliasesRequestIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java similarity index 98% rename from server/src/test/java/org/elasticsearch/action/admin/indices/alias/ValidateIndiesAliasesRequestIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java index 86ac4ec09a6..06cfcb343eb 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/alias/ValidateIndiesAliasesRequestIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java @@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.hasToString; -public class ValidateIndiesAliasesRequestIT extends ESSingleNodeTestCase { +public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase { public static class IndicesAliasesPlugin extends Plugin implements ActionPlugin { diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorIT.java diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkRejectionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkRejectionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/bulk/BulkRejectionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkRejectionIT.java diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java diff --git a/server/src/test/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java diff --git a/server/src/test/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java diff --git a/server/src/test/java/org/elasticsearch/action/search/TransportSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/search/TransportSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java diff --git a/server/src/test/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java diff --git a/server/src/test/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java diff --git a/server/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java diff --git a/server/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java diff --git a/server/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java diff --git a/server/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/blocks/SimpleBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/blocks/SimpleBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/broadcast/BroadcastActionsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/broadcast/BroadcastActionsIT.java diff --git a/server/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java diff --git a/server/src/test/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java diff --git a/server/src/test/java/org/elasticsearch/client/node/NodeClientIT.java b/server/src/internalClusterTest/java/org/elasticsearch/client/node/NodeClientIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/client/node/NodeClientIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/client/node/NodeClientIT.java diff --git a/server/src/test/java/org/elasticsearch/client/transport/NodeDisconnectIT.java b/server/src/internalClusterTest/java/org/elasticsearch/client/transport/NodeDisconnectIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/client/transport/NodeDisconnectIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/client/transport/NodeDisconnectIT.java diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java b/server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientIT.java diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientRetryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientRetryIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterHealthIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterHealthIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateDiffIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateDiffIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterStateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/ClusterStateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleClusterStateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleClusterStateIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleDataNodesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleDataNodesIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/Zen1IT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/Zen1IT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/Zen1IT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/Zen1IT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/AllocationIdIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/AllocationIdIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/routing/AllocationIdIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/AllocationIdIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/service/ClusterServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/service/ClusterServiceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java diff --git a/server/src/test/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java similarity index 86% rename from server/src/test/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java index 1a2bd28f5f3..890b3088913 100644 --- a/server/src/test/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java @@ -45,7 +45,6 @@ import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.lessThanOrEqualTo; @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) public class ClusterShardLimitIT extends ESIntegTestCase { @@ -110,7 +109,7 @@ public class ClusterShardLimitIT extends ESIntegTestCase { setShardsPerNode(counts.getShardsPerNode()); - if (counts.firstIndexShards > 0) { + if (counts.getFirstIndexShards() > 0) { createIndex( "test", Settings.builder() @@ -367,68 +366,4 @@ public class ClusterShardLimitIT extends ESIntegTestCase { assertEquals(expectedError, e.getMessage()); } - public static class ShardCounts { - private final int shardsPerNode; - - private final int firstIndexShards; - private final int firstIndexReplicas; - - private final int failingIndexShards; - private final int failingIndexReplicas; - - private ShardCounts(int shardsPerNode, - int firstIndexShards, - int firstIndexReplicas, - int failingIndexShards, - int failingIndexReplicas) { - this.shardsPerNode = shardsPerNode; - this.firstIndexShards = firstIndexShards; - this.firstIndexReplicas = firstIndexReplicas; - this.failingIndexShards = failingIndexShards; - this.failingIndexReplicas = failingIndexReplicas; - } - - public static ShardCounts forDataNodeCount(int dataNodes) { - assertThat("this method will not work reliably with this many data nodes due to the limit of shards in a single index," + - "use fewer data nodes or multiple indices", dataNodes, lessThanOrEqualTo(90)); - int mainIndexReplicas = between(0, dataNodes - 1); - int mainIndexShards = between(1, 10); - int totalShardsInIndex = (mainIndexReplicas + 1) * mainIndexShards; - // Sometimes add some headroom to the limit to check that it works even if you're not already right up against the limit - int shardsPerNode = (int) Math.ceil((double) totalShardsInIndex / dataNodes) + between(0, 10); - int totalCap = shardsPerNode * dataNodes; - - int failingIndexShards; - int failingIndexReplicas; - if (dataNodes > 1 && frequently()) { - failingIndexShards = Math.max(1, totalCap - totalShardsInIndex); - failingIndexReplicas = between(1, dataNodes - 1); - } else { - failingIndexShards = totalCap - totalShardsInIndex + between(1, 10); - failingIndexReplicas = 0; - } - - return new ShardCounts(shardsPerNode, mainIndexShards, mainIndexReplicas, failingIndexShards, failingIndexReplicas); - } - - public int getShardsPerNode() { - return shardsPerNode; - } - - public int getFirstIndexShards() { - return firstIndexShards; - } - - public int getFirstIndexReplicas() { - return firstIndexReplicas; - } - - public int getFailingIndexShards() { - return failingIndexShards; - } - - public int getFailingIndexReplicas() { - return failingIndexReplicas; - } - } } diff --git a/server/src/test/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/ClusterDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/ClusterDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/DiskDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/DiskDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/DiskDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/DiskDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/MasterDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/MasterDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/MasterDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/MasterDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java diff --git a/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java diff --git a/server/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java diff --git a/server/src/test/java/org/elasticsearch/document/DocumentActionsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/document/DocumentActionsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/document/DocumentActionsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/document/DocumentActionsIT.java diff --git a/server/src/test/java/org/elasticsearch/document/ShardInfoIT.java b/server/src/internalClusterTest/java/org/elasticsearch/document/ShardInfoIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/document/ShardInfoIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/document/ShardInfoIT.java diff --git a/server/src/test/java/org/elasticsearch/env/NodeEnvironmentIT.java b/server/src/internalClusterTest/java/org/elasticsearch/env/NodeEnvironmentIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/env/NodeEnvironmentIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/env/NodeEnvironmentIT.java diff --git a/server/src/test/java/org/elasticsearch/env/NodeRepurposeCommandIT.java b/server/src/internalClusterTest/java/org/elasticsearch/env/NodeRepurposeCommandIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/env/NodeRepurposeCommandIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/env/NodeRepurposeCommandIT.java diff --git a/server/src/test/java/org/elasticsearch/explain/ExplainActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/explain/ExplainActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/explain/ExplainActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/explain/ExplainActionIT.java diff --git a/server/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/GatewayIndexStateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/gateway/GatewayIndexStateIT.java diff --git a/server/src/test/java/org/elasticsearch/gateway/MetadataWriteDataNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/MetadataNodesIT.java similarity index 99% rename from server/src/test/java/org/elasticsearch/gateway/MetadataWriteDataNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/gateway/MetadataNodesIT.java index 33780340cdc..199691fab11 100644 --- a/server/src/test/java/org/elasticsearch/gateway/MetadataWriteDataNodesIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/gateway/MetadataNodesIT.java @@ -44,7 +44,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class MetadataWriteDataNodesIT extends ESIntegTestCase { +public class MetadataNodesIT extends ESIntegTestCase { public void testMetaWrittenAlsoOnDataNode() throws Exception { // this test checks that index state is written on data only nodes if they have a shard allocated String masterNode = internalCluster().startMasterOnlyNode(Settings.EMPTY); diff --git a/server/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/QuorumGatewayIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/gateway/QuorumGatewayIT.java diff --git a/server/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java diff --git a/server/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java diff --git a/server/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java b/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java diff --git a/server/src/test/java/org/elasticsearch/get/GetActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/get/GetActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java diff --git a/server/src/test/java/org/elasticsearch/get/LegacyGetActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/get/LegacyGetActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/get/LegacyGetActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/get/LegacyGetActionIT.java diff --git a/server/src/test/java/org/elasticsearch/index/FinalPipelineIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/FinalPipelineIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java diff --git a/server/src/test/java/org/elasticsearch/index/HiddenIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/HiddenIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/HiddenIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/HiddenIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/IndexRequestBuilderIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/IndexRequestBuilderIT.java diff --git a/server/src/test/java/org/elasticsearch/index/IndexSortIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/IndexSortIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/IndexSortIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/IndexSortIT.java diff --git a/server/src/test/java/org/elasticsearch/index/SettingsListenerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/SettingsListenerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/SettingsListenerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/SettingsListenerIT.java diff --git a/server/src/test/java/org/elasticsearch/index/WaitUntilRefreshIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/WaitUntilRefreshIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java diff --git a/server/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java diff --git a/server/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java diff --git a/server/src/test/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/DynamicMappingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/mapper/DynamicMappingIT.java diff --git a/server/src/test/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java diff --git a/server/src/test/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java diff --git a/server/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java diff --git a/server/src/test/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java diff --git a/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java diff --git a/server/src/test/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java diff --git a/server/src/test/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java diff --git a/server/src/test/java/org/elasticsearch/index/shard/SearchIdleIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/shard/SearchIdleIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/shard/SearchIdleIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/shard/SearchIdleIT.java diff --git a/server/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedFileIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedFileIT.java diff --git a/server/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedTranslogIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedTranslogIT.java diff --git a/server/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/store/ExceptionRetryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/store/ExceptionRetryIT.java diff --git a/server/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java diff --git a/server/src/test/java/org/elasticsearch/indexing/IndexActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indexing/IndexActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indexing/IndexActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indexing/IndexActionIT.java diff --git a/server/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/DataStreamIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/DataStreamIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/DataStreamIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/DataStreamIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesRequestCacheIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesRequestCacheIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/IndicesRequestCacheIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesRequestCacheIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/flush/FlushIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/flush/FlushIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/flush/FlushIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/flush/FlushIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/settings/InternalSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/InternalSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/settings/InternalSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/settings/InternalSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/state/CloseIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/state/CloseIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/stats/IndexStatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/stats/IndexStatsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java diff --git a/server/src/test/java/org/elasticsearch/indices/template/TemplatePreferenceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/template/TemplatePreferenceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/indices/template/TemplatePreferenceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/indices/template/TemplatePreferenceIT.java diff --git a/server/src/test/java/org/elasticsearch/ingest/IngestClientIT.java b/server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestClientIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/ingest/IngestClientIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestClientIT.java diff --git a/server/src/test/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java diff --git a/server/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java b/server/src/internalClusterTest/java/org/elasticsearch/mget/SimpleMgetIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/mget/SimpleMgetIT.java diff --git a/server/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java b/server/src/internalClusterTest/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java diff --git a/server/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java diff --git a/server/src/test/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java b/server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java diff --git a/server/src/test/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java b/server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java diff --git a/server/src/test/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java b/server/src/internalClusterTest/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java diff --git a/server/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java b/server/src/internalClusterTest/java/org/elasticsearch/recovery/FullRollingRestartIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/recovery/FullRollingRestartIT.java diff --git a/server/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java b/server/src/internalClusterTest/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java diff --git a/server/src/test/java/org/elasticsearch/recovery/RelocationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/recovery/RelocationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/recovery/RelocationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/recovery/RelocationIT.java diff --git a/server/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/recovery/SimpleRecoveryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/recovery/SimpleRecoveryIT.java diff --git a/server/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java diff --git a/server/src/test/java/org/elasticsearch/repositories/RepositoriesServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/repositories/RepositoriesServiceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/repositories/RepositoriesServiceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/repositories/RepositoriesServiceIT.java diff --git a/server/src/test/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java b/server/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java diff --git a/server/src/test/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java diff --git a/server/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/routing/AliasResolveRoutingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/routing/AliasResolveRoutingIT.java diff --git a/server/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/routing/AliasRoutingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/routing/AliasRoutingIT.java diff --git a/server/src/test/java/org/elasticsearch/routing/PartitionedRoutingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/routing/PartitionedRoutingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/routing/PartitionedRoutingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/routing/PartitionedRoutingIT.java diff --git a/server/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java diff --git a/server/src/test/java/org/elasticsearch/script/StoredScriptsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/script/StoredScriptsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/script/StoredScriptsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/script/StoredScriptsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/SearchCancellationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/SearchCancellationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/SearchCancellationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/SearchCancellationIT.java diff --git a/server/src/test/java/org/elasticsearch/search/SearchTimeoutIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/SearchTimeoutIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/SearchTimeoutIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/SearchTimeoutIT.java diff --git a/server/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/SearchWithRejectionsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/SearchWithRejectionsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/StressSearchServiceReaperIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/StressSearchServiceReaperIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/CombiIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/CombiIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/EquivalenceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/EquivalenceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/MetadataIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MetadataIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/MetadataIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MetadataIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MissingValueIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MissingValueIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/SumIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/SumIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java diff --git a/server/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java diff --git a/server/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java diff --git a/server/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoDistanceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoDistanceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoFilterIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoFilterIT.java diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoPolygonIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoPolygonIT.java diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java diff --git a/server/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java diff --git a/server/src/test/java/org/elasticsearch/search/msearch/MultiSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/msearch/MultiSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/nested/SimpleNestedIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/nested/SimpleNestedIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/nested/SimpleNestedIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/nested/SimpleNestedIT.java diff --git a/server/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java diff --git a/server/src/test/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java diff --git a/server/src/test/java/org/elasticsearch/search/query/ExistsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/ExistsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/query/ExistsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/query/ExistsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/MultiMatchQueryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/query/MultiMatchQueryIT.java diff --git a/server/src/test/java/org/elasticsearch/search/query/QueryStringIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/QueryStringIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/query/QueryStringIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/query/QueryStringIT.java diff --git a/server/src/test/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java diff --git a/server/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java diff --git a/server/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/query/SimpleQueryStringIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/query/SimpleQueryStringIT.java diff --git a/server/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/DuelScrollIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/scroll/DuelScrollIT.java diff --git a/server/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java diff --git a/server/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java diff --git a/server/src/test/java/org/elasticsearch/search/searchafter/SearchAfterIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/searchafter/SearchAfterIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/searchafter/SearchAfterIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/searchafter/SearchAfterIT.java diff --git a/server/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/slice/SearchSliceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/slice/SearchSliceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/slice/SearchSliceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/slice/SearchSliceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/sort/FieldSortIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/sort/FieldSortIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java diff --git a/server/src/test/java/org/elasticsearch/search/sort/GeoDistanceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/sort/GeoDistanceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceIT.java diff --git a/server/src/test/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java diff --git a/server/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/sort/SimpleSortIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/sort/SimpleSortIT.java diff --git a/server/src/test/java/org/elasticsearch/search/source/MetadataFetchingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/source/MetadataFetchingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/source/MetadataFetchingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/source/MetadataFetchingIT.java diff --git a/server/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/source/SourceFetchingIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/source/SourceFetchingIT.java diff --git a/server/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/stats/SearchStatsIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/stats/SearchStatsIT.java diff --git a/server/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/SuggestSearchIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/search/suggest/SuggestSearchIT.java diff --git a/server/src/test/java/org/elasticsearch/similarity/SimilarityIT.java b/server/src/internalClusterTest/java/org/elasticsearch/similarity/SimilarityIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/similarity/SimilarityIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/similarity/SimilarityIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/MinThreadsSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MinThreadsSnapshotRestoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/MinThreadsSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/MinThreadsSnapshotRestoreIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoriesIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoriesIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java diff --git a/server/src/test/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java diff --git a/server/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java b/server/src/internalClusterTest/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java diff --git a/server/src/test/java/org/elasticsearch/update/UpdateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/update/UpdateIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java diff --git a/server/src/test/java/org/elasticsearch/update/UpdateNoopIT.java b/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateNoopIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/update/UpdateNoopIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/update/UpdateNoopIT.java diff --git a/server/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/validate/SimpleValidateQueryIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/validate/SimpleValidateQueryIT.java diff --git a/server/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java b/server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java diff --git a/server/src/test/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java b/server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java diff --git a/server/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java b/server/src/internalClusterTest/java/org/elasticsearch/versioning/SimpleVersioningIT.java similarity index 100% rename from server/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/versioning/SimpleVersioningIT.java diff --git a/server/src/internalClusterTest/java/org/elasticsearch/client/documentation/placeholder.txt b/server/src/test/java/org/elasticsearch/client/documentation/placeholder.txt similarity index 100% rename from server/src/internalClusterTest/java/org/elasticsearch/client/documentation/placeholder.txt rename to server/src/test/java/org/elasticsearch/client/documentation/placeholder.txt diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java index 14f8c851aaa..d593fae231c 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java @@ -39,7 +39,7 @@ import org.elasticsearch.cluster.routing.allocation.AllocationService; import org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders; import org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider; -import org.elasticsearch.cluster.shards.ClusterShardLimitIT; +import org.elasticsearch.cluster.shards.ShardCounts; import org.elasticsearch.common.Strings; import org.elasticsearch.common.ValidationException; import org.elasticsearch.common.collect.ImmutableOpenMap; @@ -106,7 +106,7 @@ import static org.elasticsearch.cluster.metadata.MetadataCreateIndexService.clus import static org.elasticsearch.cluster.metadata.MetadataCreateIndexService.getIndexNumberOfRoutingShards; import static org.elasticsearch.cluster.metadata.MetadataCreateIndexService.parseV1Mappings; import static org.elasticsearch.cluster.metadata.MetadataCreateIndexService.resolveAndValidateAliases; -import static org.elasticsearch.cluster.shards.ClusterShardLimitIT.ShardCounts.forDataNodeCount; +import static org.elasticsearch.cluster.shards.ShardCounts.forDataNodeCount; import static org.elasticsearch.index.IndexSettings.INDEX_SOFT_DELETES_SETTING; import static org.elasticsearch.indices.IndicesServiceTests.createClusterForShardLimitTest; import static org.hamcrest.Matchers.containsString; @@ -560,7 +560,7 @@ public class MetadataCreateIndexServiceTests extends ESTestCase { public void testShardLimit() { int nodesInCluster = randomIntBetween(2,90); - ClusterShardLimitIT.ShardCounts counts = forDataNodeCount(nodesInCluster); + ShardCounts counts = forDataNodeCount(nodesInCluster); Settings clusterSettings = Settings.builder() .put(Metadata.SETTING_CLUSTER_MAX_SHARDS_PER_NODE.getKey(), counts.getShardsPerNode()) .build(); diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java index ce87b796970..a1bcd0ce85e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java @@ -37,7 +37,7 @@ import org.elasticsearch.cluster.routing.RoutingTable; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.shards.ClusterShardLimitIT; +import org.elasticsearch.cluster.shards.ShardCounts; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ValidationException; import org.elasticsearch.common.collect.ImmutableOpenMap; @@ -72,7 +72,7 @@ import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_VERSION_C import static org.elasticsearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK; import static org.elasticsearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID; import static org.elasticsearch.cluster.routing.TestShardRouting.newShardRouting; -import static org.elasticsearch.cluster.shards.ClusterShardLimitIT.ShardCounts.forDataNodeCount; +import static org.elasticsearch.cluster.shards.ShardCounts.forDataNodeCount; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -334,8 +334,8 @@ public class MetadataIndexStateServiceTests extends ESTestCase { } public void testValidateShardLimit() { - int nodesInCluster = randomIntBetween(2,90); - ClusterShardLimitIT.ShardCounts counts = forDataNodeCount(nodesInCluster); + int nodesInCluster = randomIntBetween(2, 90); + ShardCounts counts = forDataNodeCount(nodesInCluster); Settings clusterSettings = Settings.builder() .put(Metadata.SETTING_CLUSTER_MAX_SHARDS_PER_NODE.getKey(), counts.getShardsPerNode()) .build(); diff --git a/server/src/test/java/org/elasticsearch/cluster/shards/ShardCounts.java b/server/src/test/java/org/elasticsearch/cluster/shards/ShardCounts.java new file mode 100644 index 00000000000..4df5ddd99c8 --- /dev/null +++ b/server/src/test/java/org/elasticsearch/cluster/shards/ShardCounts.java @@ -0,0 +1,90 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.elasticsearch.cluster.shards; + +import org.elasticsearch.test.ESTestCase; +import org.junit.Assert; + +import static org.hamcrest.Matchers.lessThanOrEqualTo; + +public class ShardCounts { + private final int shardsPerNode; + + private final int firstIndexShards; + private final int firstIndexReplicas; + + private final int failingIndexShards; + private final int failingIndexReplicas; + + private ShardCounts(int shardsPerNode, + int firstIndexShards, + int firstIndexReplicas, + int failingIndexShards, + int failingIndexReplicas) { + this.shardsPerNode = shardsPerNode; + this.firstIndexShards = firstIndexShards; + this.firstIndexReplicas = firstIndexReplicas; + this.failingIndexShards = failingIndexShards; + this.failingIndexReplicas = failingIndexReplicas; + } + + public static ShardCounts forDataNodeCount(int dataNodes) { + Assert.assertThat("this method will not work reliably with this many data nodes due to the limit of shards in a single index," + + "use fewer data nodes or multiple indices", dataNodes, lessThanOrEqualTo(90)); + int mainIndexReplicas = ESTestCase.between(0, dataNodes - 1); + int mainIndexShards = ESTestCase.between(1, 10); + int totalShardsInIndex = (mainIndexReplicas + 1) * mainIndexShards; + // Sometimes add some headroom to the limit to check that it works even if you're not already right up against the limit + int shardsPerNode = (int) Math.ceil((double) totalShardsInIndex / dataNodes) + ESTestCase.between(0, 10); + int totalCap = shardsPerNode * dataNodes; + + int failingIndexShards; + int failingIndexReplicas; + if (dataNodes > 1 && ESTestCase.frequently()) { + failingIndexShards = Math.max(1, totalCap - totalShardsInIndex); + failingIndexReplicas = ESTestCase.between(1, dataNodes - 1); + } else { + failingIndexShards = totalCap - totalShardsInIndex + ESTestCase.between(1, 10); + failingIndexReplicas = 0; + } + + return new ShardCounts(shardsPerNode, mainIndexShards, mainIndexReplicas, failingIndexShards, failingIndexReplicas); + } + + public int getShardsPerNode() { + return shardsPerNode; + } + + public int getFirstIndexShards() { + return firstIndexShards; + } + + public int getFirstIndexReplicas() { + return firstIndexReplicas; + } + + public int getFailingIndexShards() { + return failingIndexShards; + } + + public int getFailingIndexReplicas() { + return failingIndexReplicas; + } +} diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java b/server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java index c6c5fd1064e..872f0840cf3 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java @@ -33,7 +33,7 @@ import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.cluster.shards.ClusterShardLimitIT; +import org.elasticsearch.cluster.shards.ShardCounts; import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.collect.ImmutableOpenMap; import org.elasticsearch.common.io.FileSystemUtils; @@ -85,7 +85,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.cluster.shards.ClusterShardLimitIT.ShardCounts.forDataNodeCount; +import static org.elasticsearch.cluster.shards.ShardCounts.forDataNodeCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; @@ -583,7 +583,7 @@ public class IndicesServiceTests extends ESSingleNodeTestCase { public void testOverShardLimit() { int nodesInCluster = randomIntBetween(1,90); - ClusterShardLimitIT.ShardCounts counts = forDataNodeCount(nodesInCluster); + ShardCounts counts = forDataNodeCount(nodesInCluster); Settings clusterSettings = Settings.builder() .put(Metadata.SETTING_CLUSTER_MAX_SHARDS_PER_NODE.getKey(), counts.getShardsPerNode()) @@ -606,7 +606,7 @@ public class IndicesServiceTests extends ESSingleNodeTestCase { public void testUnderShardLimit() { int nodesInCluster = randomIntBetween(2,90); // Calculate the counts for a cluster 1 node smaller than we have to ensure we have headroom - ClusterShardLimitIT.ShardCounts counts = forDataNodeCount(nodesInCluster - 1); + ShardCounts counts = forDataNodeCount(nodesInCluster - 1); Settings clusterSettings = Settings.builder() .put(Metadata.SETTING_CLUSTER_MAX_SHARDS_PER_NODE.getKey(), counts.getShardsPerNode())