Search in sources :

Example 1 with SplitBrainTestSupport

use of com.hazelcast.test.SplitBrainTestSupport in project hazelcast by hazelcast.

the class JetSplitBrainTestSupport method healSplitBrain.

private void healSplitBrain(HazelcastInstance[] instances, int firstSubClusterSize) {
    applyOnBrains(instances, firstSubClusterSize, SplitBrainTestSupport::unblockCommunicationBetween);
    if (unblacklistHint) {
        applyOnBrains(instances, firstSubClusterSize, JetSplitBrainTestSupport::unblacklistJoinerBetween);
    }
    for (HazelcastInstance instance : instances) {
        assertClusterSizeEventually(instances.length, instance);
    }
    waitAllForSafeState(instances);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) SplitBrainTestSupport(com.hazelcast.test.SplitBrainTestSupport)

Example 2 with SplitBrainTestSupport

use of com.hazelcast.test.SplitBrainTestSupport in project hazelcast-jet by hazelcast.

the class JetSplitBrainTestSupport method healSplitBrain.

private void healSplitBrain(JetInstance[] instances, int firstSubClusterSize) {
    applyOnBrains(instances, firstSubClusterSize, SplitBrainTestSupport::unblockCommunicationBetween);
    if (unblacklistHint) {
        applyOnBrains(instances, firstSubClusterSize, JetSplitBrainTestSupport::unblacklistJoinerBetween);
    }
    for (JetInstance instance : instances) {
        assertClusterSizeEventually(instances.length, instance.getHazelcastInstance());
    }
    waitAllForSafeState(Stream.of(instances).map(JetInstance::getHazelcastInstance).collect(toList()));
}
Also used : SplitBrainTestSupport(com.hazelcast.test.SplitBrainTestSupport) JetInstance(com.hazelcast.jet.JetInstance)

Aggregations

SplitBrainTestSupport (com.hazelcast.test.SplitBrainTestSupport)2 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 JetInstance (com.hazelcast.jet.JetInstance)1