private static void repeat(ThrowingCallable task) throws Throwable {
        final Stopwatch stopwatch = Stopwatch.createStarted();
        do {
            task.call();
            Thread.sleep(100);
        } while (stopwatch.elapsed(TimeUnit.MILLISECONDS) < 1000);
    }
Keeps running the given {@code task} for a second.
core/src/test/java/com/linecorp/armeria/common/util/StartStopSupportTest.java