Repository navigation
test(binding-kafka): pair the broker-addressed api request application clients with servers - #3215
Merged
jfallows merged 2 commits intoNov 15, 2026
Conversation
…n clients with servers The application scripts create.topics.v7.broker, .broker.zero and .broker.unknown had only a client side. Add a server.rpt for each, with the meta stream and the api request stream accepted on one address, and run each pair in the application KafkaCreateTopicsIT. The servers assert the affinity of the api request stream with read option zilla:affinity. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SiHVoWg6hhUVBcwYK2kzwC
…ffinity' into test/3212-kafka-api-broker-application-servers
jfallows
changed the base branch from
develop
to
fix/3210-kafka-cache-propagate-affinity
November 14, 2026 21:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The application scripts for raw API requests addressed to a broker by affinity (
create.topics.v7.broker,.broker.zero,.broker.unknownunderstreams/application/api) had only a client side, so the application-level spec IT could not run them as a pair. Each now has aserver.rpt, and the existing applicationKafkaCreateTopicsIThas a method per pair:shouldCreateTopicsV3ToBrokerByAffinity,shouldCreateTopicsV3ToBrokerZeroWhenKnown,shouldRejectCreateTopicsV3ToUnknownBroker.Each server accepts the meta stream and then the API request stream on the same accept address, with two
acceptedblocks in one script, and serves the partitions the client expects (broker ids 1 and 2, or 0 and 1 for the zero case)..brokerand.broker.zero: the API request stream asserts its affinity withread option zilla:affinity ${affinity}(2 and 0, matching the client's script property), then reads the CreateTopics v7 request and writes the response..broker.unknown: the second stream isrejected, matching the client'sconnect aborted.Mirrored pattern
streams/application/produce/message.value/server.rpt: oneaccept, a firstacceptedfor the meta stream that writes the begin and data extensions, then a secondacceptedfor the other stream. The rejection mirrorsproduce/topic.missing/server.rpt. The per-stream affinity assertion usesread option zilla:affinity, as in the mqtt-kafka spec scripts, because an accept-level option cannot differ between the two streams. The API request body mirrorscreate.topics.v7.affinity/server.rpt.No existing client script was changed, and none violated the protocol.
Fixes #3212
Test evidence
Before the change, the application
KafkaCreateTopicsIThad 4 methods and none of the three new ones existed.Setup: upstream installed with
-am -DskipTests -DskipITs -Dskip.checks=true, using systemmvn3.9.11 because themvnwwrapper could not run here.clean verify -pl specs/binding-kafka.spec -Dit.test=KafkaCreateTopicsIT: application class 7 of 7, network class 11 of 11.mvn -U clean verify -pl specs/binding-kafka.spec,runtime/binding-kafka -Dmaven.build.cache.skipCache=truewith checkstyle, license and notice checks on: BUILD SUCCESS.specs/binding-kafka.spec: unit tests 226 run, 0 failures; ITs 475 run, 0 failures, 12 skipped.runtime/binding-kafka: unit tests 229 run, 0 failures; ITs 447 run, 0 failures, 67 skipped; runtimeKafkaCreateTopicsIT13 of 13, which exercises the unchanged client scripts.ClassNotFoundException: JUnit4Provider) and passed unchanged with-U.license:formatproduced no further changes.What I did not run
runtime/engine.develop.Not delivered
produce/topic.missing.Generated by Claude Code