Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure: PropertiesEndpointGroupTest #3474

Closed
minwoox opened this issue Apr 22, 2021 · 1 comment · Fixed by #4903
Closed

Test failure: PropertiesEndpointGroupTest #3474

minwoox opened this issue Apr 22, 2021 · 1 comment · Fixed by #4903
Labels
Milestone

Comments

@minwoox
Copy link
Member

minwoox commented Apr 22, 2021

PropertiesEndpointGroupTest > endpointChangePropagatesToListeners FAILED
    org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in com.linecorp.armeria.client.endpoint.PropertiesEndpointGroupTest that uses com.linecorp.armeria.client.endpoint.EndpointGroup
    Expected size:<1> but was:<2> in:
    <[Endpoint{127.0.0.1:8080, weight=1000}, Endpoint{127.0.0.1:8081, weight=1000}]> within 1 minutes.
        at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
        at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
        at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
        at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
        at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
        at com.linecorp.armeria.client.endpoint.PropertiesEndpointGroupTest.endpointChangePropagatesToListeners(PropertiesEndpointGroupTest.java:275)

        Caused by:
        java.lang.AssertionError:
        Expected size:<1> but was:<2> in:
        <[Endpoint{127.0.0.1:8080, weight=1000}, Endpoint{127.0.0.1:8081, weight=1000}]>
            at com.linecorp.armeria.client.endpoint.PropertiesEndpointGroupTest.lambda$endpointChangePropagatesToListeners$7(PropertiesEndpointGroupTest.java:275)
@kojilin
Copy link
Member

kojilin commented May 15, 2021

Is it possible that read file after ENTRY_MODIFY not reflect the latest change?

@trustin trustin added the cleanup label Jun 5, 2021
@trustin trustin added this to the 1.24.0 milestone May 31, 2023
ikhoon pushed a commit that referenced this issue Jun 2, 2023
Motivation:

At least on macOS 13.4 (and probably other OSes), `WatchService` seems not to notify the file changes quickly enough. As a result, we see the following tests fail:

- `FileWatcherRegistryTest.runnableWithExceptionContinuesRun`
- `PropertiesEndpointGroupTest.endpointChangePropagatesToListeners`
- `PropertiesEndpointGroupTest.propertiesFileRestart`
- `PropertiesEndpointGroupTest.propertiesFileUpdatesCorrectly`

Modifications:

- Migrated `FileWatcherRegistryTest` and `PropertiesEndpointGroupTest` from JUnit 4 to 5
- Added `@EnabledForJreRange` annotation on the problematic tests

Result:

- Build is more stable on the environment where `WatchService` is not very responsive.
- Fixes #3474 and #3075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants