You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Philip Nee (Jira)" <ji...@apache.org> on 2023/12/15 19:14:00 UTC

[jira] [Updated] (KAFKA-16019) Some of the tests in PlaintextConsumer can't seem to deterministically invokes and verify the consumer callback

     [ https://issues.apache.org/jira/browse/KAFKA-16019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Nee updated KAFKA-16019:
-------------------------------
    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
{code:java}
consumer.subscribe(List(topic, topic2).asJava, listener)
val records = awaitNonEmptyRecords(consumer, tp)
assertEquals(1, listener.callsToAssigned, "should be assigned once") {code}

  was:
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")


> Some of the tests in PlaintextConsumer can't seem to deterministically invokes and verify the consumer callback
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-16019
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16019
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Philip Nee
>            Priority: Major
>
> 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
> {code:java}
> consumer.subscribe(List(topic, topic2).asJava, listener)
> val records = awaitNonEmptyRecords(consumer, tp)
> assertEquals(1, listener.callsToAssigned, "should be assigned once") {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)