public void awaitStop(Path directory) {
    Path serverPidFile =
        rootFolder.resolve(directory).resolve(processType.getPidFileName()).normalize();
    readPid(serverPidFile).ifPresent(this::awaitStop);
  }
Provides methods for stopping and awaiting the termination of server and locator processes.
geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/GfshStopper.java