Description
Code below assumes that timeout is in milliseconds when calculating deadline.
@Override public RecordMetadata get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { // Handle overflow. long now = System.currentTimeMillis(); long deadline = Long.MAX_VALUE - timeout < now ? Long.MAX_VALUE : now + timeout;
kafka.server.DynamicBrokerReconfigurationTest#testAdvertisedListenerUpdate failed sometimes for me and it took me to this code segment.
Attachments
Issue Links
- links to