Search in sources :

Example 1 with Bridge

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

the class NetworkDisruptionTests method testBridge.

public void testBridge() {
    Set<String> partition1 = generateRandomStringSet(1, 10);
    Set<String> partition2 = generateRandomStringSet(1, 10);
    String bridgeNode = randomAsciiOfLength(10);
    Bridge topology = new Bridge(bridgeNode, partition1, partition2);
    checkBridge(topology, bridgeNode, partition1, partition2);
}
Also used : Bridge(org.elasticsearch.test.disruption.NetworkDisruption.Bridge)

Example 2 with Bridge

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

the class NetworkDisruptionTests method testRandomBridge.

public void testRandomBridge() {
    Bridge topology = Bridge.random(random(), generateRandomStringSet(3, 20));
    String bridgeNode = topology.getBridgeNode();
    Set<String> partition1 = topology.getNodesSideOne();
    Set<String> partition2 = topology.getNodesSideTwo();
    checkBridge(topology, bridgeNode, partition1, partition2);
}
Also used : Bridge(org.elasticsearch.test.disruption.NetworkDisruption.Bridge)

Aggregations

Bridge (org.elasticsearch.test.disruption.NetworkDisruption.Bridge)2