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-2822: DescribeConsumerGroup now returns empty list for non-existent group.
Date Thu, 12 Nov 2015 20:22:12 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.9.0 d04a918a2 -> 431ffa21b


KAFKA-2822: DescribeConsumerGroup now returns empty list for non-existent group.

…tent group, it used to throw IllegalArgumentException

Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Jason Gustafson, Guozhang Wang

Closes #515 from SinghAsDev/KAFKA-2822

(cherry picked from commit 28d71ce5e06a17248f944147e850f3e5e029bdee)
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/431ffa21
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/431ffa21
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/431ffa21

Branch: refs/heads/0.9.0
Commit: 431ffa21b0327da922f423ed77043dfb028601e2
Parents: d04a918
Author: Ashish Singh <asingh@cloudera.com>
Authored: Thu Nov 12 12:28:08 2015 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Nov 12 12:28:16 2015 -0800

----------------------------------------------------------------------
 .../test/scala/integration/kafka/api/AdminClientTest.scala   | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/431ffa21/core/src/test/scala/integration/kafka/api/AdminClientTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/integration/kafka/api/AdminClientTest.scala b/core/src/test/scala/integration/kafka/api/AdminClientTest.scala
index 072f8eb..5930d13 100644
--- a/core/src/test/scala/integration/kafka/api/AdminClientTest.scala
+++ b/core/src/test/scala/integration/kafka/api/AdminClientTest.scala
@@ -113,12 +113,6 @@ class AdminClientTest extends IntegrationTestHarness with Logging {
   @Test
   def testDescribeConsumerGroupForNonExistentGroup() {
     val nonExistentGroup = "non" + groupId
-    try {
-      client.describeConsumerGroup(nonExistentGroup)
-      fail("Should have failed for non existent group.")
-    } catch {
-      case ex: IllegalArgumentException => // Pass
-      case _: Throwable => fail("Should have failed for non existent group with IllegalArgumentException.")
-    }
+    assertTrue("Expected empty ConsumerSummary list", client.describeConsumerGroup(nonExistentGroup).isEmpty)
   }
 }


Mime
View raw message