@Override
    public final void run() {
        long valueCount = collector.getMergingValueCount();
        if (valueCount == 0) {
            return;
        }

        runInternal();

        assert operationCount > 0 : "No merge operations have been invoked in AbstractContainerMerger";

        try {
            long timeoutMillis = Math.max(valueCount * TIMEOUT_FACTOR, MINIMAL_TIMEOUT_MILLIS);
            if (!semaphore.tryAcquire(operationCount, timeoutMillis, TimeUnit.MILLISECONDS)) {
                logger.warning("Split-brain healing for " + getLabel() + " didn't finish within the timeout...");
            }
        } catch (InterruptedException e) {
            logger.finest("Interrupted while waiting for split-brain healing of " + getLabel() + "...");
            Thread.currentThread().interrupt();
        } finally {
            collector.destroy();
        }
    }
@Test
    @RequireAssertEnabled
    public void testMergerRun_whenEmptyCollector_thenMergerDoesNotRun() {
        TestMergeOperation operation = new TestMergeOperation();
        TestContainerMerger merger = new TestContainerMerger(emptyCollector, nodeEngine, operation);

        merger.run();

        assertFalse("Expected the merge operation not to be invoked", operation.hasBeenInvoked);
        assertFalse("Expected collected containers not to be destroyed", collector.onDestroyHasBeenCalled);
    }