Browse Source

KAFKA-8086: Use 1 partition for offset topic when possible (#7356)

I realized some flaky tests failed at setup or calls that tries to create offset topics, and I think using one partition and one replica would be sufficient in these cases.

Reviewers: Bill Bejeck <bill@confluent.io>
pull/7388/head
Guozhang Wang 5 years ago committed by GitHub
parent
commit
b4035610b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala
  2. 4
      core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala
  3. 1
      core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala

1
core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala

@ -132,6 +132,7 @@ class AuthorizerIntegrationTest extends BaseRequestTest { @@ -132,6 +132,7 @@ class AuthorizerIntegrationTest extends BaseRequestTest {
properties.put(KafkaConfig.AuthorizerClassNameProp, classOf[SimpleAclAuthorizer].getName)
properties.put(KafkaConfig.BrokerIdProp, brokerId.toString)
properties.put(KafkaConfig.OffsetsTopicPartitionsProp, "1")
properties.put(KafkaConfig.OffsetsTopicReplicationFactorProp, "1")
properties.put(KafkaConfig.TransactionsTopicPartitionsProp, "1")
properties.put(KafkaConfig.TransactionsTopicReplicationFactorProp, "1")
properties.put(KafkaConfig.TransactionsTopicMinISRProp, "1")

4
core/src/test/scala/integration/kafka/network/DynamicConnectionQuotaTest.scala

@ -65,10 +65,6 @@ class DynamicConnectionQuotaTest extends BaseRequestTest { @@ -65,10 +65,6 @@ class DynamicConnectionQuotaTest extends BaseRequestTest {
}
}
override protected def brokerPropertyOverrides(properties: Properties): Unit = {
super.brokerPropertyOverrides(properties)
}
@Test
def testDynamicConnectionQuota(): Unit = {
val maxConnectionsPerIP = 5

1
core/src/test/scala/unit/kafka/server/MetadataRequestTest.scala

@ -36,6 +36,7 @@ import scala.collection.Seq @@ -36,6 +36,7 @@ import scala.collection.Seq
class MetadataRequestTest extends BaseRequestTest {
override def brokerPropertyOverrides(properties: Properties): Unit = {
properties.setProperty(KafkaConfig.OffsetsTopicPartitionsProp, "1")
properties.setProperty(KafkaConfig.DefaultReplicationFactorProp, "2")
properties.setProperty(KafkaConfig.RackProp, s"rack/${properties.getProperty(KafkaConfig.BrokerIdProp)}")
}

Loading…
Cancel
Save