public void testBackgroundCallWaitingOnError()

in BoltsTest/src/bolts/TaskTest.java [151:161]


  public void testBackgroundCallWaitingOnError() throws Exception {
    Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
      public Integer call() throws Exception {
        Thread.sleep(100);
        throw new RuntimeException();
      }
    });
    task.waitForCompletion();
    assertTrue(task.isCompleted());
    assertTrue(task.isFaulted());
  }