|
19 | 19 |
|
20 | 20 | package org.elasticsearch.discovery.zen; |
21 | 21 |
|
22 | | -import org.apache.lucene.util.LuceneTestCase.AwaitsFix; |
23 | 22 | import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest; |
24 | 23 | import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; |
25 | 24 | import org.elasticsearch.common.settings.Settings; |
26 | 25 | import org.elasticsearch.test.ESIntegTestCase; |
27 | 26 |
|
28 | 27 | import static org.elasticsearch.discovery.DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING; |
29 | 28 | import static org.elasticsearch.discovery.zen.SettingsBasedHostsProvider.DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING; |
30 | | -import static org.elasticsearch.discovery.zen.SettingsBasedHostsProvider.LIMIT_LOCAL_PORTS_COUNT; |
31 | | -import static org.elasticsearch.transport.TcpTransport.PORT; |
32 | 29 |
|
33 | | -@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/34781") |
34 | 30 | @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) |
35 | 31 | public class SettingsBasedHostProviderIT extends ESIntegTestCase { |
36 | 32 |
|
@@ -64,20 +60,4 @@ public void testClusterFormsWithSingleSeedHostInSettings() { |
64 | 60 |
|
65 | 61 | ensureStableCluster(extraNodes + 1); |
66 | 62 | } |
67 | | - |
68 | | - public void testClusterFormsByScanningPorts() { |
69 | | - // This test will fail if all 4 ports just less than the one used by the first node are already bound by something else. It's hard |
70 | | - // to know how often this might happen in reality, so let's try it and see. |
71 | | - |
72 | | - final String seedNodeName = internalCluster().startNode(); |
73 | | - final NodesInfoResponse nodesInfoResponse |
74 | | - = client(seedNodeName).admin().cluster().nodesInfo(new NodesInfoRequest("_local")).actionGet(); |
75 | | - final int seedNodePort = nodesInfoResponse.getNodes().get(0).getTransport().getAddress().publishAddress().getPort(); |
76 | | - final int minPort = randomIntBetween(seedNodePort - LIMIT_LOCAL_PORTS_COUNT + 1, seedNodePort - 1); |
77 | | - final String portSpec = minPort + "-" + seedNodePort; |
78 | | - |
79 | | - logger.info("--> using port specification [{}]", portSpec); |
80 | | - internalCluster().startNode(Settings.builder().put(PORT.getKey(), portSpec)); |
81 | | - ensureStableCluster(2); |
82 | | - } |
83 | 63 | } |
0 commit comments