Examples of stopAndWait()


Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

        }
      }
    }).build(), RetryStrategies.fixDelay(0, TimeUnit.SECONDS)));
    client.startAndWait();

    zkServer.stopAndWait();

    Assert.assertTrue(disconnectLatch.await(1, TimeUnit.SECONDS));

    final CountDownLatch createLatch = new CountDownLatch(1);
    Futures.addCallback(client.create("/testretry/test", null, CreateMode.PERSISTENT), new FutureCallback<String>() {
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

    zkServer.startAndWait();

    try {
      Assert.assertTrue(createLatch.await(5, TimeUnit.SECONDS));
    } finally {
      zkServer.stopAndWait();
    }
  }

  @Test
  public void testACL() throws IOException, ExecutionException, InterruptedException, NoSuchAlgorithmException {
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      noAuthClient.stopAndWait();
      zkClient.stopAndWait();

    } finally {
      zkServer.stopAndWait();
    }
  }
}
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      } finally {
        zkClient.stopAndWait();
      }
    } finally {
      zkServer.stopAndWait();
    }
  }

  private void watchDataChange(final ZKClientService zkClient, final String path,
                               final Semaphore semaphore, final AtomicReference<String> stateMatch) {
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      Assert.assertTrue(service.state() == Service.State.TERMINATED || terminateLatch.await(2, TimeUnit.SECONDS));

      zkClientService.stopAndWait();

    } finally {
      zkServer.stopAndWait();
    }
  }

  // Test controller created before service starts.
  @Test
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      service.stop();

      Assert.assertTrue(stopLatch.await(2, TimeUnit.SECONDS));

    } finally {
      zkServer.stopAndWait();
    }
  }

  // Test controller listener receive first state change without state transition from service
  @Test
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      service.stopAndWait();

      zkClientService.stopAndWait();
    } finally {
      zkServer.stopAndWait();
    }
  }

  private Service createService(ZKClient zkClient, RunId runId) {
    return new ZKServiceDecorator(
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      } finally {
        client.stopAndWait();
      }
    } finally {
      zkServer.stopAndWait();
    }
  }
}
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

      } finally {
        client.stopAndWait();
      }
    } finally {
      zkServer.stopAndWait();
    }
  }

  @Test
  public void testCreateParent() throws ExecutionException, InterruptedException {
View Full Code Here

Examples of org.apache.twill.internal.zookeeper.InMemoryZKServer.stopAndWait()

        Assert.assertTrue(Arrays.equals("testing".getBytes(), client.getData(path).get().getData()));
      } finally {
        client.stopAndWait();
      }
    } finally {
      zkServer.stopAndWait();
    }
  }

  @Test
  public void testGetChildren() throws ExecutionException, InterruptedException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.