-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Conversation
There was a problem hiding this 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.
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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
...integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m1a2st: LGTM
There was a problem hiding this 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.
...integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerTest.java
Outdated
Show resolved
Hide resolved
...integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerTest.java
Outdated
Show resolved
Hide resolved
...integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerTest.java
Outdated
Show resolved
Hide resolved
...integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerTest.java
Outdated
Show resolved
Hide resolved
...integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
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 { |
There was a problem hiding this comment.
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
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]