AndrewJSchofield commented on code in PR #21235:
URL: https://github.com/apache/kafka/pull/21235#discussion_r2668130412
##########
clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java:
##########
@@ -2300,6 +2300,7 @@ public void testBehaviorOnDeliveryCountBoundary() {
@ClusterConfigProperty(key = "auto.create.topics.enable", value =
"false"),
@ClusterConfigProperty(key =
"group.share.partition.max.record.locks", value = "10000"),
@ClusterConfigProperty(key =
"group.share.record.lock.duration.ms", value = "15000"),
+ @ClusterConfigProperty(key = "group.share.delivery.count.limit",
value = "10"),
Review Comment:
This line is no longer necessary. Please remove it.
##########
clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java:
##########
@@ -2317,15 +2318,17 @@ public void testComplexShareConsumer() throws Exception
{
ClientState prodState = new ClientState();
- // Produce messages until we want.
+ // Produce a fixed number of messages for deterministic testing.
+ int targetRecordCount = 2000;
service.execute(() -> {
try (Producer<byte[], byte[]> producer = createProducer()) {
- while (!prodState.done().get()) {
+ while (prodState.count().get() < targetRecordCount) {
Review Comment:
This could easily be a `do { ... } while(prodState.count().incrementAndGet()
< targetRecordCount)`. Doesn't seem necessary to call the methods on the
`AtomicInteger` twice per loop iteration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]