appchemist commented on code in PR #16043:
URL: https://github.com/apache/kafka/pull/16043#discussion_r1631101468


##########
core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala:
##########
@@ -189,6 +189,20 @@ class PlaintextConsumerTest extends BaseConsumerTest {
     assertThrows(classOf[InvalidTopicException], () => 
consumer.partitionsFor(";3# ads,{234"))
   }
 
+  @ParameterizedTest(name = 
TestInfoUtils.TestWithParameterizedQuorumAndGroupProtocolNames)
+  @MethodSource(Array("getTestQuorumAndGroupProtocolParametersAll"))
+  def testSubscribeInvalidTopic(quorum: String, groupProtocol: String): Unit = 
{
+    val invalidTopicName = "topic abc"
+    val consumer = createConsumer()
+
+    // subscribe invalid topic
+    consumer.subscribe(List(invalidTopicName).asJava)
+
+    consumer.poll(Duration.ZERO);

Review Comment:
   Without this line, it will fail when groupProtocol is consumer.
   When debugging, after processing the Background Event, Consumer receives an 
`InvalidTopicException`.
   So adding `consumer.poll(Duration.ZERO)`
   
   Do you have any thoughts on this? @philipnee & @lianetm 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to