marklogic / java-client-api

Java client for the MarkLogic enterprise NoSQL database
https://docs.marklogic.com/guide/java
Apache License 2.0
58 stars 73 forks source link

Wrong timeout conversion in awaitCompletion #1637

Closed hapeka72 closed 2 months ago

hapeka72 commented 4 months ago

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);

rjrudin commented 4 months ago

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

rjrudin commented 4 months ago

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.

hapeka72 commented 4 months ago

Perfect, thank you!

rjrudin commented 2 months ago

This will be in the 6.6.0 release this week.