KAFKA-7940: wait until we've got the expected partition size#9777
KAFKA-7940: wait until we've got the expected partition size#9777hachikuji merged 4 commits intoapache:trunkfrom
Conversation
…et partition leader
|
@rajinisivaram , please help review this PR. Thanks. |
|
@rajinisivaram , please help review this PR. Thanks. |
|
@rajinisivaram @junrao , please help review this PR. Thanks. |
|
@rajinisivaram @junrao , please help review this PR. Thanks. |
|
@omkreddy @hachikuji , could you take a look for this PR? https://ci-builds.apache.org/job/Kafka/job/kafka-trunk-jdk11/439/testReport/junit/kafka.server/MultipleListenersWithDefaultJaasContextTest/testProduceConsume__/ |
|
@hachikuji , thanks for the comments. I've updated:
Thank you. |
| TestUtils.waitForPartitionMetadata(servers, topic3, 3) | ||
| TestUtils.waitForPartitionMetadata(servers, topic3, 4) | ||
| TestUtils.waitForPartitionMetadata(servers, topic3, 5) | ||
| TestUtils.waitForPartitionMetadata(servers, topic3, 6) |
There was a problem hiding this comment.
Don't replace them with waitForAllPartitionsMetadata because I'm afraid it'll break the original testing purposes. And same as other places.
hachikuji
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the patch!
The test will create 99 partitions in a topic, and expect we can get the partition info after 15 seconds. If we can't get the partition info within 15 secs, we'll get the error:
Obviously, 15 secs is not enough to complete the 99 partitions creation under slow system. So, fix it by explicitly wait until we've got the expected partition size before retrieving each partition info.
Committer Checklist (excluded from commit message)