PostHog / posthog-java

Official PostHog java library
MIT License
8 stars 12 forks source link

Make unittests run in Github actions #14

Closed tiina303 closed 3 years ago

tiina303 commented 3 years ago

Also made the test less flaky in GH Actions (still possible for it to take more than 10s).

Saw this in test output

Timed out waiting for queue to be empty.
Error:  Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.323 s <<< FAILURE! - in com.posthog.java.PostHogTest
Error:  testMaxTimeInQueue(com.posthog.java.PostHogTest)  Time elapsed: 1.208 s  <<< FAILURE!

Error:  Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.378 s <<< FAILURE! - in com.posthog.java.PostHogTest
Error:  testMaxTimeInQueue(com.posthog.java.PostHogTest)  Time elapsed: 0.244 s  <<< FAILURE!

So 10 ms was definitely too small wait time sadly.