Details
-
Test
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
Description
I was running the PlaintextConsumer to test the async consumer; however, a few tests were failing with not being able to verify the listener is invoked correctly
For example `testPerPartitionLeadMetricsCleanUpWithSubscribe`
Around 50% of the time, the listener's callsToAssigned was never incremented correctly. Event changing it to awaitUntilTrue it was still the same case
consumer.subscribe(List(topic, topic2).asJava, listener)
val records = awaitNonEmptyRecords(consumer, tp)
assertEquals(1, listener.callsToAssigned, "should be assigned once")