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


##########
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())

Review Comment:
   I removed it though.



##########
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 
= {
+    val data = new GetTelemetrySubscriptionsRequestData()
+    data.setClientInstanceId(Uuid.ZERO_UUID)

Review Comment:
   Done.



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