Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 18 for TimeoutException (0.11 seconds)

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

          return exceptionCatchingExecutor;
        }
      }
    
      public void testServiceTimeoutOnStartUp() throws Exception {
        TimeoutOnStartUp service = new TimeoutOnStartUp();
    
        TimeoutException e =
            assertThrows(
                TimeoutException.class, () -> service.startAsync().awaitRunning(1, MILLISECONDS));
        assertThat(e).hasMessageThat().contains(Service.State.STARTING.toString());
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 12.9K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

          return exceptionCatchingExecutor;
        }
      }
    
      public void testServiceTimeoutOnStartUp() throws Exception {
        TimeoutOnStartUp service = new TimeoutOnStartUp();
    
        TimeoutException e =
            assertThrows(
                TimeoutException.class, () -> service.startAsync().awaitRunning(1, MILLISECONDS));
        assertThat(e).hasMessageThat().contains(Service.State.STARTING.toString());
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 12.9K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        ServiceManager manager = new ServiceManager(asList(a));
        manager.startAsync();
        assertThrows(TimeoutException.class, () -> manager.awaitHealthy(1, MILLISECONDS));
        manager.awaitHealthy(5, SECONDS); // no exception thrown
    
        manager.stopAsync();
        assertThrows(TimeoutException.class, () -> manager.awaitStopped(1, MILLISECONDS));
        manager.awaitStopped(5, SECONDS); // no exception thrown
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 17:49:12 GMT 2025
    - 25.5K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

    import static org.junit.Assert.assertThrows;
    
    import java.util.concurrent.CancellationException;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Test cases for {@link SettableFuture}.
     *
     * @author Sven Mawson
     */
    @NullUnmarked
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 17:49:12 GMT 2025
    - 7.3K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/TestThread.java

       *
       * @throws TimeoutException if this thread does not accept the request within a reasonable amount
       *     of time
       */
      private void sendRequest(String methodName, Object... arguments) throws Exception {
        if (!requestQueue.offer(new Request(methodName, arguments), TIMEOUT_MILLIS, MILLISECONDS)) {
          throw new TimeoutException();
        }
      }
    
      /**
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 21:00:51 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

       *
       * @param timeout the maximum time to wait
       * @throws TimeoutException if not all of the services have stopped within the deadline
       * @since 33.4.0 (but since 28.0 in the JRE flavor)
       */
      @IgnoreJRERequirement // Users will use this only if they're already using Duration.
      public void awaitStopped(Duration timeout) throws TimeoutException {
        awaitStopped(toNanosSaturated(timeout), TimeUnit.NANOSECONDS);
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 17:49:12 GMT 2025
    - 33.2K bytes
    - Click Count (1)
  7. guava/src/com/google/common/util/concurrent/ServiceManager.java

       * @throws TimeoutException if not all of the services have finished starting within the deadline
       * @throws IllegalStateException if the service manager reaches a state from which it cannot
       *     become {@linkplain #isHealthy() healthy}.
       * @since 28.0 (but only since 33.4.0 in the Android flavor)
       */
      public void awaitHealthy(Duration timeout) throws TimeoutException {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 17:49:12 GMT 2025
    - 32.9K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

    import static org.junit.Assert.assertThrows;
    
    import java.util.concurrent.CancellationException;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Test cases for {@link SettableFuture}.
     *
     * @author Sven Mawson
     */
    @NullUnmarked
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 17:49:12 GMT 2025
    - 7.3K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/util/concurrent/TestThread.java

       *
       * @throws TimeoutException if this thread does not accept the request within a reasonable amount
       *     of time
       */
      private void sendRequest(String methodName, Object... arguments) throws Exception {
        if (!requestQueue.offer(new Request(methodName, arguments), TIMEOUT_MILLIS, MILLISECONDS)) {
          throw new TimeoutException();
        }
      }
    
      /**
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 21:00:51 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

    import com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullMarked;
    
    /**
     * Tests for {@link FluentFuture}. The tests cover only the basics for the API. The actual logic is
     * tested in {@link FuturesTest}.
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 5.7K bytes
    - Click Count (0)
Back to Top