You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Rishabh Saraswat (Jira)" <ji...@apache.org> on 2026/09/26 14:07:00 UTC

[jira] [Commented] (KAFKA-18825) Fix the flaky EligibleLeaderReplicasIntegrationTest

    [ https://issues.apache.org/jira/browse/KAFKA-18825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119659#comment-18119659 ] 

Rishabh Saraswat commented on KAFKA-18825:
------------------------------------------

I investigated this flaky test from git history.

It looks like current issue was already addressed by [#18923|https://github.com/apache/kafka/pull/18923] ([1eecd02|https://github.com/apache/kafka/commit/1eecd02ce84b9ed3e996b5fb8f3185a5c784065d], "MINOR: Deflake EligibleLeaderReplicasIntegrationTest"). That change replaced the immediate {{leader().id()}} assertion with a polling condition that waits for {{leader != null}} and the ELR/LKELR state to settle.

The test also appears stable currently: [Develocity|https://develocity.apache.org/scans/tests?search.relativeStartTime=P90D&search.rootProjectNames=kafka&search.timeZoneId=Asia%2FCalcutta&tests.container=kafka.server.integration.EligibleLeaderReplicasIntegrationTest] shows 17 executions in the last 90 days, with 0 failures and 0 flaky executions.

[~dajac] [~calvinliu]  — can you confirm, if this ticket can be closed?

> Fix the flaky EligibleLeaderReplicasIntegrationTest
> ---------------------------------------------------
>
>                 Key: KAFKA-18825
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18825
>             Project: Kafka
>          Issue Type: Test
>            Reporter: Kamal Chandraprakash
>            Assignee: Rishabh Saraswat
>            Priority: Major
>
>  
> {noformat}
> java.lang.NullPointerException: Cannot invoke "org.apache.kafka.common.Node.id()" because the return value of "org.apache.kafka.common.TopicPartitionInfo.leader()" is nullat kafka.server.integration.EligibleLeaderReplicasIntegrationTest.testLastKnownLeaderShouldBeElectedIfEmptyElr(EligibleLeaderReplicasIntegrationTest.java:424){noformat}
>  
> {noformat}
> [2025-02-18 14:21:53,000] WARN [RemoteLogManager=0 partition=cOqaT8VmRYavtd924H5RwQ:Leader-0] Current task for partition cOqaT8VmRYavtd924H5RwQ:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832)    
> java.lang.NullPointerException: null    
> [2025-02-18 14:21:53,005] WARN [RemoteLogManager=0 partition=cOqaT8VmRYavtd924H5RwQ:Leader-0] Current task for partition cOqaT8VmRYavtd924H5RwQ:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832)    
> java.lang.NullPointerException: null{noformat}
> https://develocity.apache.org/scans/tests?search.rootProjectNames=kafka&search.timeZoneId=Europe%2FParis&tests.container=kafka.server.integration.EligibleLeaderReplicasIntegrationTest
>  



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