You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/26 01:16:22 UTC

[GitHub] [kafka] hachikuji opened a new pull request, #12217: MINOR: Enable kraft support in quota integration tests

hachikuji opened a new pull request, #12217:
URL: https://github.com/apache/kafka/pull/12217

   Enable kraft support in `BaseQuotaTest` and its extensions.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] hachikuji commented on a diff in pull request #12217: MINOR: Enable kraft support in quota integration tests

Posted by GitBox <gi...@apache.org>.
hachikuji commented on code in PR #12217:
URL: https://github.com/apache/kafka/pull/12217#discussion_r883773112


##########
core/src/test/scala/integration/kafka/api/BaseQuotaTest.scala:
##########
@@ -70,23 +71,24 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
   val defaultRequestQuota: Double = Long.MaxValue.toDouble
 
   val topic1 = "topic-1"
-  var leaderNode: KafkaServer = _
-  var followerNode: KafkaServer = _
+  var leaderNode: KafkaBroker = _
+  var followerNode: KafkaBroker = _
   var quotaTestClients: QuotaTestClients = _
 
   @BeforeEach
   override def setUp(testInfo: TestInfo): Unit = {
     super.setUp(testInfo)
 
     val numPartitions = 1
-    val leaders = createTopic(topic1, numPartitions, brokerCount)
-    leaderNode = if (leaders(0) == servers.head.config.brokerId) servers.head else servers(1)
-    followerNode = if (leaders(0) != servers.head.config.brokerId) servers.head else servers(1)
+    val leaders = createTopic(topic1, numPartitions, brokerCount, adminClientConfig = adminClientConfig)

Review Comment:
   It's because `createTopic` writes to zk directly. 



-- 
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-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] hachikuji commented on a diff in pull request #12217: MINOR: Enable kraft support in quota integration tests

Posted by GitBox <gi...@apache.org>.
hachikuji commented on code in PR #12217:
URL: https://github.com/apache/kafka/pull/12217#discussion_r883773112


##########
core/src/test/scala/integration/kafka/api/BaseQuotaTest.scala:
##########
@@ -70,23 +71,24 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
   val defaultRequestQuota: Double = Long.MaxValue.toDouble
 
   val topic1 = "topic-1"
-  var leaderNode: KafkaServer = _
-  var followerNode: KafkaServer = _
+  var leaderNode: KafkaBroker = _
+  var followerNode: KafkaBroker = _
   var quotaTestClients: QuotaTestClients = _
 
   @BeforeEach
   override def setUp(testInfo: TestInfo): Unit = {
     super.setUp(testInfo)
 
     val numPartitions = 1
-    val leaders = createTopic(topic1, numPartitions, brokerCount)
-    leaderNode = if (leaders(0) == servers.head.config.brokerId) servers.head else servers(1)
-    followerNode = if (leaders(0) != servers.head.config.brokerId) servers.head else servers(1)
+    val leaders = createTopic(topic1, numPartitions, brokerCount, adminClientConfig = adminClientConfig)

Review Comment:
   It's because `createTopic` writes to zk directly for non-kraft tests. 



-- 
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-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] jsancio commented on pull request #12217: MINOR: Enable kraft support in quota integration tests

Posted by GitBox <gi...@apache.org>.
jsancio commented on PR #12217:
URL: https://github.com/apache/kafka/pull/12217#issuecomment-1144259432

   Merging. The test failures are unrelated.


-- 
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-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] dengziming commented on a diff in pull request #12217: MINOR: Enable kraft support in quota integration tests

Posted by GitBox <gi...@apache.org>.
dengziming commented on code in PR #12217:
URL: https://github.com/apache/kafka/pull/12217#discussion_r883250496


##########
core/src/test/scala/integration/kafka/api/BaseQuotaTest.scala:
##########
@@ -70,23 +71,24 @@ abstract class BaseQuotaTest extends IntegrationTestHarness {
   val defaultRequestQuota: Double = Long.MaxValue.toDouble
 
   val topic1 = "topic-1"
-  var leaderNode: KafkaServer = _
-  var followerNode: KafkaServer = _
+  var leaderNode: KafkaBroker = _
+  var followerNode: KafkaBroker = _
   var quotaTestClients: QuotaTestClients = _
 
   @BeforeEach
   override def setUp(testInfo: TestInfo): Unit = {
     super.setUp(testInfo)
 
     val numPartitions = 1
-    val leaders = createTopic(topic1, numPartitions, brokerCount)
-    leaderNode = if (leaders(0) == servers.head.config.brokerId) servers.head else servers(1)
-    followerNode = if (leaders(0) != servers.head.config.brokerId) servers.head else servers(1)
+    val leaders = createTopic(topic1, numPartitions, brokerCount, adminClientConfig = adminClientConfig)

Review Comment:
   This change is due to security reasons? I wonder why it will succeed in ZK mode, does this mean we will bypass security certification in zk mode.



-- 
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-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] jsancio merged pull request #12217: MINOR: Enable kraft support in quota integration tests

Posted by GitBox <gi...@apache.org>.
jsancio merged PR #12217:
URL: https://github.com/apache/kafka/pull/12217


-- 
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-unsubscribe@kafka.apache.org

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