This is an automated email from the ASF dual-hosted git repository.
schofielaj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new c38476fbd98 MINOR: Fix typo in KafkaApisTest (#20720)
c38476fbd98 is described below
commit c38476fbd980565238783dc0db9233f766f8f4c5
Author: jimmy <[email protected]>
AuthorDate: Sat Oct 18 01:07:00 2025 +0800
MINOR: Fix typo in KafkaApisTest (#20720)
While bumping the API version for `ShareFetchRequest`, two failed tests
occurred: <img width="585" height="77" alt="image"
src="https://github.com/user-attachments/assets/b9908884-73fc-483d-952e-846e5de231e4"
/>
This pull request corrects the usage of the API key version when
building a `ShareAcknowledgeRequest` in the Kafka API tests. The change
ensures that the request uses the appropriate API key for share
acknowledgement instead of share fetch.
Reviewers: Andrew Schofield <[email protected]>
---
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
b/core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
index bdd62291407..3d801536072 100644
--- a/core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
+++ b/core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
@@ -7492,7 +7492,7 @@ class KafkaApisTest extends Logging {
).iterator))
).iterator))
- val shareAcknowledgeRequest = new
ShareAcknowledgeRequest.Builder(shareAcknowledgeRequestData).build(ApiKeys.SHARE_FETCH.latestVersion)
+ val shareAcknowledgeRequest = new
ShareAcknowledgeRequest.Builder(shareAcknowledgeRequestData).build(ApiKeys.SHARE_ACKNOWLEDGE.latestVersion)
val topicNames = util.Map.of(topicId1, "foo1", topicId2, "foo2")
val erroneous = mutable.Map[TopicIdPartition,
ShareAcknowledgeResponseData.PartitionData]()
@@ -7554,7 +7554,7 @@ class KafkaApisTest extends Logging {
).iterator))
).iterator))
- val shareAcknowledgeRequest = new
ShareAcknowledgeRequest.Builder(shareAcknowledgeRequestData).build(ApiKeys.SHARE_FETCH.latestVersion)
+ val shareAcknowledgeRequest = new
ShareAcknowledgeRequest.Builder(shareAcknowledgeRequestData).build(ApiKeys.SHARE_ACKNOWLEDGE.latestVersion)
val topicIdNames = util.Map.of(topicId1, "foo1") // topicId2 not present
in topicIdNames
val erroneous = mutable.Map[TopicIdPartition,
ShareAcknowledgeResponseData.PartitionData]()