Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for isCancelled (0.19 sec)

  1. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        assertFalse(future.isCancelled());
    
        assertEquals(expectedValue, future.get());
      }
    
      public void testCancelledFuture() throws InterruptedException, ExecutionException {
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertTrue(latch.await(5, TimeUnit.SECONDS));
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertThrows(CancellationException.class, () -> future.get());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        assertFalse(future.isCancelled());
    
        assertEquals(expectedValue, future.get());
      }
    
      public void testCancelledFuture() throws InterruptedException, ExecutionException {
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertTrue(latch.await(5, TimeUnit.SECONDS));
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertThrows(CancellationException.class, () -> future.get());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

      }
    
      /**
       * Tests that a canceled future throws a cancellation exception.
       *
       * <p>This method checks the cancel, isCancelled, and isDone methods.
       */
      public void testCanceledFutureThrowsCancellation() throws Exception {
    
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
    
        CountDownLatch successLatch = new CountDownLatch(1);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java

          return super.get(timeout, unit);
        }
    
        @Override
        public final boolean isDone() {
          return super.isDone();
        }
    
        @Override
        public final boolean isCancelled() {
          return super.isCancelled();
        }
    
        @Override
        public final void addListener(Runnable listener, Executor executor) {
          super.addListener(listener, executor);
        }
    
        @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 19:37:41 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

                 */
                assertFalse(future2.isCancelled());
                // Now attempt to trigger the exception:
                future2.set(DATA2);
              }
            },
            directExecutor());
        assertTrue(compound.cancel(false));
        assertTrue(compound.isCancelled());
        assertTrue(future1.isCancelled());
        assertFalse(future2.isCancelled());
    
        try {
          getDone(compound);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

        assertTrue(task.isDone());
        assertFalse(task.isCancelled());
        assertEquals(2, getDone(task).intValue());
      }
    
      public void testCancelled() throws Exception {
        TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create(returning(2));
        assertFalse(task.isDone());
        task.cancel(false);
        assertTrue(task.isDone());
        assertTrue(task.isCancelled());
        assertFalse(task.wasInterrupted());
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

      }
    
      public void testFutureCancelBeforeInputCompletion() throws Exception {
        assertTrue(resultFuture.cancel(true));
        assertTrue(resultFuture.isCancelled());
        assertTrue(inputFuture.isCancelled());
        assertFalse(outputFuture.isCancelled());
        assertThrows(CancellationException.class, () -> resultFuture.get());
      }
    
      public void testFutureCancellableBeforeOutputCompletion() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

      }
    
      public void testFutureCancelBeforeInputCompletion() throws Exception {
        assertTrue(resultFuture.cancel(true));
        assertTrue(resultFuture.isCancelled());
        assertTrue(inputFuture.isCancelled());
        assertFalse(outputFuture.isCancelled());
        assertThrows(CancellationException.class, () -> resultFuture.get());
      }
    
      public void testFutureCancellableBeforeOutputCompletion() throws Exception {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        // Check that the future has been set properly.
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
        assertThrows(TimeoutException.class, () -> future.get(0, TimeUnit.MILLISECONDS));
        nested.set("foo");
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
        assertEquals("foo", future.get());
      }
    
      private static class Foo {}
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (1)
  10. android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        // Check that the future has been set properly.
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
        assertThrows(TimeoutException.class, () -> future.get(0, TimeUnit.MILLISECONDS));
        nested.set("foo");
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
        assertEquals("foo", future.get());
      }
    
      private static class Foo {}
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
Back to top