public void stopServer() throws Exception {
        // calling close() on TinkerGraph does not free resources quickly enough. adding a clear() call let's gc
        // cleanup earlier
        server.getServerGremlinExecutor().getGraphManager().getAsBindings().values().stream()
                .filter(g -> g instanceof AbstractTinkerGraph).forEach(g -> ((AbstractTinkerGraph) g).clear());

        if (server != null) {
            server.stop().join();
        }
    }
This method may be called after {@link #startServer()} to (re-)set the evaluation timeout in
the running server.
@param timeoutInMillis new evaluation timeout
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/AbstractGremlinServerIntegrationTest.java