Package org.apache.hadoop.chukwa.datacollection.writer

Examples of org.apache.hadoop.chukwa.datacollection.writer.ClientAck


import org.apache.hadoop.chukwa.datacollection.writer.ClientAck;

public class TestClientAck extends TestCase {

  public void testWait4AckTimeOut() {
    ClientAck clientAck = new ClientAck();
    long startDate = System.currentTimeMillis();
    clientAck.wait4Ack();
    long now = System.currentTimeMillis();
    long duration = now - startDate;
    duration = duration - clientAck.getTimeOut();

    Assert.assertTrue("should not wait nore than " + clientAck.getTimeOut()
        + " + 7sec", duration < 7000);
    Assert.assertEquals(ClientAck.KO_LOCK, clientAck.getStatus());
  }
View Full Code Here


import org.apache.hadoop.chukwa.datacollection.writer.ClientAck;

public class TestClientAck extends TestCase {

  public void testWait4AckTimeOut() {
    ClientAck clientAck = new ClientAck();
    long startDate = System.currentTimeMillis();
    clientAck.wait4Ack();
    long now = System.currentTimeMillis();
    long duration = now - startDate;
    duration = duration - clientAck.getTimeOut();

    Assert.assertTrue("should not wait nore than " + clientAck.getTimeOut()
        + " + 7sec", duration < 7000);
    Assert.assertEquals(ClientAck.KO_LOCK, clientAck.getStatus());
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.datacollection.writer.ClientAck

Copyright © 2018 www.massapicom. 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.