[TEST] move ClusterDiscoveryConfiguration to org.elasticsearch.test.discovery

ClusterDiscoveryConfiguration is part of the test infra and should get exported as part of the test jar. This is achieved by moving the class to org.elasticsearch.test.discovery

Closes #8337
This commit is contained in:
javanna 2014-11-04 13:40:48 +01:00 committed by Luca Cavanna
parent 792b25e857
commit ac2ee35c22
3 changed files with 4 additions and 3 deletions

View File

@ -51,6 +51,7 @@ import org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing;
import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction; import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction;
import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.InternalTestCluster; import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
import org.elasticsearch.test.disruption.*; import org.elasticsearch.test.disruption.*;
import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService; import org.elasticsearch.test.transport.MockTransportService;

View File

@ -26,6 +26,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope; import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.elasticsearch.discovery; package org.elasticsearch.test.discovery;
import com.carrotsearch.randomizedtesting.RandomizedTest; import com.carrotsearch.randomizedtesting.RandomizedTest;
import com.google.common.primitives.Ints; import com.google.common.primitives.Ints;
@ -107,14 +107,13 @@ public class ClusterDiscoveryConfiguration extends SettingsSource {
this.basePort = calcBasePort(); this.basePort = calcBasePort();
} }
private final static int calcBasePort() { private static int calcBasePort() {
// note that this has properly co-exist with the port logic at InternalTestCluster's constructor // note that this has properly co-exist with the port logic at InternalTestCluster's constructor
return 30000 + return 30000 +
1000 * (ElasticsearchIntegrationTest.CHILD_JVM_ID % 60) + // up to 60 jvms 1000 * (ElasticsearchIntegrationTest.CHILD_JVM_ID % 60) + // up to 60 jvms
100 * portRangeCounter.incrementAndGet(); // up to 100 nodes 100 * portRangeCounter.incrementAndGet(); // up to 100 nodes
} }
@Override @Override
public Settings node(int nodeOrdinal) { public Settings node(int nodeOrdinal) {
ImmutableSettings.Builder builder = ImmutableSettings.builder() ImmutableSettings.Builder builder = ImmutableSettings.builder()