Alyssa Huang created KAFKA-16655: ------------------------------------ Summary: deflake ZKMigrationIntegrationTest.testDualWrite Key: KAFKA-16655 URL: https://issues.apache.org/jira/browse/KAFKA-16655 Project: Kafka Issue Type: Improvement Reporter: Alyssa Huang Assignee: Alyssa Huang
{code:java} Failed to map supported failure 'org.opentest4j.AssertionFailedError: expected: not equal but was: <0>' with mapper 'org.gradle.api.internal.tasks.testing.failure.mappers.OpenTestAssertionFailedMapper@59b5251d': Cannot invoke "Object.getClass()" because "obj" is null > Task :core:test kafka.zk.ZkMigrationIntegrationTest.testDualWrite(ClusterInstance)[8] failed, log available in /Users/ahuang/ce-kafka/core/build/reports/testOutput/kafka.zk.ZkMigrationIntegrationTest.testDualWrite(ClusterInstance)[8].test.stdout Gradle Test Run :core:test > Gradle Test Executor 8 > ZkMigrationIntegrationTest > testDualWrite(ClusterInstance) > testDualWrite [8] Type=ZK, MetadataVersion=3.8-IV0, Security=PLAINTEXT FAILED org.opentest4j.AssertionFailedError: expected: not equal but was: <0> at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152) at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at app//org.junit.jupiter.api.AssertNotEquals.failEqual(AssertNotEquals.java:277) at app//org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:119) at app//org.junit.jupiter.api.AssertNotEquals.assertNotEquals(AssertNotEquals.java:111) at app//org.junit.jupiter.api.Assertions.assertNotEquals(Assertions.java:2121) at app//kafka.zk.ZkMigrationIntegrationTest.testDualWrite(ZkMigrationIntegrationTest.scala:995) {code} This test occasionally fails due to stale broker epoch exceptions, which in turn causes allocate producer ids to fail. Also fixes {{sendAllocateProducerIds}} erroneously returning 0 as the `producerIdStart` in error cases (because `onComplete` only accounts for timeouts and ignores any other error code) {code:java} [2024-04-12 18:45:08,820] INFO [ControllerServer id=3000] allocateProducerIds: event failed with StaleBrokerEpochException in 19 microseconds. (org.apache.kafka.controller.QuorumController:765) {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)