Java Code Examples for java.util.List.wait()

The following are Jave code examples for showing how to use wait() of the java.util.List class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project:   File:   Source Code and License Vote up 5 votes
public void testRemoveOneAsynchronous() throws Exception {
    qu = new QuorumUtil(2); 
    qu.disableJMXTest = true;
    ZooKeeper[] zkArr = createHandles(qu);
    ZooKeeperAdmin[] zkAdminArr = createAdminHandles(qu);

    List<String> leavingServers = new ArrayList<String>();
    // lets remove someone who's not the leader
    leavingServers.add(getLeaderId(qu) == 5 ? "4": "5");
    List<Integer> results = new LinkedList<Integer>();
    zkAdminArr[1].reconfigure(null, leavingServers, null, -1, this, results);
    synchronized (results) {
        while (results.size() < 1) {
    Assert.assertEquals(0, (int) results.get(0));
    testNormalOperation(zkArr[1], zkArr[2]);       
    for (int i=1; i<=5; i++)
        testServerHasConfig(zkArr[i], null, leavingServers);

    closeAllHandles(zkArr, zkAdminArr);