Skip to content

Commit e625e53

Browse files
javannaareek
authored andcommitted
[TEST] fixed unicast bw comp test configuration
The second internal node, when present, wasn't able to join the existing cluster due ti misconfigured unicast hosts, thus it would form its own cluster.
1 parent 7cd354a commit e625e53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
3434
return ImmutableSettings.builder()
3535
.put("transport.tcp.port", 9380 + nodeOrdinal)
3636
.put("discovery.zen.ping.multicast.enabled", false)
37-
.put("discovery.zen.ping.unicast.hosts", "localhost:9390,localhost:9391")
37+
.put("discovery.zen.ping.unicast.hosts", "localhost:9380,localhost:9381,localhost:9390,localhost:9391")
3838
.put(super.nodeSettings(nodeOrdinal))
3939
.build();
4040
}
@@ -44,13 +44,13 @@ protected Settings externalNodeSettings(int nodeOrdinal) {
4444
return ImmutableSettings.settingsBuilder()
4545
.put("transport.tcp.port", 9390 + nodeOrdinal)
4646
.put("discovery.zen.ping.multicast.enabled", false)
47-
.put("discovery.zen.ping.unicast.hosts", "localhost:9380,localhost:9381")
47+
.put("discovery.zen.ping.unicast.hosts", "localhost:9380,localhost:9381,localhost:9390,localhost:9391")
4848
.put(super.nodeSettings(nodeOrdinal))
4949
.build();
5050
}
5151

5252
@Test
53-
public void testUnicastDiscovery() throws Exception {
53+
public void testUnicastDiscovery() {
5454
ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth().get();
5555
assertThat(healthResponse.getNumberOfDataNodes(), equalTo(cluster().numDataNodes()));
5656
}

0 commit comments

Comments
 (0)