private static void waitForGroup(EndpointGroup group, @Nullable Endpoint expectedEndpoint) {
        final Stopwatch stopwatch = Stopwatch.createStarted();
        if (expectedEndpoint != null) {
            await().untilAsserted(() -> assertThat(group.endpoints()).containsExactly(expectedEndpoint));
        } else {
            await().untilAsserted(() -> assertThat(group.endpoints()).isEmpty());
        }
        assertThat(stopwatch.elapsed(TimeUnit.MILLISECONDS)).isLessThan(RETRY_INTERVAL.toMillis() / 3);
    }
Makes sure the notification occurs as soon as possible thanks to long polling.
core/src/test/java/com/linecorp/armeria/client/endpoint/healthcheck/HealthCheckedEndpointGroupLongPollingTest.java