private static boolean runManyManyStreams()

in grpc-gcp-benchmarks/src/benchmarkTest/java/BigtableLoadTest.java [93:114]


  private static boolean runManyManyStreams(ManagedChannel channel)
      throws InterruptedException, ExecutionException {
    boolean finishRunning = true;
    List<Iterator<ReadRowsResponse>> res = getReadRowsResponses(channel);

    ExecutorService executor = Executors.newSingleThreadExecutor();
    Callable<Object> task =
        new Callable<Object>() {
          public Object call() {
            return readReadRowsResponses(res);
          }
        };
    Future<Object> future = executor.submit(task);
    try {
      Object result = future.get(90, TimeUnit.SECONDS);
    } catch (TimeoutException e) {
      finishRunning = false;
    } finally {
      executor.shutdownNow();
    }
    return finishRunning;
  }