Skip to content

Commit 0de007a

Browse files
committed
fix tests to not mix local transport and zen unicast disco
1 parent 539f6ca commit 0de007a

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
3737
public class SpecificMasterNodesIT extends ESIntegTestCase {
3838

39+
@Override
40+
protected boolean forceNetwork() {
41+
return true;
42+
}
43+
3944
protected final Settings.Builder settingsBuilder() {
4045
return Settings.builder().put("discovery.type", "zen");
4146
}

core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
5151
public class TransportIndexFailuresIT extends ESIntegTestCase {
5252

53+
@Override
54+
protected boolean forceNetwork() {
55+
return true;
56+
}
57+
5358
private static final Settings nodeSettings = Settings.settingsBuilder()
5459
.put("discovery.type", "zen") // <-- To override the local setting if set externally
5560
.put(FaultDetection.SETTING_PING_TIMEOUT, "1s") // <-- for hitting simulated network failures quickly

core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import org.elasticsearch.snapshots.mockstore.MockRepository;
6666
import org.elasticsearch.test.InternalTestCluster;
6767
import org.elasticsearch.test.rest.FakeRestRequest;
68+
import org.elasticsearch.transport.TransportModule;
6869
import org.junit.Test;
6970

7071
import java.io.IOException;
@@ -96,9 +97,14 @@
9697

9798
/**
9899
*/
99-
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
100+
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
100101
public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCase {
101102

103+
@Override
104+
protected boolean forceNetwork() {
105+
return true; // TODO only restorePersistentSettingsTest needs this maybe factor out?
106+
}
107+
102108
@Test
103109
public void restorePersistentSettingsTest() throws Exception {
104110
logger.info("--> start 2 nodes");

0 commit comments

Comments
 (0)