Skip to content

KAFKA-19042 Move PlaintextConsumerTest to client-integration-tests module #20081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 7, 2025

Conversation

m1a2st
Copy link
Collaborator

@m1a2st m1a2st commented Jul 1, 2025

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

Reviewers: Jhen-Yung Hsu [email protected], TengYao Chi
[email protected], Chia-Ping Tsai [email protected]

@github-actions github-actions bot added triage PRs from the community core Kafka Broker build Gradle build or GitHub Actions clients labels Jul 1, 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.
A few comments are left.

Comment on lines +1063 to +1071
var brokers = cluster.brokers().values();
brokers.forEach(broker -> assertNoMetric(broker, "byte-rate", QuotaType.PRODUCE, producerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "throttle-time", QuotaType.PRODUCE, producerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "byte-rate", QuotaType.FETCH, consumerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "throttle-time", QuotaType.FETCH, consumerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "request-time", QuotaType.REQUEST, producerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "throttle-time", QuotaType.REQUEST, producerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "request-time", QuotaType.REQUEST, consumerClientId));
brokers.forEach(broker -> assertNoMetric(broker, "throttle-time", QuotaType.REQUEST, consumerClientId));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use a single for-loop here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this approach is clear enough. However, I’m not sure if using a test case record and adding all test cases into a list is the best approach.

@github-actions github-actions bot removed the triage PRs from the community label Jul 3, 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: LGTM

@frankvicky frankvicky requested a review from chia7712 July 4, 2025 08:45
Copy link
Collaborator

@Yunyung Yunyung 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 PR. Partial review.

Copy link
Member

@chia7712 chia7712 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 this patch


@Flaky("KAFKA-18031")
@ClusterTest
public void testClassicConsumerCloseLeavesGroupOnInterrupt() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

Could we leave those flaky in the old framework? It helps us to reproduce the failed tests.

));
}

@Flaky("KAFKA-18031")
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@chia7712 chia7712 merged commit a399852 into apache:trunk Jul 7, 2025
23 checks passed
import org.junit.jupiter.api.Assertions._
import org.junit.jupiter.api.Timeout
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource

import java.util.concurrent.{CompletableFuture, ExecutionException, TimeUnit}
import java.util.concurrent.ExecutionException

@Timeout(600)
class PlaintextConsumerTest extends BaseConsumerTest {
Copy link
Member

Choose a reason for hiding this comment

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

it should extend AbstractConsumerTest instead BaseConsumerTest. otherwise, those tests will be executed on both clients-integration-tests and core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Gradle build or GitHub Actions clients core Kafka Broker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants