showuon commented on code in PR #15165:
URL: https://github.com/apache/kafka/pull/15165#discussion_r1611532703
##########
storage/src/test/java/org/apache/kafka/server/log/remote/metadata/storage/ConsumerTaskTest.java:
##########
@@ -241,16 +258,25 @@ public void testCanProcessRecord() throws
InterruptedException {
TestUtils.waitForCondition(() ->
consumerTask.readOffsetForMetadataPartition(metadataPartition).equals(Optional.of(1L)),
"Couldn't read record");
assertEquals(2, handler.metadataCounter);
- // should only read the tpId1 records
+ // Adding assignment for partition 1 after related metadata records
have already been read
consumerTask.addAssignmentsForPartitions(Collections.singleton(tpId1));
- TestUtils.waitForCondition(() ->
consumerTask.isUserPartitionAssigned(tpId1), "Timed out waiting for " + tpId1 +
" to be assigned");
- addRecord(consumer, metadataPartition, tpId1, 2);
Review Comment:
+1. I'd like to see the original test cases are kept, and the tpId3 test is
added in the end of the test.
--
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]