sentry-java
sentry-java copied to clipboard
Flaky ApacheHttpClientTransportTest Test
Integration
sentry
Java Version
11
Version
6.1.1
Steps to Reproduce
Run tests on CI
Expected Result
No failure
Actual Result
Flaky test
io.sentry.transport.apache.ApacheHttpClientTransportTest > flush waits till all requests are finished FAILED
org.mockito.exceptions.verification.TooLittleActualInvocations:
reusableCountLatch.decrement();
Wanted 3 times:
-> at io.sentry.transport.ReusableCountLatch.decrement(ReusableCountLatch.java:79)
But was 2 times:
-> at io.sentry.transport.apache.ApacheHttpClientTransport$1.completed(ApacheHttpClientTransport.java:129)
-> at io.sentry.transport.apache.ApacheHttpClientTransport$1.completed(ApacheHttpClientTransport.java:129)
at app//io.sentry.transport.ReusableCountLatch.decrement(ReusableCountLatch.java:79)
at app//io.sentry.transport.apache.ApacheHttpClientTransportTest.flush waits till all requests are finished(ApacheHttpClientTransportTest.kt:142)
Quick fix, up the timeout from 100 to something higher.
Closing this as I haven't seen it in a while.