testDifferentRolesMaintainPathOnRestart - lower join timeout as split elections are likely

the test reduce the wait for initial cluster state to 0, causing multiple nodes to be start while elections are going on. This means there is a chance of a split election which shouldn't cause the test to time out.
This commit is contained in:
Boaz Leskes 2017-04-04 10:36:09 +02:00
parent 71293a89bf
commit 20b274d7b9
1 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.discovery.zen.ZenDiscovery;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESTestCase;
@ -356,7 +357,10 @@ public class InternalTestClusterTests extends ESTestCase {
.put(NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.getKey(), numNodes)
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(NetworkModule.TRANSPORT_TYPE_KEY, MockTcpTransportPlugin.MOCK_TCP_TRANSPORT_NAME)
.put(DiscoverySettings.INITIAL_STATE_TIMEOUT_SETTING.getKey(), 0).build();
.put(DiscoverySettings.INITIAL_STATE_TIMEOUT_SETTING.getKey(), 0)
// timeout as no initial state timeout makes split elections more likely
.put(ZenDiscovery.JOIN_TIMEOUT_SETTING.getKey(), "3s") // speed up
.build();
}
@Override