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/01/06 00:37:21 UTC

[GitHub] [kafka] cmccabe commented on a change in pull request #11629: MINOR: enable KRaft mode in CreateTopicsRequestTest

cmccabe commented on a change in pull request #11629:
URL: https://github.com/apache/kafka/pull/11629#discussion_r779226683



##########
File path: core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
##########
@@ -99,29 +101,33 @@ class CreateTopicsRequestTest extends AbstractCreateTopicsRequestTest {
     )
     validateTopicExists("partial-none")
 
-    // Timeout
-    // We don't expect a request to ever complete within 1ms. A timeout of 1 ms allows us to test the purgatory timeout logic.
-    validateErrorCreateTopicsRequests(topicsReq(Seq(
-      topicReq("error-timeout", numPartitions = 10, replicationFactor = 3)), timeout = 1),
-      Map("error-timeout" -> error(Errors.REQUEST_TIMED_OUT)), checkErrorMessage = false)
-    validateErrorCreateTopicsRequests(topicsReq(Seq(
-      topicReq("error-timeout-zero", numPartitions = 10, replicationFactor = 3)), timeout = 0),
-      Map("error-timeout-zero" -> error(Errors.REQUEST_TIMED_OUT)), checkErrorMessage = false)
-    // Negative timeouts are treated the same as 0
-    validateErrorCreateTopicsRequests(topicsReq(Seq(
-      topicReq("error-timeout-negative", numPartitions = 10, replicationFactor = 3)), timeout = -1),
-      Map("error-timeout-negative" -> error(Errors.REQUEST_TIMED_OUT)), checkErrorMessage = false)
-    // The topics should still get created eventually
-    TestUtils.waitForPartitionMetadata(servers, "error-timeout", 0)
-    TestUtils.waitForPartitionMetadata(servers, "error-timeout-zero", 0)
-    TestUtils.waitForPartitionMetadata(servers, "error-timeout-negative", 0)
-    validateTopicExists("error-timeout")
-    validateTopicExists("error-timeout-zero")
-    validateTopicExists("error-timeout-negative")
+    if (!isKRaftTest()) {

Review comment:
       yes, this is a good idea. done.

##########
File path: core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
##########
@@ -99,29 +101,33 @@ class CreateTopicsRequestTest extends AbstractCreateTopicsRequestTest {
     )
     validateTopicExists("partial-none")
 
-    // Timeout
-    // We don't expect a request to ever complete within 1ms. A timeout of 1 ms allows us to test the purgatory timeout logic.
-    validateErrorCreateTopicsRequests(topicsReq(Seq(
-      topicReq("error-timeout", numPartitions = 10, replicationFactor = 3)), timeout = 1),
-      Map("error-timeout" -> error(Errors.REQUEST_TIMED_OUT)), checkErrorMessage = false)
-    validateErrorCreateTopicsRequests(topicsReq(Seq(
-      topicReq("error-timeout-zero", numPartitions = 10, replicationFactor = 3)), timeout = 0),
-      Map("error-timeout-zero" -> error(Errors.REQUEST_TIMED_OUT)), checkErrorMessage = false)
-    // Negative timeouts are treated the same as 0
-    validateErrorCreateTopicsRequests(topicsReq(Seq(
-      topicReq("error-timeout-negative", numPartitions = 10, replicationFactor = 3)), timeout = -1),
-      Map("error-timeout-negative" -> error(Errors.REQUEST_TIMED_OUT)), checkErrorMessage = false)
-    // The topics should still get created eventually
-    TestUtils.waitForPartitionMetadata(servers, "error-timeout", 0)
-    TestUtils.waitForPartitionMetadata(servers, "error-timeout-zero", 0)
-    TestUtils.waitForPartitionMetadata(servers, "error-timeout-negative", 0)
-    validateTopicExists("error-timeout")
-    validateTopicExists("error-timeout-zero")
-    validateTopicExists("error-timeout-negative")
+    if (!isKRaftTest()) {

Review comment:
       good idea. 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-unsubscribe@kafka.apache.org

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