Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for awaitRunning (0.17 sec)

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

        service.startAsync().awaitRunning();
        assertEquals(State.RUNNING, service.state());
    
        service.stopAsync().awaitTerminated();
        assertEquals(State.TERMINATED, service.state());
      }
    
      public void testNoOpServiceStartAsyncAndAwaitStopAsyncAndAwait() throws Exception {
        NoOpService service = new NoOpService();
    
        service.startAsync().awaitRunning();
        assertEquals(State.RUNNING, service.state());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

        service.startAsync().awaitRunning();
        assertEquals(State.RUNNING, service.state());
    
        service.stopAsync().awaitTerminated();
        assertEquals(State.TERMINATED, service.state());
      }
    
      public void testNoOpServiceStartAsyncAndAwaitStopAsyncAndAwait() throws Exception {
        NoOpService service = new NoOpService();
    
        service.startAsync().awaitRunning();
        assertEquals(State.RUNNING, service.state());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

     * @author Ben Yu
     */
    public class AbstractIdleServiceTest extends TestCase {
      public void testStart() {
        TestService service = new TestService();
        assertEquals(0, service.startUpCalled);
        service.startAsync().awaitRunning();
        assertEquals(1, service.startUpCalled);
        assertEquals(Service.State.RUNNING, service.state());
        assertThat(service.transitionStates).containsExactly(Service.State.STARTING);
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

            thrownByExecutionThread);
      }
    
      public void testServiceStartStop() throws Exception {
        WaitOnRunService service = new WaitOnRunService();
        assertFalse(service.startUpCalled);
    
        service.startAsync().awaitRunning();
        assertTrue(service.startUpCalled);
        assertEquals(Service.State.RUNNING, service.state());
    
        enterRun.await(); // to avoid stopping the service until run() is invoked
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

              }
            };
    
        assertThrows(IllegalStateException.class, () -> service.startAsync().awaitRunning());
    
        assertTrue(executor.get().awaitTermination(100, MILLISECONDS));
      }
    
      public void testSchedulerOnlyCalledOnce() throws Exception {
        TestService service = new TestService();
        service.startAsync().awaitRunning();
        // It should be called once during startup.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

                return delegate.stopAsync();
              }
    
              @Override
              public final void awaitRunning() {
                delegate.awaitRunning();
              }
    
              @Override
              public final void awaitRunning(long timeout, TimeUnit unit) throws TimeoutException {
                delegate.awaitRunning(timeout, unit);
              }
    
              @Override
              public final void awaitTerminated() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

     * @author Ben Yu
     */
    public class AbstractIdleServiceTest extends TestCase {
      public void testStart() {
        TestService service = new TestService();
        assertEquals(0, service.startUpCalled);
        service.startAsync().awaitRunning();
        assertEquals(1, service.startUpCalled);
        assertEquals(Service.State.RUNNING, service.state());
        assertThat(service.transitionStates).containsExactly(Service.State.STARTING);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

              }
            };
    
        assertThrows(IllegalStateException.class, () -> service.startAsync().awaitRunning());
    
        assertTrue(executor.get().awaitTermination(100, MILLISECONDS));
      }
    
      public void testSchedulerOnlyCalledOnce() throws Exception {
        TestService service = new TestService();
        service.startAsync().awaitRunning();
        // It should be called once during startup.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

            thrownByExecutionThread);
      }
    
      public void testServiceStartStop() throws Exception {
        WaitOnRunService service = new WaitOnRunService();
        assertFalse(service.startUpCalled);
    
        service.startAsync().awaitRunning();
        assertTrue(service.startUpCalled);
        assertEquals(Service.State.RUNNING, service.state());
    
        enterRun.await(); // to avoid stopping the service until run() is invoked
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/Service.java

       *     enter the {@link State#RUNNING} state. e.g. if the {@code state} is {@code
       *     State#TERMINATED} when this method is called then this will throw an IllegalStateException.
       * @since 15.0
       */
      void awaitRunning();
    
      /**
       * Waits for the {@link Service} to reach the {@linkplain State#RUNNING running state} for no more
       * than the given time.
       *
       * @param timeout the maximum time to wait
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 10.7K bytes
    - Viewed (0)
Back to top