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

Fix flakiness in Log4j2MetricsTest.asyncLogShouldNotBeDuplicated() #2451

Merged
merged 1 commit into from Feb 15, 2021

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Feb 15, 2021

Log4j2MetricsTest.asyncLogShouldNotBeDuplicated() failed as follows:

io.micrometer.core.instrument.binder.logging.Log4j2MetricsTest > asyncLogShouldNotBeDuplicated() FAILED
    org.opentest4j.AssertionFailedError: 
    Expecting:
     <0.0>
    to be equal to:
     <1.0>
    but was not.
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at io.micrometer.core.instrument.binder.logging.Log4j2MetricsTest.asyncLogShouldNotBeDuplicated(Log4j2MetricsTest.java:174)

This PR fixes the flakiness by waiting for up to 1 second for the meter to be updated.

@shakuzen shakuzen added the type: task A general task label Feb 15, 2021
@shakuzen shakuzen added this to the 1.3.17 milestone Feb 15, 2021
@shakuzen shakuzen merged commit 08dee6f into micrometer-metrics:1.3.x Feb 15, 2021
@izeye izeye deleted the flakiness branch February 15, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants