ramiletus / fraud-detection

Mozilla Public License 2.0
1 stars 0 forks source link

UserInjectionKafkaListenerTest.class fails inconsistently #12

Open ramiletus opened 2 months ago

ramiletus commented 2 months ago

Seems like the await time passes without the latch being counted down. Happens a few times only, but this makes the test not reliable. With the actual configuration, not too much info is provided in test logs.

I based the code of this test class on this article. The idea is to synchronize the execution of the @KafkaListener method with the test thread, so a CountDownLatch is used. However, and only sometimes, the latch does not effectively count down.

Help is needed.