@Override
    public void start() {
        Throwable caughtException = null;
        for (int i = 1; i <= maxAttempts; i++) {
            try {
                delegate.start();
                return;
            } catch (Exception ex) {
                caughtException = Exceptions.peel(ex);
                if (i < maxAttempts) {
                    final long delayMillis = backoff.nextDelayMillis(i);
                    logger.debug("{}; retrying in {} ms (attempts so far: {})",
                                 ex.getMessage(), delayMillis, i, ex);
                    Uninterruptibles.sleepUninterruptibly(delayMillis, TimeUnit.MILLISECONDS);
                }
            }
        }

        assertThat(caughtException).isNotNull();
        Exceptions.throwUnsafely(caughtException);
    }
A {@link SmartLifecycle} which retries to start the {@link Server} up to {@code maxAttempts}.
This is useful for testing that needs to bind a server to a random port number obtained in advance.
spring/boot3-autoconfigure/src/test/java/com/linecorp/armeria/spring/RetryableArmeriaServerGracefulShutdownLifecycle.java