kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject [kafka] branch 2.5 updated: MINOR: Fix unrelated types comparison in MetadataRequestTest (#8195)
Date Sat, 29 Feb 2020 22:43:19 GMT
This is an automated email from the ASF dual-hosted git repository.

ijuma pushed a commit to branch 2.5
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.5 by this push:
     new c3e4534  MINOR: Fix unrelated types comparison in MetadataRequestTest (#8195)
c3e4534 is described below

commit c3e453428c895bae10cd438cd4bd2b28a3f156b6
Author: Chia-Ping Tsai <chia7712@gmail.com>
AuthorDate: Sun Mar 1 06:07:15 2020 +0800

    MINOR: Fix unrelated types comparison in MetadataRequestTest (#8195)
    
    The type of `leaderId` was changed to `Optional` in a recent change.
    
    Reviewers: Ismael Juma <ismael@juma.me.uk>
---
 core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala b/core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala
index 599ae17..ecb3f7e 100644
--- a/core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala
+++ b/core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala
@@ -274,7 +274,7 @@ class MetadataRequestTest extends BaseRequestTest {
       val serverId = server.dataPlaneRequestProcessor.brokerId
       val leaderId = partitionMetadata.leaderId
       val replicaIds = partitionMetadata.replicaIds.asScala
-      serverId != leaderId && replicaIds.contains(serverId)
+      leaderId.isPresent && leaderId.get() != serverId && replicaIds.contains(serverId)
     }.get
     downNode.shutdown()
 


Mime
View raw message