kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-3103; Fix transient Failure in testIsrAfterBrokerShutDownAndJoinsBack
Date Thu, 28 Jan 2016 20:26:10 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.9.0 04a6491f4 -> a21c77356


KAFKA-3103; Fix transient Failure in testIsrAfterBrokerShutDownAndJoinsBack

All three defects have the same root cause.

Root cause is ClientUtils.fetchTopicMetadata returns the BrokerEndPoints in a non-deterministic
order, so we need to sort the expected endpoints and the received endpoints so we can correctly
compare them.

Author: Denise Fernandez <dcbfernandez@gmail.com>

Reviewers: Ismael Juma, Grant Henke, Guozhang Wang

Closes #822 from rowdyrabbit/KAFKA-3103

(cherry picked from commit 9ce595d130c39ce83030e81765702697920dfcfa)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/a21c7735
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/a21c7735
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/a21c7735

Branch: refs/heads/0.9.0
Commit: a21c77356017b2b950d0e569573cbf948c999b5f
Parents: 04a6491
Author: Denise Fernandez <dcbfernandez@gmail.com>
Authored: Thu Jan 28 12:25:58 2016 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Jan 28 12:26:07 2016 -0800

----------------------------------------------------------------------
 .../test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a21c7735/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala b/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala
index a621efc..2e3df82 100644
--- a/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala
+++ b/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala
@@ -202,7 +202,7 @@ abstract class BaseTopicMetadataTest extends ZooKeeperTestHarness {
                                 2000, 0)
         metadata.topicsMetadata.nonEmpty &&
           metadata.topicsMetadata.head.partitionsMetadata.nonEmpty &&
-          expectedIsr == metadata.topicsMetadata.head.partitionsMetadata.head.isr
+          expectedIsr.sortBy(_.id) == metadata.topicsMetadata.head.partitionsMetadata.head.isr.sortBy(_.id)
       },
         "Topic metadata is not correctly updated for broker " + x + ".\n" +
         "Expected ISR: " + expectedIsr + "\n" +


Mime
View raw message