Skip to content

test(core) #40: one harness for the vanilla MockConsumer tests, not five copies - #206

Open
astubbs wants to merge 9 commits into
masterfrom
refactor/40-mockconsumer-test-dedup
Open

test(core) #40: one harness for the vanilla MockConsumer tests, not five copies#206
astubbs wants to merge 9 commits into
masterfrom
refactor/40-mockconsumer-test-dedup

Conversation

@astubbs

@astubbs astubbs commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Closes #40 - the first half by extraction, the second by a documented verdict (see Secondary audit below).

Description

The six MockConsumer* test classes each carried their own copy of the same wiring: build a MockConsumer, hand-rebalance the partition in, tell PC about it separately, update beginning offsets, construct and subscribe PC, feed records, collect them out of the user function, tear down. The similarity check flagging two of them at 70.7% on #34 is the symptom; the cause is that the wiring was copied rather than shared, so it drifted - the daemon-thread comment about PIT attributing a stray addRecord() to whatever test runs next in the JVM appears verbatim in two files, and its cleanup exists only in those two.

MockConsumerTestBase now owns that wiring. A scenario supplies its failure behaviour (createMockConsumer()) and the options it needs (customiseOptions(..)), and nothing else.

  • It deliberately does not extend AbstractParallelEoSStreamProcessorTestBase. That base wires a Mockito-spied LongPollingMockConsumer and a MockProducer; the whole subject of these tests is what PC does when the consumer misbehaves in ways only a hand-written MockConsumer subclass can express. The javadoc says so, so a future session does not "fix" it.
  • CommitRejectionTestBase, which had already extracted its own half of the same wiring, now sits on the harness too - so a third rejection reason is one method rather than another copy.

Deliberately left duplicated: every scenario keeps its own Awaitility block, with its own timeout, in its own file. Those are the point of each test, and the timeouts are scenario-specific - each has to clear that scenario's simulated outage window. Hoisting them would mean opening two files to learn what a test actually checks, which is a net loss even though it would cut more lines.

Teardown is now uniform and strictly stronger than what it replaced: the record feed is interrupted and joined (it was interrupted only, and only in two of the classes), before PC is closed rather than after, and Awaitility.reset() runs first so a throwing close cannot skip it.

Teardown closes PC with close(), which is the non-draining close (DrainingCloseable.close() delegates to closeDontDrainFirst()). Review flagged that CommitRejectionTestBase was overriding a closeParallelConsumer() hook to call closeDontDrainFirst() explicitly - functionally identical to the default, so the hook had no real user and its javadoc ("override where draining first is wrong") stated the opposite of what the default did. Hook and override both removed; the fact is now a comment at the one place that closes.

Two real defects found on the way

  • @Timeout(60000L) on three of these classes meant 60000 seconds - JUnit's default unit - i.e. no timeout at all. Replaced with @Timeout(120) on the base (@Timeout is @Inherited), real headroom over the longest scenario (25s measured) and an actual guard against a wedged MockConsumer test.
  • MockConsumerRebalanceInProgressTest's javadoc still linked MockConsumerTestWith{CommitTimeout,SaslAuthentication}Exception, renamed away in dc44e20. javac does not check {@link} without doclint, so it rotted silently.

One assertion added, none weakened

MockConsumerEarlyCloseTest asserted only that close() returned. It now also asserts PC ended closed with no failure cause - "shut down cleanly", as its javadoc has always claimed, rather than "died in a way that also reports closed". Verified to hold.

Secondary audit (#40's second half): done, deliberately not acted on

The remaining high-similarity pairs across src/test/ and src/test-integration/ are overwhelmingly cross-module clones - MutinyBatchTest/ReactorBatchTest ~94%, MutinyPCTest/ReactorPCTest ~86%. Deduplicating those means a generified test base in core's test-jar that each module parameterises with its own processor type: a different and much larger job, and exactly the scope creep #40 says it does not want. The one within-module pair above the check's fail_above: 80 (TransactionAndCommitModeTest/VeryLargeMessageVolumeTest, ~88%) is broker ITs and wants Docker to verify, not a desk refactor. The TestConventionsArchTest x4 at ~98% are already documented as irreducible.

All of it is ranked with a verdict in docs/refactoring.md so the next reader does not re-derive the audit. ProducerManagerTest, named in the issue, turned out to have no cross-file duplication left: it already uses the shared PCModuleTestEnv/ModelUtils infrastructure, and what it repeats is one line of Awaitility.reset().

Similarity check: the prediction was wrong, and the numbers are in. This PR expected the
extraction to push CommitRejectionTestBaseMockConsumerTestBase to ~70% - two small abstract
harnesses in one package sharing imports. It did not happen: neither file appears in the report at
all
, against anything, and the check's reporting floor is 30%. What the run actually shows is the
thing #40 asked for - the MockConsumer*Test scenarios now pair in the 34-37% band
(CommitTimeoutEarlyClose and CommitTimeoutSasl around 37%, EarlyCloseSasl around
34.5%), down from the 70.7% that #34 flagged. The measure is corpus-relative, so the
decimals drift with unrelated changes - this pair moved 37.49 -> 37.43 across the master merge, which
touched none of these files; the band is the durable part. PMD CPD: no new clones, duplication -0.39%. jscpd: -0.42%, and its one "new clone" is the
8-line package + copyright + import block shared by MockConsumerEarlyCloseTest and
MockConsumerSaslAuthenticationTest, every line of which both files use. Docs corrected to the
measured values rather than the estimate.

Notes

  • MockConsumerTestBase is an extraction from upstream-derived files, so it keeps the Confluent header plus the modifications line and is registered in EXTRACTED_FROM_UPSTREAM in bin/check-copyright-headers.sh.
  • No product code changed - test sources, one scanner registration, and docs.

Verification

  • The six tests pass, three consecutive runs, no intermittency (nothing became flaky).
  • Full unit suite (bin/ci-unit-test.sh, all modules): green.
  • bin/check-copyright-headers.sh and its self-test: green.

Checklist

  • Docs updated - docs/inflight/test-mockconsumer-harness.md (how to add a scenario, and how to read a similarity comment about these files) and docs/refactoring.md (the deferred cross-module audit)
  • Tests added/updated - this PR is entirely test work; the six tests test the same things, plus one strengthened assertion in MockConsumerEarlyCloseTest
  • Title & body reflect the final content of this PR
  • Self-hosted runner / security implications considered - N/A - no workflow or runner changes; the only non-test file is a path registration in bin/check-copyright-headers.sh

…ive copies

The six MockConsumer* test classes each carried their own copy of the same
wiring: build a MockConsumer, hand-rebalance the partition in, tell PC about it
separately, update beginning offsets, construct and subscribe PC, feed records,
collect them out of the user function, then tear down. The file-similarity check
flagged two of them at 70.7% on #34 and kept flagging them afterwards, which is
the symptom; the cause is that the wiring was copied rather than shared, so it
drifted - the daemon-thread comment about PIT attributing a stray addRecord() to
the next test in the JVM appears verbatim in two files, and its cleanup only in
those two.

MockConsumerTestBase now owns that wiring. A scenario supplies the failure
behaviour (createMockConsumer) and the options it needs (customiseOptions), and
nothing else. It deliberately does NOT extend
AbstractParallelEoSStreamProcessorTestBase: that base wires a Mockito-spied
LongPollingMockConsumer, and the subject of these tests is what PC does when the
consumer misbehaves in ways only a hand-written MockConsumer subclass can
express. CommitRejectionTestBase, which had already extracted its own half of the
same wiring, now sits on the harness too, so a third rejection reason is one
method rather than another copy.

Deliberately left duplicated: each scenario keeps its own Awaitility block, with
its own timeout, in its own file. They are the point of the test, and the
timeouts are scenario-specific - each has to clear that scenario's simulated
outage window. Hoisting them would have made the base the only place the
assertions live, and a reader would have to open two files to learn what a test
checks.

Teardown is now uniform and strictly stronger than what it replaced: the record
feed is interrupted AND joined (previously interrupted only, and only in two of
the classes), before PC is closed rather than after, and Awaitility.reset() runs
first so it cannot be skipped by a throwing close.

Two real defects found on the way:

- @timeout(60000L) on three of these classes meant 60000 SECONDS - JUnit's
  default unit - i.e. no timeout at all. Replaced by @timeout(120) on the base
  (@timeout is @inherited), which is real headroom over the longest scenario
  (25s measured) and a genuine guard against a wedged MockConsumer test.
- MockConsumerRebalanceInProgressTest's javadoc still linked
  MockConsumerTestWith{CommitTimeout,SaslAuthentication}Exception, renamed away
  in dc44e20. javac does not check {@link} without doclint, so it rotted
  silently.

MockConsumerEarlyCloseTest gains an assertion it never had: it asserted only that
close() returned. It now also asserts PC ended closed with no failure cause -
"shut down cleanly" as the javadoc has always claimed, rather than "died in a way
that also reports closed".

Secondary audit (the second half of #40) done but not acted on: the remaining
high-similarity pairs in the test tree are overwhelmingly cross-module clones
(Mutiny/Reactor ~94%), which need a generified base in core's test-jar - a
different and much larger job. Ranked with verdicts in docs/refactoring.md so it
is not re-derived. The one within-module pair above the check's fail threshold
(TransactionAndCommitModeTest/VeryLargeMessageVolumeTest, ~88%) is broker ITs and
wants Docker to verify, not a desk refactor.

Verification: the six tests pass, three consecutive runs, no intermittency; full
unit suite (bin/ci-unit-test.sh, all modules) green.

MockConsumerTestBase is an extraction from upstream-derived files, so it carries
the Confluent header plus the modifications line and is registered in
EXTRACTED_FROM_UPSTREAM.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 8m 52s —— View job


Claude is reviewing this PR

Todo list

  • Gather context (PR diff, changed files, description)
  • Understand the request (code review requested via /code-review)
  • Read the full diff of all 10 changed files
  • Verify the two claimed pre-existing bugs (@Timeout(60000L) unit bug, stale {@link})
  • Run the six affected MockConsumer* tests directly to confirm green
  • Run bin/check-copyright-headers.sh
  • Run full unit suite (bin/ci-unit-test.sh) for regression confidence
  • Post final review feedback

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ Duplicate Code Report

Two engines run in parallel for cross-validation. Each has its own thresholds tuned to its baseline - the real safety net is the per-engine "max increase vs base" check.

✅ PMD CPD

PR Base Change
Clones 24 28 🙂 -4
Duplicated lines 718 850 ❤️ -132
Duplication 2.11% 2.50% 👍 -0.39%
Rule Limit Status
Max duplication 5% ✅ Pass (2.11%)
Max increase vs base +0.1% ✅ Pass (-0.39%)

No new clones introduced by this PR.

✅ jscpd (language-agnostic)

PR Base Change
Clones 66 75 👍 -9
Duplicated lines 948 1087 ❤️ -139
Duplication 2.81% 3.23% 👍 -0.42%
Rule Limit Status
Max duplication 5% ✅ Pass (2.81%)
Max increase vs base +0.1% ✅ Pass (-0.42%)
⚠️ 1 new clones introduced
  • 8 lines: parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerEarlyCloseTest.java:9 <-> parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerSaslAuthenticationTest.java:8

Powered by astubbs/duplicate-code-cross-check

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

📌 Duplicate code detection tool report

The tool analyzed your source code and found the following degree of similarity between the files:

🆕 New file similarities introduced

File A File B Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java parallel-consumer-vertx/src/test-integration/java/io/confluent/parallelconsumer/vertx/integrationTests/VertxConcurrencyIT.java 30.1
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/AbstractParallelEoSStreamProcessorTestBase.java parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java 30.0

🔺 Increased similarities

File A File B Base (%) PR (%) Change
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContext.java parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/RecordContextInternal.java 35.5 38.3 +2.8
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyTest.java parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorTest.java 32.5 33.3 +0.9
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSSStreamProcessorRebalancedTest.java parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java 34.7 35.0 +0.3
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceEoSDeadlockTest.java parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceTest.java 36.4 36.6 +0.2
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java parallel-consumer-vertx/src/test-integration/java/io/confluent/parallelconsumer/vertx/integrationTests/VertxConcurrencyIT.java 39.2 39.4 +0.2
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 54.8 54.9 +0.1
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/AbstractRevokeUnderWorkScenario.java parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java 48.8 48.9 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 61.0 61.1 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 32.4 32.5 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 30.1 30.3 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java 37.0 37.1 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 32.6 32.7 +0.1
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosScenarioBase.java 38.0 38.1 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/TestParallelEoSStreamProcessor.java 31.1 31.2 +0.1
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ExceptionConstructorsTest.java parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/InternalRuntimeExceptionTest.java 30.1 30.1 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java 32.7 32.8 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 50.6 50.7 +0.1
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineLaneReportScriptTest.java parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineRegistryScriptTest.java 33.5 33.5 +0.1
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 40.4 40.4 +0.1
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CheckQuarantineOwnersScriptTest.java parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineLaneReportScriptTest.java 45.1 45.2 +0.1

...and 22 more

Full similarity report
parallel-consumer-core/src/main/java/io/confluent/csid/utils/Java8StreamUtils.java

📄 parallel-consumer-core/src/main/java/io/confluent/csid/utils/Java8StreamUtils.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/csid/utils/JavaUtils.java 35.34
parallel-consumer-core/src/test/java/io/confluent/csid/utils/CollectionUtils.java 33.28
parallel-consumer-core/src/main/java/io/confluent/csid/utils/JavaUtils.java

📄 parallel-consumer-core/src/main/java/io/confluent/csid/utils/JavaUtils.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/csid/utils/CollectionUtils.java 39.54
parallel-consumer-core/src/main/java/io/confluent/csid/utils/Java8StreamUtils.java 35.34
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 54.08 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 40.02
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PCRetriableException.java 36.81
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 36.61
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 35.04
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 34.95
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 34.95
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 33.51
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 61.09 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 54.9 ⚠️
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 40.43
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java 37.13
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java 32.76
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 31.46
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java 61.09 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 50.73 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java 36.76
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 32.53
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java 31.67
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 30.28
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PCRetriableException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PCRetriableException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 36.81
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 33.07
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 54.08 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 53.03 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 44.62
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 34.77
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 33.12
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalRuntimeException.java 30.86
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 30.68
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 30.68
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerOptions.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerOptions.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ProducerManager.java 32.14
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java 54.9 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 50.73 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java 45.51
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java 33.96
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/AbstractParallelEoSStreamProcessor.java 33.04
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/TestParallelEoSStreamProcessor.java 31.18
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 45.51
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java 37.13
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 36.76
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 32.68
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContext.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContext.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/RecordContextInternal.java 38.28
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java 31.63
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 33.96
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java 32.76
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/RecordContextInternal.java 32.07
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 31.67
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContext.java 31.63
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/RecordContextInternal.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/RecordContextInternal.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContext.java 38.28
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PollContextInternal.java 32.07
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/AbstractParallelEoSStreamProcessor.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/AbstractParallelEoSStreamProcessor.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/BrokerPollSystem.java 33.35
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 33.04
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/BrokerPollSystem.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/BrokerPollSystem.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/AbstractParallelEoSStreamProcessor.java 33.35
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ExternalEngine.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ExternalEngine.java

File Similarity (%)
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelEoSStreamProcessor.java 39.52
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 60.35 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 53.03 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 50.39 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java 48.5
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 40.02
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalRuntimeException.java 39.6
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 37.04
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 33.57
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 33.57
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/PCRetriableException.java 33.07
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalRuntimeException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalRuntimeException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 39.6
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 31.44
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 30.86
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/PCModule.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/PCModule.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/PCModuleTestEnv.java 32.78
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ProducerManager.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ProducerManager.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerOptions.java 32.14
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ProducerManagerTest.java 30.44
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 51.58 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 37.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 37.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 37.04
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 35.04
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 34.77
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 32.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 60.35 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 51.58 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 47.9
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 47.06
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 47.06
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java 46.46
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 44.62
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 36.61
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalRuntimeException.java 31.44
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 48.5
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 46.46
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 44.79
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 37.79
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 37.79
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 50.39 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 47.9
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java 44.79
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 33.51
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 33.12
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 32.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 31.14
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 31.14
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java 63.31 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 47.06
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java 37.79
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 37.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 34.95
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 33.57
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 31.14
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 30.68
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV2EncodingNotSupported.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/RunLengthV1EncodingNotSupported.java 63.31 ⚠️
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/EncodingNotSupportedException.java 47.06
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/NoEncodingPossibleException.java 37.79
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/BitSetEncodingNotSupportedException.java 37.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ExceptionInUserFunctionException.java 34.95
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/InternalException.java 33.57
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/offsets/OffsetDecodingError.java 31.14
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelConsumerException.java 30.68
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionState.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionState.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionStateManager.java 30.36
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionStateManager.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionStateManager.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/WorkManager.java 39.59
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionState.java 30.36
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/ProcessingShard.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/ProcessingShard.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/ShardManager.java 36.59
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/ShardManager.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/ShardManager.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/ProcessingShard.java 36.59
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/WorkManager.java

📄 parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/WorkManager.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/state/PartitionStateManager.java 39.59
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/BrokerIntegrationTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/BrokerIntegrationTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/state/LatestResetTailNudgeIT.java 30.61
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/DrainingMemberRebalanceIT.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/DrainingMemberRebalanceIT.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/BrokerPollSystemDrainTest.java 31.01
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/KafkaSanityTests.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/KafkaSanityTests.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/csid/utils/LoopingResumingIteratorTest.java 34.04
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceHighVolumeTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceHighVolumeTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java 55.33 ⚠️
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java 46.89
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceRebalanceTest.java 38.58
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceRebalanceTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceRebalanceTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java 44.12
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java 41.1
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceHighVolumeTest.java 38.58
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceEoSDeadlockTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceEoSDeadlockTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceTest.java 36.63
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/RebalanceEoSDeadlockTest.java 36.63
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java 60.73 ⚠️
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceHighVolumeTest.java 46.89
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceRebalanceTest.java 41.1
parallel-consumer-vertx/src/test-integration/java/io/confluent/parallelconsumer/vertx/integrationTests/VertxConcurrencyIT.java 30.12
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java 60.73 ⚠️
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceHighVolumeTest.java 55.33 ⚠️
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/MultiInstanceRebalanceTest.java 44.12
parallel-consumer-vertx/src/test-integration/java/io/confluent/parallelconsumer/vertx/integrationTests/VertxConcurrencyIT.java 39.37
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/AbstractRevokeUnderWorkScenario.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/AbstractRevokeUnderWorkScenario.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java 48.89
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkIT.java 35.38
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/AbstractRevokeUnderWorkScenario.java 48.89
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosScenarioBase.java 38.13
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkIT.java 30.02
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkCooperativeIT.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkCooperativeIT.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkIT.java 48.94
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkIT.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkIT.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosRevokeUnderWorkCooperativeIT.java 48.94
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/AbstractRevokeUnderWorkScenario.java 35.38
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java 30.02
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosScenarioBase.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosScenarioBase.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/chaostests/ChaosChurnStormIT.java 38.13
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/state/LatestResetTailNudgeIT.java

📄 parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/state/LatestResetTailNudgeIT.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/BrokerIntegrationTest.java 30.61
parallel-consumer-core/src/test/java/io/confluent/csid/utils/CollectionUtils.java

📄 parallel-consumer-core/src/test/java/io/confluent/csid/utils/CollectionUtils.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/csid/utils/JavaUtils.java 39.54
parallel-consumer-core/src/main/java/io/confluent/csid/utils/Java8StreamUtils.java 33.28
parallel-consumer-core/src/test/java/io/confluent/csid/utils/LoopingResumingIteratorTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/csid/utils/LoopingResumingIteratorTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/KafkaSanityTests.java 34.04
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/AbstractParallelEoSStreamProcessorTestBase.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/AbstractParallelEoSStreamProcessorTestBase.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java 30.03
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/BatchTestBase.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/BatchTestBase.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CoreBatchTest.java 30.38
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CheckQuarantineOwnersScriptTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CheckQuarantineOwnersScriptTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineLaneReportScriptTest.java 45.17
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineRegistryScriptTest.java 44.32
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CoreBatchTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CoreBatchTest.java

File Similarity (%)
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorBatchTest.java 51.69 ⚠️
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyBatchTest.java 50.39 ⚠️
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/VertxBatchTest.java 44.55
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/BatchTestBase.java 30.38
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerCommitTimeoutTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerCommitTimeoutTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerEarlyCloseTest.java 37.45
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerSaslAuthenticationTest.java 37.25
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerEarlyCloseTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerEarlyCloseTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerCommitTimeoutTest.java 37.45
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerSaslAuthenticationTest.java 34.26
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerSaslAuthenticationTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerSaslAuthenticationTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerCommitTimeoutTest.java 37.25
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/MockConsumerEarlyCloseTest.java 34.26
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSSStreamProcessorRebalancedTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSSStreamProcessorRebalancedTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java 34.98
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessorTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/ParallelEoSSStreamProcessorRebalancedTest.java 34.98
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/AbstractParallelEoSStreamProcessorTestBase.java 30.03
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineLaneReportScriptTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineLaneReportScriptTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CheckQuarantineOwnersScriptTest.java 45.17
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineRegistryScriptTest.java 33.53
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineRegistryScriptTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineRegistryScriptTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CheckQuarantineOwnersScriptTest.java 44.32
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/QuarantineLaneReportScriptTest.java 33.53
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/TestConventionsArchTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/TestConventionsArchTest.java

File Similarity (%)
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/TestConventionsArchTest.java 90.31 ⚠️
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/TestConventionsArchTest.java 89.65 ⚠️
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/TestConventionsArchTest.java 89.65 ⚠️
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/BrokerPollSystemDrainTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/BrokerPollSystemDrainTest.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/DrainingMemberRebalanceIT.java 31.01
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ExceptionConstructorsTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ExceptionConstructorsTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/InternalRuntimeExceptionTest.java 30.15
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/InternalRuntimeExceptionTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/InternalRuntimeExceptionTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ExceptionConstructorsTest.java 30.15
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/PCModuleTestEnv.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/PCModuleTestEnv.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/PCModule.java 32.78
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ProducerManagerTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/ProducerManagerTest.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ProducerManager.java 30.44
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/TestParallelEoSStreamProcessor.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/internal/TestParallelEoSStreamProcessor.java

File Similarity (%)
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelEoSStreamProcessor.java 31.18
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/offsets/OffsetEncodingBackPressureTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/offsets/OffsetEncodingBackPressureTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/offsets/OffsetEncodingBackPressureUnitTest.java 40.04
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/offsets/OffsetEncodingBackPressureUnitTest.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/offsets/OffsetEncodingBackPressureUnitTest.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/offsets/OffsetEncodingBackPressureTest.java 40.04
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/truth/CommitHistorySubject.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/truth/CommitHistorySubject.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/truth/LongPollingMockConsumerSubject.java 36.24
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/truth/LongPollingMockConsumerSubject.java

📄 parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/truth/LongPollingMockConsumerSubject.java

File Similarity (%)
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/truth/CommitHistorySubject.java 36.24
parallel-consumer-mutiny/src/main/java/io/confluent/parallelconsumer/mutiny/MutinyProcessor.java

📄 parallel-consumer-mutiny/src/main/java/io/confluent/parallelconsumer/mutiny/MutinyProcessor.java

File Similarity (%)
parallel-consumer-reactor/src/main/java/io/confluent/parallelconsumer/reactor/ReactorProcessor.java 52.19 ⚠️
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyBatchTest.java

📄 parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyBatchTest.java

File Similarity (%)
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorBatchTest.java 78.95 ⚠️
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CoreBatchTest.java 50.39 ⚠️
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/VertxBatchTest.java 49.02
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyPCTest.java

📄 parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyPCTest.java

File Similarity (%)
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorPCTest.java 71.18 ⚠️
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyTest.java

📄 parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyTest.java

File Similarity (%)
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorTest.java 33.33
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyUnitTestBase.java

📄 parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyUnitTestBase.java

File Similarity (%)
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorUnitTestBase.java 31.93
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/TestConventionsArchTest.java

📄 parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/TestConventionsArchTest.java

File Similarity (%)
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/TestConventionsArchTest.java 91.08 ⚠️
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/TestConventionsArchTest.java 90.41 ⚠️
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/TestConventionsArchTest.java 89.65 ⚠️
parallel-consumer-reactor/src/main/java/io/confluent/parallelconsumer/reactor/ReactorProcessor.java

📄 parallel-consumer-reactor/src/main/java/io/confluent/parallelconsumer/reactor/ReactorProcessor.java

File Similarity (%)
parallel-consumer-mutiny/src/main/java/io/confluent/parallelconsumer/mutiny/MutinyProcessor.java 52.19 ⚠️
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorBatchTest.java

📄 parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorBatchTest.java

File Similarity (%)
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyBatchTest.java 78.95 ⚠️
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CoreBatchTest.java 51.69 ⚠️
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/VertxBatchTest.java 50.28 ⚠️
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorPCTest.java

📄 parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorPCTest.java

File Similarity (%)
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyPCTest.java 71.18 ⚠️
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorTest.java

📄 parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorTest.java

File Similarity (%)
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyTest.java 33.33
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorUnitTestBase.java

📄 parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorUnitTestBase.java

File Similarity (%)
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyUnitTestBase.java 31.93
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/TestConventionsArchTest.java

📄 parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/TestConventionsArchTest.java

File Similarity (%)
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/TestConventionsArchTest.java 91.08 ⚠️
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/TestConventionsArchTest.java 90.41 ⚠️
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/TestConventionsArchTest.java 89.65 ⚠️
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java

📄 parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java

File Similarity (%)
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelEoSStreamProcessor.java 41.54
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java 40.43
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 39.88
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelStreamProcessor.java 35.45
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 32.53
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java

📄 parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java

File Similarity (%)
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 39.88
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelStreamProcessor.java 39.3
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/ParallelStreamProcessor.java 32.68
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelEoSStreamProcessor.java 31.46
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/JStreamParallelStreamProcessor.java 30.28
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelEoSStreamProcessor.java

📄 parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelEoSStreamProcessor.java

File Similarity (%)
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelStreamProcessor.java 41.62
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 41.54
parallel-consumer-core/src/main/java/io/confluent/parallelconsumer/internal/ExternalEngine.java 39.52
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelStreamProcessor.java

📄 parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelStreamProcessor.java

File Similarity (%)
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/VertxParallelEoSStreamProcessor.java 41.62
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelStreamProcessor.java 39.3
parallel-consumer-vertx/src/main/java/io/confluent/parallelconsumer/vertx/JStreamVertxParallelEoSStreamProcessor.java 35.45
parallel-consumer-vertx/src/test-integration/java/io/confluent/parallelconsumer/vertx/integrationTests/VertxConcurrencyIT.java

📄 parallel-consumer-vertx/src/test-integration/java/io/confluent/parallelconsumer/vertx/integrationTests/VertxConcurrencyIT.java

File Similarity (%)
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/VeryLargeMessageVolumeTest.java 39.37
parallel-consumer-core/src/test-integration/java/io/confluent/parallelconsumer/integrationTests/TransactionAndCommitModeTest.java 30.12
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/TestConventionsArchTest.java

📄 parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/TestConventionsArchTest.java

File Similarity (%)
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/TestConventionsArchTest.java 91.08 ⚠️
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/TestConventionsArchTest.java 91.08 ⚠️
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/TestConventionsArchTest.java 90.31 ⚠️
parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/VertxBatchTest.java

📄 parallel-consumer-vertx/src/test/java/io/confluent/parallelconsumer/vertx/VertxBatchTest.java

File Similarity (%)
parallel-consumer-reactor/src/test/java/io/confluent/parallelconsumer/reactor/ReactorBatchTest.java 50.28 ⚠️
parallel-consumer-mutiny/src/test/java/io/confluent/parallelconsumer/mutiny/MutinyBatchTest.java 49.02
parallel-consumer-core/src/test/java/io/confluent/parallelconsumer/CoreBatchTest.java 44.55

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ SpotBugs Report

No bugs found (new bugs only — baseline from base branch excluded).

@astubbs

astubbs commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

@claude review this

Context for the reviewer: the scheduled claude-review run on this head SHA (run 30979310097) completed with is_error: false after 52 turns but never wrote its findings into its comment - it left two todo items unchecked and posted no inline comments. So this PR has not actually been reviewed yet. Please do a full review pass.

Particular things worth your attention:

  • The teardown ordering in the new MockConsumerTestBase (Awaitility.reset(), then interrupt and join the feed thread, then close PC) - is that ordering actually safe for all six scenarios?
  • @Timeout(120) on the base relies on @Timeout being @Inherited. Please verify that inheritance actually applies to the subclasses.
  • MockConsumerEarlyCloseTest gained an assertion (getFailureCause() is null). Is that assertion actually meaningful, or can it pass vacuously?

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 6m 27s —— View job


Claude finished the review

Todo list

  • Gather context (PR diff, changed files, description, prior incomplete review)
  • Read MockConsumerTestBase.java and all six scenario test classes in full
  • Verify teardown ordering (Awaitility.reset() → interrupt+join feed thread → close PC) is safe for all six scenarios
  • Verify @Timeout(120) on the base actually applies via @Inherited to subclasses
  • Verify the new getFailureCause() assertion in MockConsumerEarlyCloseTest is meaningful (not vacuous)
  • Review remaining changed files (CommitRejectionTestBase, MockConsumerRebalanceInProgressTest, docs, check-copyright-headers.sh)
  • Post final review feedback

Summary

This is a clean, well-executed dedup. I read every changed file plus the full new MockConsumerTestBase, traced the six leaf scenarios (MockConsumerTest, MockConsumerCommitTimeoutTest, MockConsumerEarlyCloseTest, MockConsumerSaslAuthenticationTest, MockConsumerCommitFailedTest, MockConsumerRebalanceInProgressTest) and the relevant main-code paths (AbstractParallelEoSStreamProcessor, ConsumerManager). I did not find any correctness defects. Answers to the three specific questions:

1. Teardown ordering (Awaitility.reset() → interrupt+join feed thread → close PC) — safe for all six.

  • Walked each scenario: 3 use addRecordsInBackground (MockConsumerCommitTimeoutTest, MockConsumerEarlyCloseTest), the rest add records immediately, so there's nothing to interrupt/join for them — the if (recordAdder != null) guard makes that a no-op.
  • feedRecords()'s loop sleeps in ≤1s slices and catches IllegalStateException from a closed MockConsumer, so interrupt() + join(10s) in @AfterEach (MockConsumerTestBase.java:107-115) wakes it promptly; a stuck join only logs, it doesn't fail the test — matches the javadoc's stated intent ("fail loudly rather than hang the suite").
  • MockConsumerEarlyCloseTest closes PC itself inside the test body, then @AfterEach's !parallelConsumer.isClosedOrFailed() guard correctly skips a second close (verified close() sets state = CLOSED before it could throw from the trailing future.get(), so the guard reliably sees "already closed" even on that path).
  • One thing worth knowing, not a bug: CommitRejectionTestBase.closeParallelConsumer() (overridden to call parallelConsumer.closeDontDrainFirst()) is functionally identical to the base's default (parallelConsumer.close(), which is defined as { closeDontDrainFirst(); } — see AbstractParallelEoSStreamProcessor.java:568-571). The override is redundant as code, but it's documented intentionally ("nothing left to drain..."), so I'd leave it — it's clarifying, not misleading.
  • Net effect vs. what existed before: strictly stronger, as claimed. The old MockConsumerCommitTimeoutTest/MockConsumerEarlyCloseTest only interrupted (never joined) their feed thread, and MockConsumerSaslAuthenticationTest had no Awaitility.reset() at all.

2. @Timeout(120) inheritance — confirmed correct.
org.junit.jupiter.api.Timeout is meta-annotated @Inherited (has been since JUnit 5.5), and JUnit Platform's own annotation search additionally walks the class hierarchy independent of that. It propagates through the two-level chain here too: MockConsumerCommitFailedTest/MockConsumerRebalanceInProgressTestCommitRejectionTestBaseMockConsumerTestBase, none of which now re-declare @Timeout, so all six leaf classes get the base's 120s. The diffs confirm the three broken @Timeout(60000L) declarations were removed and not replaced with anything, which only works if inheritance is real.
Caveat: I could not execute ./mvnw test myself in this environment — the sandbox required interactive approval for shell commands that wasn't available here, so this is verified via source-level/JUnit-semantics reasoning cross-referenced with the PR description's claim of "three consecutive runs, no intermittency." If you want a live check, ./mvnw -pl parallel-consumer-core test -Dtest='MockConsumer*Test' is the fast way to confirm.

3. MockConsumerEarlyCloseTest's new getFailureCause() assertion — meaningful, not vacuous.
Traced it into ConsumerManager: both poll() and commitSync() catch SaslAuthenticationException and retry in a loop, only rethrowing once elapsed time exceeds saslAuthenticationRetryTimeout (ConsumerManager.java:100-115, 187-204). The test sets that timeout to an effectively-infinite value and closes PC after only ~7s, well inside the retry budget, so the exception is never rethrown and failureReason (set only in closeOnException() or when the control thread itself dies, AbstractParallelEoSStreamProcessor.java:579-580, 854) never gets populated by the ongoing SASL storm. If a future regression made that classification path immediately fatal instead of retryable, getFailureCause() would be non-null here and the assertion would catch it — it isn't testing something that's structurally always true.

Other observations (non-blocking)

  • Everything else checked out: EXTRACTED_FROM_UPSTREAM registration in bin/check-copyright-headers.sh matches the actual dual-license header on MockConsumerTestBase.java; the docs/inflight/test-mockconsumer-harness.md note follows the test- prefix convention from docs/inflight/AGENTS.md; TestConventionsArchTest's naming rule correctly exempts both new/changed abstract bases (abstract modifier check), so no new ArchUnit violation; the MockConsumerRebalanceInProgressTest javadoc {@link} fix now points at real classes (MockConsumerCommitTimeoutTest, MockConsumerSaslAuthenticationTest).
  • getClass().getSimpleName() for topic in the shared base correctly resolves to the concrete leaf class at each subclass's construction time (runtime type, not declaring type) — same behavior as the old per-file hardcoded topic names, just no longer copy-pasted.
  • No @TestInstance(PER_CLASS) anywhere in this family, so moving commitAttempts from a local var to an instance field in CommitRejectionTestBase doesn't introduce cross-test-method state leakage (JUnit's default per-method instantiation still applies, and each class has exactly one @Test method anyway).

I did not find anything to flag as a real bug in the three areas you asked about, or elsewhere in the diff.
(branch: refactor/40-mockconsumer-test-dedup)

astubbs added a commit that referenced this pull request Aug 5, 2026
…ng readers it blocks

The in-flight note and the upstream-map entry both said fork #40 was queued behind
this PR and should be unblocked "the moment #202 merges". That stopped being true:
this branch edits none of the four MockConsumer* tests, so the collision never
materialised and #40 went ahead on its own as PR #206, open now. Left as written,
both files were a stale marker telling the next session to wait for something that
already happened - exactly the failure mode docs/inflight/AGENTS.md warns about.

Also trims the in-flight note down to what `gh pr view` and the diff cannot answer.
The review flagged the package/SpotBugs reasoning as intentional triplication across
javadoc, docs/refactoring.md and this file; the javadoc and refactoring.md are the
right homes for it, so this file now states the decisions and points at them instead
of restating them in full.

While verifying the SpotBugs entry, noted that poll() and wakeup() are already
synchronized methods that each open a further synchronized (this) block on the
monitor they hold. Reentrant so harmless, but it is what makes the guard/notify
pairing hard to read, and likely why the AtomicBoolean looked necessary - recorded
with the deferred fix so it gets cleaned up in the same pass.

Refs #159 · upstream confluentinc#526

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
astubbs and others added 2 commits August 5, 2026 19:35
… ones

The PR predicted CommitRejectionTestBase <-> MockConsumerTestBase would land
around 70% on the file-similarity check, reasoning that a whole-file token
measure mostly sees a shared package declaration and import block. The first
authoritative CI run falsifies that: neither file appears in the report at all,
against anything, and the reporting floor is 30%.

What the run does show is the result #40 wanted - the MockConsumer*Test
scenarios pair at 34-37%, down from the 70.7% that #34 flagged.

The prediction came from a stdlib stand-in written because the real tool would
not build locally (gensim fails on py3.14; on py3.11 an nltk import shim blocks
imports). Record the measured values, and the lesson: read the tool, do not
model it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
Review noticed that CommitRejectionTestBase overrode closeParallelConsumer()
to call closeDontDrainFirst(), which is exactly what the default did:
DrainingCloseable.close() delegates to closeDontDrainFirst().

So the hook had no override that changed anything, and its javadoc - "override
for a scenario where draining first is wrong" - asserted the opposite of the
truth, implying the default drains. A future author trusting it would reason
backwards about teardown.

Hook and override both removed. The non-draining contract, and why teardown
wants it (it runs on the failure path and must not hang waiting on in-flight
work against a deliberately misbehaving consumer), is now stated once at the
only place that closes.

Six tests still green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
@astubbs

astubbs commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

Thanks - that's the first substantive review this PR has had, and it found something real. Point-by-point:

The one finding I acted on: the redundant close hook

You flagged CommitRejectionTestBase.closeParallelConsumer() as functionally identical to the base default and said you'd leave it as clarifying. I went further and removed it, because I think it was mildly misleading rather than clarifying, and the base javadoc was outright wrong.

Verified your claim first - DrainingCloseable.close() is { closeDontDrainFirst(); } (DrainingCloseable.java:32-33), and AbstractParallelEoSStreamProcessor.close() overrides it with the same delegation (:568-571). So the override changed nothing.

The problem is what the hook's javadoc said:

Override for a scenario where draining first is wrong

That asserts the default drains. It does not. A future author adding a seventh scenario and trusting that sentence would reason backwards about teardown - and the one override present appeared to confirm it, since "overrides to not drain" only makes sense if the default drains. The pair was self-reinforcingly wrong.

Since the hook had no override that changed behaviour, it was also speculative generality. Both are gone; the non-draining contract and why teardown wants it (it runs on the failure path too, so it must not hang waiting on in-flight work against a consumer still being made to misbehave) is now stated once, at the only place that closes. A scenario that ever wants the opposite should call closeDrainFirst() in its own test body, where the wait is visible. Fixed in 2d1b2a4.

Your three answers - agreed, and independently confirmed

  • @Timeout inheritance. Confirmed from bytecode rather than reasoning: javap -v org/junit/jupiter/api/Timeout.class shows java.lang.annotation.Inherited on the annotation type, and unit() has AnnotationDefault: TimeUnit.SECONDS - which is also the proof that the old @Timeout(60000L) meant 60000 seconds (~16.7 hours), i.e. no timeout.
  • Teardown ordering. Agreed. Worth adding one case you didn't mention: interrupt() cannot free a thread blocked entering a synchronized monitor, and MockConsumerCommitTimeoutTest's mock holds the MockConsumer monitor for 5s per failing commitSync. So the feed thread can genuinely be unfreeable for a few seconds. That is why the join is bounded and logs rather than hangs - worst case teardown costs 10s, well inside the 120s budget. The outage is also over by the time that test tears down.
  • getFailureCause() assertion. Agreed, non-vacuous, same trace.

On the test evidence you couldn't gather

You flagged that you couldn't run ./mvnw - noted, and you were right to say so rather than imply verification. I ran the six locally: 6/6 pass, MockConsumerTest 0.4s, RebalanceInProgress 1.1s, CommitFailed 1.1s, EarlyClose 5.3s, Sasl 10.4s, CommitTimeout 25.3s. That 25.3s worst case is what sizes @Timeout(120). Re-run green after the hook removal above.

(-pl parallel-consumer-core alone trips enforcer:enforce's ReactorModuleConvergence; add -Denforcer.skip=true or -am.)

The similarity prediction in the description was wrong, and is now corrected

The description told you to expect CommitRejectionTestBase <-> MockConsumerTestBase at ~70%. That did not happen - neither file appears in the report at all, against anything, and the floor is 30%. The prediction came from a stdlib stand-in I wrote because the real tool won't build locally (gensim fails on py3.14; on py3.11 an nltk import shim blocks imports).

What the run actually shows is the result #40 wanted: the MockConsumer*Test scenarios pair at 34-37%, down from the 70.7% that #34 flagged. PMD CPD: no new clones, -0.39%. jscpd: -0.42%, and its single "new clone" is the 8-line package + copyright + import block shared by MockConsumerEarlyCloseTest and MockConsumerSaslAuthenticationTest - every line used by both, not actionable in Java.

Description and both docs corrected to the measured values in 762087f, including the lesson (read the tool, don't model it).

Still standing, not changed

Not extending AbstractParallelEoSStreamProcessorTestBase (it wires a Mockito-spied LongPollingMockConsumer + MockProducer; these tests exist to exercise behaviour only a hand-written raw MockConsumer can express), and leaving each Awaitility block in its own subclass with its own scenario-specific timeout. You didn't challenge either - recording that they were deliberate, not overlooked.

@astubbs

astubbs commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

The red claude-review check is a bug in bin/check-review-posted.sh, not a finding on this PR

Reporting, not fixing - it's a CI gate, it's on master (added in a4db924), and it affects every PR, so it isn't mine to patch from a feature branch. Leaving the check red.

Diagnosis

bin/check-review-posted.sh:94 is:

if printf '%s\n' "$comment_bodies" | grep -qE "actions/runs/${run_id}([^0-9]|$)"; then

under set -euo pipefail (line 56). grep -q exits the moment it matches. If printf still has data to write, it takes SIGPIPE/EPIPE and exits non-zero. pipefail then makes the whole pipeline non-zero, the if takes the false branch, and the script reports "no comment cites this run" - even though grep matched.

The failing run left the proof in the log, immediately above its own error:

bin/check-review-posted.sh: line 94: printf: write error: Broken pipe
##[error]The review step reported success but posted no review: no comment ... cites run 30979310097

A broken pipe on line 94 can only happen because grep matched and exited early. The gate's evidence of success is what makes it fail.

Reproduced three ways against this PR's real comment stream

Input Citation position Result
37 bytes present Review posted by run 30979310097. exit 0
130,807 bytes (real comments) comment #2 of 5 exit 1 - false failure
~100KB synthetic last line exit 0

Same needle, same script - only the position and the size change. It fails when the citation is found early in a stream larger than the 64KB pipe buffer, and passes when grep is forced to read to the end.

Why it triggered here

The similarity report comment is 127,686 bytes of the 130,807 total. The claude[bot] comment carrying the citation is #2; the giant report is #4. So grep matches ~1KB in and exits with ~128KB still unwritten - guaranteed EPIPE. Any PR with a large similarity report hits this.

Two separate things, both worth knowing

  1. The gate is wrong here. Run 30979310097 did post a comment citing itself, so a working gate would have gone green.
  2. But the review was substantively empty anyway. That run finished "is_error": false, 52 turns, $2.27, 14 permission denials - and never wrote its findings into its comment, leaving two todo items unchecked and posting zero inline comments. That's exactly the "posts its progress comment and then produces an empty review would still pass" limit the script's own header calls out. Worth knowing that the failure mode is real and not hypothetical.

I got a real review by asking for one in a comment (#issuecomment-5188876914), as the script's error message suggests - it ran clean in 6m27s and found one genuine issue, now fixed.

Note on the fix, for whoever picks it up

bin/test-check-copyright-headers.sh already asserts ok: scanner has no SIGPIPE-prone pipes into grep -q / awk - the repo has met this bug class before and guards check-copyright-headers.sh against it. check-review-posted.sh shipped in the same commit without that guard, and has no self-test. The obvious candidates are dropping -q (grep -cE ... > /dev/null), a here-string (grep -qE ... <<< "$comment_bodies"), or a case/[[ ]] match with no pipe at all - plus a large-input regression test, since a small-input test passes today.


Update: the gate went green on the next push, and that confirms the diagnosis rather than clearing it

claude-review passed on run 30986389457. Nothing was fixed - the bug is still there, and the reason it passed is the smoking gun.

The gate greps for the run id in the comment stream, which GitHub returns in creation order. Compare where the citing comment sat:

Run Position of the comment citing that run 127,696-byte similarity report Result
30979310097 2nd of 5 after the match grep exits early -> printf EPIPE -> false fail
30986389457 10th of 11 before the match grep must read to the end -> no EPIPE -> pass

Same script, same needle, same repo - only the match's position relative to the 64KB pipe buffer changed. A gate whose verdict depends on whether the thing it is looking for happens to appear before or after an unrelated bot's large comment is not measuring what it thinks it is.

So this is latent, not resolved. It will fail again on any PR where the reviewer's comment lands before a large one - which is the normal case early in a PR's life, before the reviewer has re-run. Worth fixing on master with a large-input regression test, since a small-input test passes today.

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 4m 24s —— View job


Claude finished the review

Todo list

  • Gather context (PR diff, changed files, prior review comments/discussion)
  • Read MockConsumerTestBase.java and all six scenario test classes in full
  • Read CommitRejectionTestBase.java (post-hook-removal state) and verify the removed-hook claim against source
  • Check remaining files: docs, check-copyright-headers.sh
  • Verify claims made in the latest commits (2d1b2a4, 762087f, c60b505) against actual code
  • Run the six MockConsumer tests locally to confirm green
  • Post final review feedback

Summary

This update (commits 762087f, 2d1b2a4) responds directly to the prior review round, and everything in it checks out against the actual code and a live test run.

1. The close-hook removal (2d1b2a4) is correct and exactly as described.
Diffed MockConsumerTestBase.java before/after: closeParallelConsumer() and its javadoc are gone, stopRecordFeedAndCloseParallelConsumer() now calls parallelConsumer.close() directly with the non-draining contract explained inline. CommitRejectionTestBase's override is gone too. Confirmed DrainingCloseable.close()closeDontDrainFirst() (DrainingCloseable.java:32-33) and AbstractParallelEoSStreamProcessor.close()closeDontDrainFirst() (:569-571) — the override genuinely changed nothing, so removing it is safe. grep -r closeParallelConsumer across the repo returns nothing, so there's no dangling reference to the removed hook.

2. The docs correction (762087f) matches the CI report, not just the PR body.
docs/refactoring.md and docs/inflight/test-mockconsumer-harness.md now say CommitRejectionTestBase/MockConsumerTestBase don't appear in the file-similarity report at all (30% floor), and the MockConsumer*Test scenarios pair at 34–37%. That's a verbatim match to the numbers the duplicate-code-detection-tool comment actually posted on this PR (CommitTimeoutEarlyClose 37.49%, CommitTimeoutSasl 37.16%, EarlyCloseSasl 34.47%, neither base class listed anywhere in the report). Good instinct to record "estimate from the tool, not from source reading" as the lesson.

3. Live-ran all six affected tests (-pl parallel-consumer-core -Dtest='MockConsumerTest,MockConsumerCommitTimeoutTest,MockConsumerEarlyCloseTest,MockConsumerSaslAuthenticationTest,MockConsumerCommitFailedTest,MockConsumerRebalanceInProgressTest' test, -Denforcer.skip=true to avoid the reactor-convergence trip mentioned earlier in this thread):

Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
MockConsumerTest                     0.46s
MockConsumerCommitFailedTest         1.19s
MockConsumerRebalanceInProgressTest  1.19s
MockConsumerEarlyCloseTest           5.26s
MockConsumerSaslAuthenticationTest  10.31s
MockConsumerCommitTimeoutTest       25.37s

All green, and the per-test timings land within ~0.1s of the numbers quoted in this thread — good evidence the 120s @Timeout headroom claim is accurate and there's no new intermittency.

4. bin/check-copyright-headers.sh passes: Checked 233 java files against fork point ... - 0 violation(s). The EXTRACTED_FROM_UPSTREAM registration for MockConsumerTestBase.java is doing its job.

5. No compiler warnings on either MockConsumerTestBase.java or CommitRejectionTestBase.java in the build output — no unused-import fallout from the hook removal.

On the three questions from the original review request

Already answered in the prior round (teardown ordering safe for all six scenarios including the synchronized-monitor edge case in MockConsumerCommitTimeoutTest; @Timeout inheritance confirmed both by JUnit semantics and by the bytecode check in this thread; getFailureCause() assertion is non-vacuous, traced through ConsumerManager's retry-until-timeout SASL handling). Nothing in this update changes those conclusions — the only production-relevant change since is the hook removal, verified above.

Nothing to flag

I didn't find any new correctness, safety, or documentation-accuracy issues in this update. The one thing the prior review surfaced (the redundant/misleadingly-documented closeParallelConsumer() hook) was fixed correctly and verified against the actual delegation chain rather than assumed.
(branch: refactor/40-mockconsumer-test-dedup)

@astubbs

astubbs commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

Chaos Pain Suite is red, and it is not this PR - it reproduced the open silent-stall bug

Diagnosed rather than retried-to-green. Recording the evidence so nobody has to re-derive it.

What actually failed

ChaosChurnStormIT.churnStormMeetsSlosAndBalancesLedger - not a MockConsumer test. From the failsafe report:

Run summary: consumed=100387, probe violations=[NO_PROGRESS: fleet consumed
count stuck at 98800/100000 for 30s (bound 30s)]

violations (23):
  - CLASS2_STALL/LAG_STAGNATION: partition ...-34 lag=625 with committed offset
    stagnant at 653 for 154s (bound 150s) - protocol-invisible stall: group STABLE
    + heartbeats flowing, yet this partition's backlog is going nowhere
  - CLASS2_STALL/LAG_STAGNATION: partition ...-21 lag=1132 ... stagnant at 91 for 154s
  - CLASS2_STALL/LAG_STAGNATION: partition ...-33 lag=1128 ... stagnant at 47 for 154s
  ... (23 total)

That is the silent-stall-after-rebalance class (confluentinc#857) - group STABLE, heartbeats flowing, backlog frozen. Known, root cause still open. The chaos suite did its job; this is a real product signal, not noise, and it should not be quarantined or bounded away.

Why it cannot be this PR

  • Zero main-code changes: git diff a4db924a..HEAD -- '*/src/main/*' is empty. Nothing this PR touches can execute in a broker run.
  • No linkage: nothing in src/test-integration/ references MockConsumerTestBase, CommitRejectionTestBase, or any changed test class. ChaosChurnStormIT extends ChaosScenarioBase, an unrelated hierarchy.
  • Same code passed already: this suite was green on this PR's previous head (run 30979310092, 6m26s). Between the two runs the only Java change was deleting a no-op override.
  • Ambient right now: fix/release-0600-blockers failed the same suite at 07:29:37 in the same window, while other branches passed.

Runner saturation is the aggravating factor, not the cause

The failing run logged the load signature throughout - Thread execution pool termination await timeout (PT10S), Clean execution pool termination failed ... Threads still not done count: 3, and repeated records in the queue have been waiting longer than 10s. Ten branches were hammering the self-hosted runners concurrently. Note that the stall bound that tripped is 154s against a 150s bound - a 3% overshoot, exactly what you'd expect a real-but-marginal stall to look like when CPU-starved.

That is context for why it surfaced now, not a reason to raise the bound. The probe is measuring the right thing.

What I did and did not do

  • Did not touch the probe, the bounds, the quarantine registry, or any gate.
  • Did trigger one re-run of the failed job as a diagnostic (deterministic vs intermittent), not to buy a green tick. At the time of writing it has been queued ~25 minutes behind the saturated self-hosted runner pool and has not started.

Whatever it reports, the analysis above stands: this suite's failure is independent of a test-only refactor with no main-code delta. If it goes green on re-run, that confirms intermittency under load; if it fails again, that is a stronger confluentinc#857 datapoint and worth attaching to that issue rather than to this PR.

@astubbs

astubbs commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

Scope note for whoever picks this up

This PR now closes #40 - the description was changed to carry a real closing link, so #40 will close on merge. Flagging it because the original wording said "closes the first half", and the second half is closed by verdict rather than by code.

First half - done by doing it: MockConsumerTestBase extracts the shared wiring; the six scenario classes now supply only their failure injection and assertions. Measured effect: the MockConsumer*Test scenarios moved from the 70.7% that triggered #40 down to 34-37%.

Second half - done by documented decision, not by code. The audit ran. The remaining high-similarity pairs are overwhelmingly cross-module clones (MutinyBatchTest/ReactorBatchTest ~94%, MutinyPCTest/ReactorPCTest ~86%), and deduplicating those needs a generified base in core's test-jar spanning three modules - the exact scope creep #40 says it does not want. The one within-module pair over fail_above: 80 is broker ITs needing Docker to verify. TestConventionsArchTest x4 is documented-irreducible. ProducerManagerTest, named in #40 itself, already has no cross-file duplication left. All ranked with verdicts in docs/refactoring.md.

If you disagree that a documented won't-do discharges the second half, remove the Closes #40 line before merging and open a follow-up issue for the cross-module work. Leaving #40 open without that follow-up is the worst option - the verdict then gets re-derived from scratch by whoever picks it up next.

One caveat on the duplication numbers: the real similarity tool could not be run locally (gensim will not build on py3.14; on py3.11 an nltk import shim blocks imports), so the pre-merge prediction came from a stdlib stand-in and was wrong - it predicted the two abstract harnesses would register ~70%, and neither appears in the CI report at all. The 34-37% figures above are from the authoritative CI run, not the stand-in.

astubbs and others added 2 commits August 6, 2026 15:28
master's new issue-ref gate (735b1d3) requires a reference below #1000 to
name its repo: the fork numbers from 1 and confluentinc reaches confluentinc#922, so a
bare number is a coin flip.

The seven bare refs on this PR's added lines are all this fork - the harness
issue, the similarity issue that motivated it, and two PR numbers - so they
become astubbs#NN. Verified by running the gate against this branch's diff:
7 hits before, 0 after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 3m 39s —— View job


Claude finished the review

Todo list

  • Gather context (PR diff, prior review rounds, prior findings already fixed)
  • Read current state of all 10 changed files against origin/master
  • Check whether prior findings (redundant close hook) are actually resolved in current HEAD
  • Look for anything new since the last reviewed commit (1a2d832, d2f2ec5)
  • Run the six affected MockConsumer tests
  • Run bin/check-copyright-headers.sh
  • Post final review feedback

Summary

This PR has already been through two substantive review rounds in this thread, both of which read the harness and scenarios in full and traced the teardown ordering, @Timeout inheritance, and the getFailureCause() assertion against the actual AbstractParallelEoSStreamProcessor/ConsumerManager code. The one real finding from that process (CommitRejectionTestBase's redundant, misleadingly-documented closeParallelConsumer() hook) was fixed in 2d1b2a4 and re-verified. Since then the only new commit is 1a2d832, which is a pure docs edit (qualifying bare #NN issue refs to astubbs#NN per master's new issue-ref gate) — no code changed.

I independently re-read all 10 changed files against origin/master and re-ran the verification rather than taking the thread's word for it:

  • MockConsumerTestBase.java — confirmed the close-hook is gone, close() is called directly with the non-draining contract documented inline, Awaitility.reset() runs first, and the feed thread is interrupted+joined (bounded at 10s, logs rather than hangs) before PC closes.
  • CommitRejectionTestBase.java — confirmed no dangling reference to the removed hook (grep -r closeParallelConsumer across the repo returns nothing) and no stray unused imports.
  • All six leaf scenarios (MockConsumerTest, MockConsumerCommitTimeoutTest, MockConsumerEarlyCloseTest, MockConsumerSaslAuthenticationTest, MockConsumerCommitFailedTest, MockConsumerRebalanceInProgressTest) — each only supplies failure behaviour + options + its own Awaitility assertion, as described. MockConsumerRebalanceInProgressTest's javadoc now points at the renamed MockConsumerCommitTimeoutTest/MockConsumerSaslAuthenticationTest, not the old dead names.
  • Live test run (./mvnw -pl parallel-consumer-core -Denforcer.skip=true -Dtest='MockConsumerTest,MockConsumerCommitTimeoutTest,MockConsumerEarlyCloseTest,MockConsumerSaslAuthenticationTest,MockConsumerCommitFailedTest,MockConsumerRebalanceInProgressTest' test): 6/6 pass, timings match what was posted in this thread (MockConsumerTest 0.57s, CommitFailedTest/RebalanceInProgressTest ~1.3s, EarlyClose 5.4s, Sasl 10.4s, CommitTimeout 25.4s) — well inside the base's @Timeout(120).
  • bin/check-copyright-headers.sh: Checked 233 java files against fork point ... - 0 violation(s). The EXTRACTED_FROM_UPSTREAM registration for MockConsumerTestBase.java is doing its job.
  • docs/refactoring.md / docs/inflight/test-mockconsumer-harness.md: the measured 34-37% similarity figures and the "neither base class appears in the report" fact match what the CI similarity-check comment actually posted on this PR.

Nothing new to flag

I did not find any correctness, safety, or documentation-accuracy issues beyond what the prior rounds already surfaced and fixed. The teardown ordering, @Timeout inheritance, and the strengthened getFailureCause() assertion in MockConsumerEarlyCloseTest all hold up under independent re-verification, and the code hasn't materially changed since the last round confirmed them.
(branch: refactor/40-mockconsumer-test-dedup)

astubbs added a commit that referenced this pull request Aug 6, 2026
Master's 735b1d3 mirrored all 78 confluentinc issues into this fork, which made
a bare `#NN` ambiguous: the fork numbers from 1 and confluentinc reaches confluentinc#922, so
the ranges overlap completely. The house convention is now `#159` /
`confluentinc#526`, and `.github/scripts/issue-ref-gate.js` enforces it on added
lines via the PR Checklist job.

This branch predates that and had 15 unqualified refs across three files -
`#159`, `#40`, `#202`, `#206`, `#162`, `confluentinc#861`, `confluentinc#526`, `confluentinc#271`. Every one is now
qualified. Verified by running the gate module itself over this branch's diff
rather than by eye: 15 findings -> 0.

`upstream #NNN` is still accepted by the gate, but converted anyway - "upstream"
names a role rather than a repo, and this repo is upstream to anyone who forks
it, which is why master moved off it.

No wording changed beyond the references themselves, except the in-flight note,
which now also records that #159 IS the upstream-mirror issue for
confluentinc#526 - that is where the fork<->upstream mapping lives now that the
map entry is gone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
The pair I recorded as 37.5% came back 37.43% after merging master, which
touched none of these files - the check is corpus-relative TF-IDF, so every
number moves when anything in the repo does. Recording the decimals invites
the same correction on every merge.

Also fixes a figure I got wrong: overall duplication fell 0.39% on PMD CPD
and 0.42% on jscpd, not 0.42% on both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 4m 36s —— View job


Claude finished the review

Todo list

  • Gather context (PR diff, prior review rounds already in this thread)
  • Read current diff (origin/master...HEAD) for all 10 changed files
  • Check whether anything changed since the last reviewed commit (ba77e67 is docs-only, since 1a2d832)
  • Verify prior findings are still resolved (redundant close hook removal, docs corrections)
  • Run the six affected MockConsumer tests
  • Run bin/check-copyright-headers.sh
  • Cross-check every new percentage in docs/refactoring.md against the actual CI similarity report posted on this PR
  • Post final review feedback

Summary

This thread has already been through three thorough review rounds covering the harness code itself (teardown ordering, @Timeout inheritance, the getFailureCause() assertion, the close-hook removal) — I re-read all 10 changed files against origin/master and re-ran the verification rather than trusting the prior rounds, and everything there still holds:

  • All six MockConsumer*Test scenarios only supply createMockConsumer()/customiseOptions(..)/assertions; the shared wiring is in MockConsumerTestBase.java as described.
  • CommitRejectionTestBase's redundant closeParallelConsumer() hook is fully gone, no dangling references (grep -r closeParallelConsumer repo-wide is empty).
  • Live run of all six: 6/6 pass, timings match what's been posted before (MockConsumerTest 0.4s, CommitFailed/RebalanceInProgress ~1.3s, EarlyClose 5.4s, Sasl 10.4s, CommitTimeout 25.5s) — comfortably inside the base's @Timeout(120).
  • bin/check-copyright-headers.sh: Checked 233 java files ... - 0 violation(s). EXTRACTED_FROM_UPSTREAM registration for MockConsumerTestBase.java is present and correct.
  • The only commit since the last review round (ba77e67) is docs-only — quoting the similarity band instead of decimals, and fixing a PMD/jscpd figure. That specific correction (37.49 -> 37.43, -0.39%/-0.42%) matches the CI comment's actual numbers exactly.

One finding: the new "Cross-module test clones" section in docs/refactoring.md cites numbers that don't match the CI report this PR itself links to

docs/refactoring.md:315-323 (new in this PR) states:

  • MutinyBatchTest/ReactorBatchTest ~94%
  • MutinyPCTest/ReactorPCTest ~86%
  • MutinyUnitTestBase/ReactorUnitTestBase ~80%
  • TransactionAndCommitModeTest/VeryLargeMessageVolumeTest ~88%
  • TestConventionsArchTest x4 ~98%

The duplicate-code-detection-tool report actually posted on this PR (2026-08-05T05:50:25Z comment) shows, for every one of those same pairs:

Pair Doc says Report actually says
MutinyBatchTestReactorBatchTest ~94% 78.94%
MutinyPCTestReactorPCTest ~86% 71.18%
MutinyUnitTestBaseReactorUnitTestBase ~80% 31.93%
TransactionAndCommitModeTestVeryLargeMessageVolumeTest ~88% 60.73%
TestConventionsArchTest (all 6 pairs) ~98% 89.65-91.08%

Every figure is overstated, by 7 to 48 points, all in the same direction. That's not corpus-relative drift (the kind this PR's own ba77e67 commit just corrected elsewhere was ~0.06 points) — it looks like the same stdlib-estimation-script problem the PR description already owns up to for the CommitRejectionTestBase/MockConsumerTestBase prediction ("the real tool won't build locally... the prediction came from a stdlib stand-in"), except that correction was applied to the MockConsumer-scenario numbers and the harness-pair prediction, but not to this cross-module table.

It's a bit pointed that the sentence immediately preceding these numbers in the same file is "Estimate similarity from the tool, not from a reading of the source." Given how carefully this PR otherwise re-derived and corrected every other similarity figure against the actual CI report (including a whole follow-up commit just for decimal drift), this block looks like it was missed rather than a deliberate choice — worth either correcting the five figures to match the linked report, or loosening them to bands the way the MockConsumer*Test figures were revised to (34-37% rather than fixed decimals) so they don't need re-verification on every merge either.

Fix this →

Nothing else to flag

No correctness, safety, or test-coverage issues beyond the doc figures above — the harness extraction itself, teardown ordering, @Timeout inheritance, and the strengthened getFailureCause() assertion all hold up under this independent re-verification, consistent with the prior review rounds in this thread.
(branch: refactor/40-mockconsumer-test-dedup)

astubbs and others added 2 commits August 6, 2026 16:08
#213 documented on DrainingCloseable#close() that a bare close() is the
non-draining one. This comment was written before that existed and explained
the delegation itself, which is now a second copy of a fact with a proper home.

Keep only what the javadoc cannot carry: why teardown wants the non-draining
close specifically - it runs on the failure path, so it must not be able to
hang on in-flight work against a consumer still being made to misbehave.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtNUsxokE9g2pSEjBHZqNA
@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 2m 57s —— View job


Claude finished the review

Todo list

  • Gather context (PR diff, prior review rounds already in this thread, custom /code-review instructions)
  • Re-read current diff (origin/master...HEAD) for all 10 changed files
  • Verify the one commit since the last review round (7942cdf) doesn't change behaviour
  • Re-check whether the previously-flagged docs/refactoring.md stats mismatch was fixed
  • Run the six affected MockConsumer tests
  • Run bin/check-copyright-headers.sh
  • Post final review feedback

Summary

This thread has already been through four review rounds covering the harness itself (teardown ordering, @Timeout inheritance, the getFailureCause() assertion, the close-hook removal) in detail, and I re-verified rather than re-deriving:

  • The only commit since the last round is 7942cdf, which trims the teardown comment in MockConsumerTestBase.java to point at DrainingCloseable#close()'s javadoc instead of re-explaining the delegation inline. Checked that javadoc (added on master by docs #171: document that a bare close() does not drain #213 / commit 68651ed4, merged into this branch via 1e854544) — it does state "Close the consumer WITHOUT draining" explicitly, so the claim in the commit message is accurate and this is a pure comment trim, no behaviour change.
  • Live-ran all six affected tests (./mvnw -pl parallel-consumer-core -Denforcer.skip=true -Dtest='MockConsumerTest,MockConsumerCommitTimeoutTest,MockConsumerEarlyCloseTest,MockConsumerSaslAuthenticationTest,MockConsumerCommitFailedTest,MockConsumerRebalanceInProgressTest' test): 6/6 pass, timings consistent with every prior round (RebalanceInProgress/CommitFailed ~1.3s, EarlyClose 5.4s, Sasl 10.4s, CommitTimeout 26.4s) — comfortably inside @Timeout(120).
  • bin/check-copyright-headers.sh: Checked 233 java files ... - 0 violation(s).

Still open: the docs/refactoring.md similarity-percentage mismatch flagged in the previous round was not addressed

docs/refactoring.md:315-322 (the "Cross-module test clones" section this PR adds) still states:

  • MutinyBatchTest/ReactorBatchTest ~94%
  • MutinyPCTest/ReactorPCTest ~86%
  • MutinyUnitTestBase/ReactorUnitTestBase ~80%
  • TransactionAndCommitModeTest/VeryLargeMessageVolumeTest ~88%
  • TestConventionsArchTest x4 ~98%

The duplicate-code-detection-tool report actually posted on this PR (2026-08-05T05:50:25Z) shows, for the same pairs:

Pair Doc says Report actually says
MutinyBatchTestReactorBatchTest ~94% 78.94%
MutinyPCTestReactorPCTest ~86% 71.18%
MutinyUnitTestBaseReactorUnitTestBase ~80% 31.93%
TransactionAndCommitModeTestVeryLargeMessageVolumeTest ~88% 60.73%
TestConventionsArchTest (6 pairs) ~98% 89.65–91.08%

This was already raised in the 2026-08-06T03:48:01Z review round in this thread, with the same table. Nothing has changed in docs/refactoring.md at those lines since (git log -p -- docs/refactoring.md shows only the unrelated ba77e67c band-quoting edit, which touched the CommitRejectionTestBase ↔ MockConsumerTestBase paragraph a few lines below, not this one). The commits since then (1a2d8328, ba77e67c, 7942cdfe) don't touch these five figures.

It remains a bit pointed that the sentence immediately after this block, in the very next paragraph the PR added, says "Estimate similarity from the tool, not from a reading of the source" — while this block's own numbers are still the stdlib-estimate values rather than the measured ones, unlike every other similarity figure this PR corrected. Worth either fixing the five figures to match the linked report, or loosening them to a band (as was done for the MockConsumer*Test figures — 34-37% rather than fixed decimals) so they don't need re-verification on every future merge.

Fix this →

Nothing else to flag

No correctness, safety, or test-coverage issues beyond the doc figures above. The harness extraction itself — teardown ordering, @Timeout inheritance, the strengthened getFailureCause() assertion, and the close-hook removal — all hold up under this independent re-verification, consistent with every prior round in this thread. The only new commit since the last review is a comment-only trim that checks out against the javadoc it now points to.

@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @astubbs's task in 3m 41s —— View job


Claude finished the review

Todo list

  • Gather context (PR diff, prior review rounds already in this thread, custom /code-review instructions)
  • Re-read current diff (origin/master...HEAD) for all 10 changed files
  • Check what changed since the last reviewed commit (7942cdf)
  • Check the previously-flagged docs/refactoring.md similarity-percentage mismatch
  • Run the six affected MockConsumer tests
  • Post final review feedback

Summary

Nothing has changed on this branch since the last review round in this thread — git diff origin/master...HEAD --stat still shows exactly the 10 files / +466/-354 described in the PR body, and HEAD (e4b9e2c3) is still 7942cdfe plus only a merge commit from origin/master. I re-verified independently rather than re-reading the thread's conclusions on faith:

  • Live-ran all six affected tests (./mvnw -pl parallel-consumer-core -Denforcer.skip=true -Dtest='MockConsumerTest,MockConsumerCommitTimeoutTest,MockConsumerEarlyCloseTest,MockConsumerSaslAuthenticationTest,MockConsumerCommitFailedTest,MockConsumerRebalanceInProgressTest' test): 6/6 pass, timings consistent with every prior round (MockConsumerTest 0.69s, CommitFailedTest/RebalanceInProgressTest 1.34s, EarlyClose 5.39s, Sasl 10.40s, CommitTimeout 27.44s) — comfortably inside @Timeout(120).
  • bin/check-copyright-headers.sh: Checked 233 java files ... - 0 violation(s).
  • Re-confirmed the harness structure itself (MockConsumerTestBase.java, CommitRejectionTestBase.java, all six leaf scenarios): teardown order is Awaitility.reset() → interrupt+join feed thread (bounded, logs not hangs) → close(); no dangling reference anywhere to the removed closeParallelConsumer() hook.

Still open: the docs/refactoring.md similarity-percentage mismatch flagged in the previous round is still unfixed

docs/refactoring.md:315-322 (the "Cross-module test clones" section this PR adds) still states:

  • MutinyBatchTest/ReactorBatchTest ~94%
  • MutinyPCTest/ReactorPCTest ~86%
  • MutinyUnitTestBase/ReactorUnitTestBase ~80%
  • TransactionAndCommitModeTest/VeryLargeMessageVolumeTest ~88%
  • TestConventionsArchTest x4 ~98%

The duplicate-code-detection-tool report actually posted on this PR (2026-08-05T05:50:25Z) shows, for the same pairs:

Pair Doc says Report actually says
MutinyBatchTestReactorBatchTest ~94% 78.94%
MutinyPCTestReactorPCTest ~86% 71.18%
MutinyUnitTestBaseReactorUnitTestBase ~80% 31.93%
TransactionAndCommitModeTestVeryLargeMessageVolumeTest ~88% 60.73%
TestConventionsArchTest (6 pairs) ~98% 89.65–91.08%

This was already raised twice in this thread (2026-08-06T03:48:01Z and 2026-08-06T04:10:35Z) with the same table, and no commit since has touched those lines (git log -p -- docs/refactoring.md confirms only the unrelated ba77e67c band-quoting edit landed, a few lines below, for the CommitRejectionTestBase/MockConsumerTestBase paragraph). It remains a bit pointed that the sentence right after this block, in the same paragraph this PR added, says "Estimate similarity from the tool, not from a reading of the source" — while this block's own five numbers are still the stdlib-estimate values rather than the measured ones, unlike every other similarity figure this PR corrected (including a whole follow-up commit, ba77e67c, just for decimal drift on the MockConsumer*Test figures).

Worth either correcting the five figures to match the linked CI report, or loosening them to a band the way the MockConsumer*Test figures were revised to (34-37% rather than fixed decimals), so they don't need re-verification on every future merge either.

Fix this →

Nothing else to flag

No correctness, safety, or test-coverage issues beyond the doc figures above. The harness extraction itself — teardown ordering, @Timeout inheritance, the strengthened getFailureCause() assertion, and the close-hook removal — all continue to hold up under this independent re-verification, consistent with every prior round in this thread.
(branch: refactor/40-mockconsumer-test-dedup)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce duplication in MockConsumer* test classes

1 participant