wait for graph to complete in tests