Skip to content

KAFKA-20632: Extend existing tests - #23135

Open
Nikita-Shupletsov wants to merge 1 commit into
apache:trunkfrom
Nikita-Shupletsov:KAFKA-20632-2
Open

KAFKA-20632: Extend existing tests#23135
Nikita-Shupletsov wants to merge 1 commit into
apache:trunkfrom
Nikita-Shupletsov:KAFKA-20632-2

Conversation

@Nikita-Shupletsov

@Nikita-Shupletsov Nikita-Shupletsov commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

to verify the correctness of incremental allocation strategy.

Reviewers: Lianet Magrans lmagrans@confluent.io

@github-actions github-actions Bot added triage PRs from the community producer tests Test fixes (including flaky tests) clients labels Aug 11, 2026
@lianetm lianetm added ci-approved and removed triage PRs from the community labels Aug 12, 2026

@lianetm lianetm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@Test
public void testAppendLargeCompressed() throws Exception {
testAppendLarge(Compression.gzip().build());
testAppendLarge(BUFFER_MEMORY_ALLOCATION_STRATEGY_FULL, Compression.gzip().build());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's create a jira to re-enable these compression ones for incremental once it supports it?

int stickyBatchSize, boolean rackAware, String rack) {
return new SequentialPartitioner(logContext, topic, stickyBatchSize, rackAware, rack);
BufferPool pool = createTestBufferPool(allocationStrategy, totalSize, batchSize, "producer-internal-metrics");
RecordAccumulator accum = allocationStrategy.equals(ProducerConfig.BUFFER_MEMORY_ALLOCATION_STRATEGY_INCREMENTAL)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we reuse the createTestRecordAccumulator here?

public void testTransitionToAbortableErrorOnBatchExpiry() throws InterruptedException {
@ParameterizedTest
@MethodSource("allocationStrategies")
public void testTransitionToAbortableErrorOnBatchExpiry(String allocationStrategy) throws InterruptedException {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would expect this test at the transaction mgr level is unaffected by chunks/allocation stategy so no need to parametrize?

public void testTransitionToAbortableErrorOnMultipleBatchExpiry() throws InterruptedException {
@ParameterizedTest
@MethodSource("allocationStrategies")
public void testTransitionToAbortableErrorOnMultipleBatchExpiry(String allocationStrategy) throws InterruptedException {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto

public void testDropCommitOnBatchExpiry() throws InterruptedException {
@ParameterizedTest
@MethodSource("allocationStrategies")
public void testDropCommitOnBatchExpiry(String allocationStrategy) throws InterruptedException {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto

public void testTransitionToFatalErrorWhenRetriedBatchIsExpired() throws InterruptedException {
@ParameterizedTest
@MethodSource("allocationStrategies")
public void testTransitionToFatalErrorWhenRetriedBatchIsExpired(String allocationStrategy) throws InterruptedException {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto

@ParameterizedTest
@ValueSource(booleans = {true, false})
public void testHealthyPartitionRetriesDuringEpochBump(boolean transactionV2Enabled) throws InterruptedException {
@MethodSource("transactionV2AndAllocationStrategies")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto

@ParameterizedTest
@MethodSource("allocationStrategies")
public void testDrainWithANodeThatDoesntHostAnyPartitions(String allocationStrategy) {
// Nothing is ever appended here, so batch.size only has to stay above the chunk size.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why does it need to be above chunk here? (I would expect it if we were flowing through the KafkaProducer that ignores incremental if batch < chunk, but not here at the acc level, so why this batch change?)

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

Labels

ci-approved clients producer tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants