[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:
parent
792b25e857
commit
ac2ee35c22
|
@ -51,6 +51,7 @@ import org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing;
|
|||
import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
|
||||
import org.elasticsearch.test.disruption.*;
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
|
||||
import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.discovery;
|
||||
package org.elasticsearch.test.discovery;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.RandomizedTest;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
@ -107,14 +107,13 @@ public class ClusterDiscoveryConfiguration extends SettingsSource {
|
|||
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
|
||||
return 30000 +
|
||||
1000 * (ElasticsearchIntegrationTest.CHILD_JVM_ID % 60) + // up to 60 jvms
|
||||
100 * portRangeCounter.incrementAndGet(); // up to 100 nodes
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Settings node(int nodeOrdinal) {
|
||||
ImmutableSettings.Builder builder = ImmutableSettings.builder()
|
Loading…
Reference in New Issue