apoorvmittal10 commented on code in PR #14554:
URL: https://github.com/apache/kafka/pull/14554#discussion_r1362652533


##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -6222,4 +6222,62 @@ class KafkaApisTest {
 
     assertEquals(expectedResponse, response.data)
   }
+
+  @Test
+  def testGetTelemetrySubscriptionsNotAllowedForZkClusters(): Unit = {
+    val data = new GetTelemetrySubscriptionsRequestData()
+    data.setClientInstanceId(Uuid.randomUuid())
+
+    val request = buildRequest(new 
GetTelemetrySubscriptionsRequest.Builder(data, true).build())
+    createKafkaApis(enableForwarding = true).handle(request, 
RequestLocal.NoCaching)
+
+    val response = 
verifyNoThrottling[GetTelemetrySubscriptionsResponse](request)
+    assertEquals(Errors.UNKNOWN_SERVER_ERROR, 
Errors.forCode(response.data.errorCode))
+  }
+
+  @Test
+  def testGetTelemetrySubscriptionsUnsupportedVersionForKRaftClusters(): Unit 
= {

Review Comment:
   Yes the test will change accordingly if the method is implemented and new 
test will be required. It's to validate if we are actually able to issue API 
call and get the desired error back.



-- 
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