Search in sources :

Example 16 with TwoPartitions

use of org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions in project elasticsearch by elastic.

the class NetworkDisruptionTests method testRandomTwoPartitions.

public void testRandomTwoPartitions() {
    TwoPartitions topology = TwoPartitions.random(random(), generateRandomStringSet(2, 20));
    Set<String> partition1 = topology.getNodesSideOne();
    Set<String> partition2 = topology.getNodesSideTwo();
    checkTwoPartitions(topology, partition1, partition2);
}
Also used : TwoPartitions(org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions)

Aggregations

TwoPartitions (org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions)16 NetworkDisruption (org.elasticsearch.test.disruption.NetworkDisruption)12 HashSet (java.util.HashSet)6 NetworkDisconnect (org.elasticsearch.test.disruption.NetworkDisruption.NetworkDisconnect)6 ClusterState (org.elasticsearch.cluster.ClusterState)5 Settings (org.elasticsearch.common.settings.Settings)4 IndexResponse (org.elasticsearch.action.index.IndexResponse)3 TimeValue (org.elasticsearch.common.unit.TimeValue)3 UnicastZenPing (org.elasticsearch.discovery.zen.UnicastZenPing)3 ZenDiscovery (org.elasticsearch.discovery.zen.ZenDiscovery)3 ZenPing (org.elasticsearch.discovery.zen.ZenPing)3 TestZenDiscovery (org.elasticsearch.test.discovery.TestZenDiscovery)3 NetworkUnresponsive (org.elasticsearch.test.disruption.NetworkDisruption.NetworkUnresponsive)3 ArrayList (java.util.ArrayList)2 CountDownLatch (java.util.concurrent.CountDownLatch)2 ExecutionException (java.util.concurrent.ExecutionException)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 IndexSettings (org.elasticsearch.index.IndexSettings)2 TestLogging (org.elasticsearch.test.junit.annotations.TestLogging)2 IOException (java.io.IOException)1