This bug seems to be introduced by
TINKERPOP-1714. The timeout future in GremlinExecutor.eval() is not cancelled when the evaluation future is completed successfully before the timeout (lines 304ff). This was done correctly before the changes introduced by TINKERPOP-1714. Code to reproduce:
When the code leaves the try-block it calls GremlinExecutor.close() which will clean up executorService and scheduledExecutorService, but because the timeout future is not cancelled this will hang until the future is finished (here 15s).
Workaround: Provide an own ExecutorService when constructing a GremlinExecutor instance and cancel all tasks when the script evaluation is finished successfully.