From 0b26576050334ef5e44da25fbb435fe56d91a853 Mon Sep 17 00:00:00 2001 From: Chia-Ping Tsai Date: Sat, 29 Feb 2020 16:44:29 +0800 Subject: [PATCH] Minor: fix the unrelated types comparsion in MetadataRequestTest --- 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 599ae179ff634..ecb3f7e3af8fb 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()