private void waitForFileToExist() {
    Path file = Paths.get(System.getProperty("user.dir")).resolve(WAITING_FILE_NAME)
        .toAbsolutePath();

    while (!Files.exists(file)) {
      try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
        throw new RuntimeException(e);
      }
    }
  }
Adds a startup task which completes when a specific file is created in the working directory.
geode-assembly/src/acceptanceTest/java/org/apache/geode/launchers/startuptasks/WaitForFileToExist.java