@gardnervickers I see. Thanks for the explanation.

In general we want to make sure that every API will either succeed or timeout 
within a given limited time in test. So it is preferred to use 
`producer.send(record).get(6000, TimeUnit.MILLISECONDS)` rather than 
`producer.send(record).get()`.

Also, would it be better to fix the test by simply adding 
`producer.send(record).get(6000, TimeUnit.MILLISECONDS)` after the code block 
used for `Wait for producer to update metadata for the partition`? In 
comparison to the current fix, the alternative solution seems simpler (by just 
adding one line). And the logic may also be clearer as we first what for 
metadata to be updated and then use `producer.send(...).get(...)` to verify 
that the message will be sent successfully without any exception.

[ Full content available at: https://github.com/apache/kafka/pull/5695 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org

Reply via email to