java-client-api icon indicating copy to clipboard operation
java-client-api copied to clipboard

Wrong timeout conversion in awaitCompletion

Open hapeka72 opened this issue 2 years ago • 3 comments

Hi,

the conversion of the timeout in this line is wrong: https://github.com/marklogic/java-client-api/blob/b68bab95f566c48efe37bda76de531cc7f21924f/marklogic-client-api/src/main/java/com/marklogic/client/datamovement/impl/WriteBatcherImpl.java#L890

It should be like this: long duration = TimeUnit.MILLISECONDS.convert(timeout, unit);

hapeka72 avatar Feb 14 '24 08:02 hapeka72

Thanks for the report @hapeka72 , we'll look into this today.

rjrudin avatar Feb 14 '24 12:02 rjrudin

Confirming that your finding is correct. We'll have a fix for this in the next release with tests to ensure that awaitCompletion is honoring the user-defined timeout correctly.

rjrudin avatar Feb 14 '24 19:02 rjrudin

Perfect, thank you!

hapeka72 avatar Feb 15 '24 08:02 hapeka72

This will be in the 6.6.0 release this week.

rjrudin avatar Apr 24 '24 14:04 rjrudin