Skip to content

Conversation

@m1a2st
Copy link
Collaborator

@m1a2st m1a2st commented Apr 28, 2025

Use Java to rewrite PlaintextConsumerPollTest by new test infra and move
it to client-integration-tests module.

Reviewers: PoAn Yang payang@apache.org, TengYao Chi
kitingiao@gmail.com, Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added core Kafka Broker tests Test fixes (including flaky tests) clients triage PRs from the community labels Apr 28, 2025
Copy link
Member

@FrankYang0529 FrankYang0529 left a comment

Choose a reason for hiding this comment

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

Thanks for the patch. Leave some minor comments.

@github-actions github-actions bot removed the triage PRs from the community label Apr 29, 2025
Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

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

@m1a2st: Thanks for the patch.
I have a few comments.

)
public class PlaintextConsumerPollTest {

public static final int BROKER_COUNT = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Use short to eliminate the casting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The @ClusterTestDefaults brokers type is int, thus we should set BROKER_COUNT as int

@chia7712
Copy link
Member

@m1a2st could you please fix the conflicts?

m1a2st added 3 commits May 17, 2025 09:41
# Conflicts:
#	core/src/test/scala/integration/kafka/api/PlaintextConsumerPollTest.scala

// continuous poll should eventually fail because there is no offset reset strategy set
// (fail only when resetting positions after coordinator is known)
TestUtils.waitForCondition(() -> {
Copy link
Member

Choose a reason for hiding this comment

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

            TestUtils.waitForCondition(() -> {
                try {
                    consumer.poll(Duration.ZERO);
                    return false;
                } catch (NoOffsetForPartitionException e) {
                    return true;
                }
            }, "Continuous poll not fail");

WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's good idea, addressed it.

m1a2st added 4 commits May 19, 2025 18:43
# Conflicts:
#	core/src/test/scala/integration/kafka/api/PlaintextConsumerPollTest.scala
@chia7712 chia7712 merged commit aacf3a4 into apache:trunk May 22, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients core Kafka Broker tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants