Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for isCancelled (0.18 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  4. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  5. 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)
  6. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  7. 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)
  8. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        assertFalse(task.isCancelled());
    
        // Start the task to put it in the RUNNING state.  Have to use a separate
        // thread because the task will block on the task latch after unblocking
        // the run latch.
        exec.execute(task);
        runLatch.await();
        assertEquals(1, listenerLatch.getCount());
        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  9. 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)
  10. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        assertFalse(task.isCancelled());
    
        // Start the task to put it in the RUNNING state.  Have to use a separate
        // thread because the task will block on the task latch after unblocking
        // the run latch.
        exec.execute(task);
        runLatch.await();
        assertEquals(1, listenerLatch.getCount());
        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
Back to top