From 702890e461b7d99bacf0febe970194960c5cdbe5 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 31 Jul 2014 17:01:05 +0200 Subject: [PATCH] [TEST] Remove the forceful `network.mode` setting in DiscoveryWithServiceDisruptions#testMasterNodeGCs now local transport use worker threads. --- .../discovery/DiscoveryWithServiceDisruptions.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptions.java b/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptions.java index c1099ead87b..21ca342f17a 100644 --- a/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptions.java +++ b/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptions.java @@ -141,17 +141,12 @@ public class DiscoveryWithServiceDisruptions extends ElasticsearchIntegrationTes } private List startUnicastCluster(int numberOfNodes, @Nullable int[] unicastHostsOrdinals, int minimumMasterNode) throws ExecutionException, InterruptedException { - return startUnicastCluster(numberOfNodes, unicastHostsOrdinals, minimumMasterNode, ImmutableSettings.EMPTY); - } - - private List startUnicastCluster(int numberOfNodes, @Nullable int[] unicastHostsOrdinals, int minimumMasterNode, Settings settings) throws ExecutionException, InterruptedException { if (minimumMasterNode < 0) { minimumMasterNode = numberOfNodes / 2 + 1; } // TODO: Rarely use default settings form some of these Settings nodeSettings = ImmutableSettings.builder() .put(DEFAULT_SETTINGS) - .put(settings) .put(ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES, minimumMasterNode) .build(); @@ -511,9 +506,7 @@ public class DiscoveryWithServiceDisruptions extends ElasticsearchIntegrationTes public void testMasterNodeGCs() throws Exception { // TODO: on mac OS multicast threads are shared between nodes and we therefore we can't simulate GC and stop pinging for just one node // find a way to block thread creation in the generic thread pool to avoid this. - // TODO: with local transport the threads of the source node enter the target node, since everything is local and like above we can't simulate GC on one node - // with netty transport the threads of different nodes don't touch each other due to the network threading Netty uses - List nodes = startUnicastCluster(3, null, -1, ImmutableSettings.builder().put("node.mode", "network").build()); + List nodes = startUnicastCluster(3, null, -1); String oldMasterNode = internalCluster().getMasterName(); // a very long GC, but it's OK as we remove the disruption when it has had an effect