private void awaitStop(int pid) {
    ProcessUtilsProvider processUtils = NativeProcessUtils.create();
    await().untilAsserted(() -> {
      assertThat(processUtils.isProcessAlive(pid))
          .as("Process for %s with pid %d is alive", processType, pid)
          .isFalse();
    });
  }
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