private static ThreadFactory threadFactoryWithNamedThreads(String threadPrefix) {
        AtomicInteger threadNumber = new AtomicInteger(1);
        return r -> {
            // This is essentially Executors.defaultThreadFactory except with
            // custom thread names so in order to filter by thread names when debugging
            SecurityManager s = System.getSecurityManager();
            Thread t = new Thread((s != null) ? s.getThreadGroup() :
                Thread.currentThread().getThreadGroup(), r,
                threadPrefix + threadNumber.getAndIncrement(),
                0);
            if (t.isDaemon()) {
                t.setDaemon(false);
            }
            if (t.getPriority() != Thread.NORM_PRIORITY) {
                t.setPriority(Thread.NORM_PRIORITY);
            }
            return t;
        };
    }
From the test orchestrating thread, await for the test thread to continue execution
@throws InterruptedException If the current thread is interrupted while waiting
@throws BrokenBarrierException If the test thread is interrupted while waiting
@throws TimeoutException If the barrier is not reached before 1s passes.
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/SynchronizationTest.java