package com.hazelcast.core;

import com.hazelcast.test.AssertTask;
import com.hazelcast.test.SplitBrainTestSupport;

import static org.junit.Assert.assertEquals;

public class ProxySplitBrainTest extends SplitBrainTestSupport {

    @Override
    protected void onAfterSplitBrainCreated(HazelcastInstance[] firstBrain, HazelcastInstance[] secondBrain) {
        HazelcastInstance isolatedInstance = firstBrain[0];
        isolatedInstance.getLock("isolatedLock");
        assertDistributedObjectCountEventually(1, isolatedInstance);

        for (HazelcastInstance hz : secondBrain) {
            String name = generateKeyOwnedBy(hz);
            hz.getLock(name);
        }

        for (HazelcastInstance hz : secondBrain) {
            int expectedCount = secondBrain.length;
            assertDistributedObjectCountEventually(expectedCount, hz);
        }
    }

    @Override
    protected void onAfterSplitBrainHealed(HazelcastInstance[] allInstances) {
        for (HazelcastInstance hz : allInstances) {
            assertDistributedObjectCountEventually(allInstances.length, hz);
        }
    }

    private static void assertDistributedObjectCountEventually(final int expectedCount, final HazelcastInstance hz) {
        assertTrueEventually(new AssertTask() {
            @Override
            public void run() throws Exception {
                int actualSize = hz.getDistributedObjects().size();
                assertEquals(expectedCount, actualSize);
            }
        });
    }
}
@@ -90,77 +90,410 @@
 est.
-SplitBrainTestSupport;%0A%0Aimport static org.junit.Assert.assertEquals;%0A
+HazelcastParallelClassRunner;%0Aimport com.hazelcast.test.SplitBrainTestSupport;%0Aimport com.hazelcast.test.annotation.ParallelTest;%0Aimport com.hazelcast.test.annotation.QuickTest;%0Aimport org.junit.experimental.categories.Category;%0Aimport org.junit.runner.RunWith;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A@RunWith(HazelcastParallelClassRunner.class)%0A@Category(%7BQuickTest.class, ParallelTest.class%7D)
 %0Apub
@@ -1827,8 +1827,9 @@
 %0A    %7D%0A%7D
+%0A

Add missing @Category to ProxySplitBrainTest