Skip to content

KAFKA-18368 Remove TestUtils#MockZkConnect and remove zkConnect from TestUtils#createBrokerConfig#18352

Merged
chia7712 merged 24 commits intoapache:trunkfrom
m1a2st:KAFKA-18368
Jan 7, 2025
Merged

KAFKA-18368 Remove TestUtils#MockZkConnect and remove zkConnect from TestUtils#createBrokerConfig#18352
chia7712 merged 24 commits intoapache:trunkfrom
m1a2st:KAFKA-18368

Conversation

@m1a2st
Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st commented Dec 30, 2024

as title

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions Bot added triage PRs from the community core Kafka Broker tests Test fixes (including flaky tests) labels Dec 30, 2024
@m1a2st
Copy link
Copy Markdown
Collaborator Author

m1a2st commented Dec 30, 2024

This PR should wait for KAFKA-18730

Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m1a2st thanks for this patch!

private def createTopic(topic: String, numPartitions: Int, leader: Int): Unit = {
val assignment = (0 until numPartitions).map { i => i -> Seq(leader) }.toMap
TestUtils.createTopic(null, topic, assignment, servers)
val adminZkClient = new AdminZkClient(null)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is disabled, so we can just comment the code TestUtils.createTopic(null, topic, assignment, servers)

@@ -173,14 +173,14 @@ class KafkaApisTest extends Logging {
overrideProperties: Map[String, String] = Map.empty,
featureVersions: Seq[FeatureVersion] = Seq.empty): KafkaApis = {
val properties = if (raftSupport) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove raftSupport as well?

Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m1a2st thanks for update. This PR removes several test cases. We should carefully review each case to determine if it's exclusively related to ZooKeeper or if it should be rewritten with KRaft. If a more thorough investigation is required, we can create a follow-up issue to address the removal of the raftSupport flag.

}

@Test
def testEnableDefaultUncleanLeaderElection(): Unit = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we did not have such test case before?

@@ -614,136 +288,12 @@ class KafkaApisTest extends Logging {
assertEquals(cgConfigs.size, configs.size)
}

@Test
def testAlterConfigsClientMetrics(): Unit = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why to remove this test case? Does this scenario belong to zk only?

@m1a2st
Copy link
Copy Markdown
Collaborator Author

m1a2st commented Dec 31, 2024

Thanks for @chia7712 comment, I open a Jira to trace it.
https://issues.apache.org/jira/browse/KAFKA-18380

@github-actions github-actions Bot removed the triage PRs from the community label Dec 31, 2024
@chia7712
Copy link
Copy Markdown
Member

chia7712 commented Jan 4, 2025

@m1a2st could you please check the failed tests?

@m1a2st
Copy link
Copy Markdown
Collaborator Author

m1a2st commented Jan 4, 2025

@chia7712, the fail test will deal in this #18354

@chia7712
Copy link
Copy Markdown
Member

chia7712 commented Jan 4, 2025

@m1a2st could you please disable the failed tests if they will be handled by #18354

)
}

@Disabled("KAFKA-18730")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: KAFKA-18370

verify(mockBlockingSend).sendRequest(any())
}

@Disabled("KAFKA-18730")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

assertEquals(3, mockNetwork.fetchCount)
}

@Disabled("KAFKA-18730")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

"Expected " + t2p1 + " to truncate to offset 172 (truncation offsets: " + truncateToCapture.getAllValues + ")")
}

@Disabled("KAFKA-18730")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

" (truncation offsets: " + truncateToCapture.getAllValues + ")")
}

@Disabled("KAFKA-18730")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@chia7712 chia7712 merged commit d874aa4 into apache:trunk Jan 7, 2025
chia7712 pushed a commit that referenced this pull request Jan 7, 2025
…TestUtils#createBrokerConfig (#18352)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
ijuma added a commit to ijuma/kafka that referenced this pull request Jan 8, 2025
…og-compaction-write-record-v2

* apache-github/trunk: (34 commits)
  MINOR: Bump year to 2025 in NOTICE file (apache#18427)
  KAFKA-18411 Remove ZkProducerIdManager (apache#18413)
  KAFKA-18408 tweak the 'tag' field for BrokerHeartbeatRequest.json, BrokerRegistrationChangeRecord.json and RegisterBrokerRecord.json (apache#18421)
  KAFKA-18414 Remove KRaftRegistrationResult (apache#18401)
  KAFKA-17921 Support SASL_PLAINTEXT protocol with java.security.auth.login.config (apache#17671)
  KAFKA-18384 Remove ZkAlterPartitionManager (apache#18364)
  KAFKA-10790: Add deadlock detection to producer#flush (apache#17946)
  KAFKA-18412: Remove EmbeddedZookeeper (apache#18399)
  MINOR : Improve Exception log in NotEnoughReplicasException(apache#12394)
  MINOR: Improve PlaintextAdminIntegrationTest#testConsumerGroups (apache#18409)
  MINOR: Remove unused local variable (apache#18410)
  MINOR: Remove RaftManager.maybeDeleteMetadataLogDir and AutoTopicCreationManagerTest.scala (apache#17365)
  KAFKA-18368 Remove TestUtils#MockZkConnect and remove zkConnect from TestUtils#createBrokerConfig (apache#18352)
  MINOR: Update Consumer group timeout default to 30 sec (apache#16406)
  MINOR: Fix typo in CommitRequestManager (apache#18407)
  MINOR: cleanup JavaDocs for deprecation warnings (apache#18402)
  KAFKA-18303; Update ShareCoordinator to use new record format (apache#18396)
  MINOR: Update Consumer and Producer JavaDocs for committing offsets (apache#18336)
  KAFKA-16446: Improve controller event duration logging (apache#15622)
  KAFKA-18388 test-kraft-server-start.sh should use log4j2.yaml (apache#18370)
  ...
pranavt84 pushed a commit to pranavt84/kafka that referenced this pull request Jan 27, 2025
…TestUtils#createBrokerConfig (apache#18352)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
manoj-mathivanan pushed a commit to manoj-mathivanan/kafka that referenced this pull request Feb 19, 2025
…TestUtils#createBrokerConfig (apache#18352)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker performance tests Test fixes (including flaky tests) tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants