code: public static <T> boolean await(CompletableFuture<T> f, long timeout) {
          Exceptions.handleInterrupted(() -> {
              try {
                  f.get(timeout, TimeUnit.MILLISECONDS);
              } catch (TimeoutException | ExecutionException e) {
                  // Not handled here.
              }
          });
          return isSuccessful(f);
      }
docs: Waits for the provided future to be complete, and returns true if it was successful, false if it failed
  or did not complete.
  
  @param timeout The maximum number of milliseconds to block
  @param f       The future to wait for.
  @param <T>     The Type of the future's result.
  @return True if the given CompletableFuture is completed and successful within the given timeout.