Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16019

Some of the tests in PlaintextConsumer can't seem to deterministically invoke and verify the consumer callback

    XMLWordPrintableJSON

Details

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

      Attachments

        Activity

          People

            kirktrue Kirk True
            pnee Philip Nee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: