You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2016/01/28 21:26:02 UTC

kafka git commit: KAFKA-3103; Fix transient Failure in testIsrAfterBrokerShutDownAndJoinsBack

Repository: kafka
Updated Branches:
  refs/heads/trunk a40a2a260 -> 9ce595d13


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 <dc...@gmail.com>

Reviewers: Ismael Juma, Grant Henke, Guozhang Wang

Closes #822 from rowdyrabbit/KAFKA-3103


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

Branch: refs/heads/trunk
Commit: 9ce595d130c39ce83030e81765702697920dfcfa
Parents: a40a2a2
Author: Denise Fernandez <dc...@gmail.com>
Authored: Thu Jan 28 12:25:58 2016 -0800
Committer: Guozhang Wang <wa...@gmail.com>
Committed: Thu Jan 28 12:25:58 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/9ce595d1/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 7a59eba..1ef26f6 100644
--- a/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala
+++ b/core/src/test/scala/unit/kafka/integration/BaseTopicMetadataTest.scala
@@ -201,7 +201,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" +