Hi Luke, re LC1: A test can run against an older Kafka image. If it needs a feature that release does not have, it checks the running cluster first and skips instead of failing (f.e., the cordon log dir test needs 4.3. Against a 4.2 cluster it is skipped with "Requires metadata.version 4.3-IV0, cluster has 4.2-IV1" or somiething like this).
re LC2.1: Yes. The first tests are ports of the existing Python tests with the same scenario and assertions. Tests that need ZK brokers (new clients against 2.x brokers) should stay in Python. re LC2.2: Yes, during the transition. Python stays the release system test run, and the Java test suite runs alongside it. A Python test is removed only after its Java port has agreed with it for a release cycle, so over time the Python set shrinks. re LC2.3: Java. New STs should be written in Java only, and Python is kept just for tests that have not been ported yet or need ZooKeeper. re LC3: Yes. When a test suite fails, the full output of every broker, controller and companion container (i.e., clients, Connect, Streams, KDC) is written to *build/test-logs/<run>/<class>/<test>/<invocation>/attempt-N/, *basically one file per container. Container stdout/err is also streamed into a JUnit report with a container prefix, such as `kafka-1 | ...`, so a passing test still has its logs in the report. re LC4: Yes. I will update the KIP. Thanks for pointing this out. ----- Hi Fede, re FV0: Yes, good catch. I will update the KIP. re FV1: You can try it on this branch https://github.com/see-quick/kafka/commits/systemtests-upstream/. HW spec is Apple M3 Pro (12 cores, 36 GB), with Podman given 6 CPUs and ~15 GB. To reproduce it simply you can try on branch for i.) ducktape = ./tests/docker/ducker-ak up -n 9 && ./tests/docker/ducker-ak test ./tests/kafkatest/tests/client/compression_test.py and for ii.) testcontainers ./gradlew :systemtests:systemTest --tests '*CompressionST.testAllCompressionsConcurrently*' and that should give you the results. re FV2: I wanted to avoid putting too much specific and explicit implementation details. A lot of failures are handled by the Toxiproxy container (i.e., add latency, limit bandwidth, cut connections). Also even network partition is done via Toxiproxy. Compared with ducktape, isolate partitions one node from the rest, not two arbitrary groups of nodes as Troghor NetworkPartitionFaulSpec can. Log directory failure uses the same method as ducktape (i.e., runs chmod -R a-w) on that directory inside the broker container. The broker tkaes the directory offline on its next write while staying up. Some of the minimal examples are for instance (for partition i.e., isolated leader i s fenced and replaced, then rejoins the ISR): ``` @ClusterSystemTest(types = Type.KRAFT, brokers = 3, controllers = 1) void testIsolatedLeaderIsFencedAndReplaced(ClusterInstance cluster) throws Exception { cluster.createTopic(TOPIC, 1, (short) 3, Map.of("min.insync.replicas", "2")); int leader = BrokerFailureUtils.partitionLeader(cluster, TOPIC, 0); BrokerFailureUtils.networkFaults(cluster).isolate(leader); BrokerFailureUtils.waitForFenced(cluster, leader); BrokerFailureUtils.waitForNewLeader(cluster, TOPIC, 0, leader); BrokerFailureUtils.networkFaults(cluster).reconnect(leader); BrokerFailureUtils.waitForIsrSize(cluster, TOPIC, 0, 3); } ``` Specifically to the Trogdor. This KIP does not make Trogdor redundant. The container suite currently does not use it, but Trogdor provides more than faults (e.g., workloads = produce/consume and round-trip benchmarks) so those tests stays in the ducktape for now. Whether Trogdor can be retired once they are ported would be a separate proposal probably. re FV3: Here is example of one of the test cases ``` 2026-10-27_14-06-33_656 # run (session timestamp) └── ConnectShutdownST # test class └── testParallelCleanRestartsUnderLoad # test method └── testParallelCleanRestartsUnderLoad__1__Type_Container-Isolated__..._b034ff6e # invocation └── attempt-1 # retry attempt ├── connect-worker-1.log # companions: connect-*, client-*, streams-* ├── connect-worker-2.log ├── connect-worker-3.log ├── connect-worker-4.log ├── kafka-broker-1.log # nodes: kafka-<broker|controller|combined>-<id>.log └── kafka-controller-0.log ``` These directories are only written for failed tests.Each file is that container's full output. re FV4: It is not a Testcontainers limitation. Old clients against a new broker only need the old release jars, so those tests can be ported. The gap is old brokers: the official images start at 3.7, so brokers from 3.0 to 3.6 (KRaft), and 2.x brokers (ZooKeeper), would need a launcher that runs them from the release archive, plus a ZooKeeper container for 2.x. Agree on two frameworks ... ducktape should go once that is done and the rest is ported. re FV5: ClusterInstance is the same interface as for @ClusterTest. The container implementation adds node operations by id, and the suite adds helpers on top: i.) fault injection on a single node (i.e., shutdown broker, kill broker/controller, restart broker, fail log dir, wipe node data). Commands and CLI tools can be run inside a node container. ii.) waits and lookups (i.e., wait for no under-replicated paritions, active controller, partition leader, wait for fenced/quorum/isr and so on ...). And a lot might be added. Cheers, Maros ut 17. 11. 2026 o 12:40 Federico Valeri <[email protected]> napísal(a): > Hi Maros, thanks for the KIP. > > FV0: One of the major benefits here is the possibility to thoroughly test > the official Docker images that users actually deploy. I would make this > more prominent in the motivation section. > > FV1: The proposal states "the compression test went from ~85s to ~12s." Can > you add the exact test name and relevant details about the test hardware? > How can someone try this test locally to reproduce the comparison? > > FV2: "Network partitions, latency and bandwidth limits; log directory > failures." Ducktape implements network faults through iptables rules over > SSH, which is clunky but well understood. How does the container approach > implement network partitions, latency injection, and bandwidth constraints? > Would this also make Trogodor redundant? If so, it would be worth stating > explicitly. A minimal example for both network partition and log directory > failure would make the proposal much more concrete. > > FV3: Ducktape collects logs from every node into a structured results > directory, organized by test, service, and node, and these artifacts are > essential for debugging failures, especially in CI. Does the new suite > provide anything equivalent? A concrete example of the results layout would > help. > > FV4: "Replace Ducktape entirely: not possible for compatibility coverage of > releases older than 4.0, such as 2.x clients." Can you expand on this? Is > this an inherent limitation of the Testcontainers approach (no Docker > images for older releases), a consequence of the KRaft-only design, or > something else? Maintaining two entirely different system test frameworks > indefinitely is not viable IMO. > > FV5: The proposal is thin on the ClusterInstance API surface. What does > that object expose? Can it return individual broker containers for targeted > fault injection? Can it expose JMX metrics? Can it wait for partition > reassignment to complete? The existing Ducktape services have rich APIs > (await_no_under_replicated_partitions(), controller(), signal_node()) built > up over years. > > Cheers > Fede > > > On Thu, Nov 12, 2026 at 1:38 PM Maroš Orsák <[email protected]> > wrote: > > > Hello, > > > > I would like to start a discussion on KIP-1393. All details in the KIP: > > > > > https://cwiki.apache.org/confluence/spaces/KAFKA/pages/462816417/KIP-1393+Container-based+system+tests+with+JUnit+and+Testcontainers > > < > > > https://cwiki.apache.org/confluence/spaces/KAFKA/pages/462816417/KIP-1393+Container-based+system+tests+with+JUnit+and+Testcontainers > > > > > > > Related discussion to this topic: > > https://lists.apache.org/thread.html/t7o4c1nxvx4bpf7387f07hmqj7fcqgbh. > > > > Cheers, > > > > Marios > > >
