Package com.google.dataconnector.util

Examples of com.google.dataconnector.util.ClockUtil


    EasyMock.expectLastCall();
  }

  public void testDispatchAndNormalCheck() throws Exception {

    ClockUtil clock = EasyMock.createMock(ClockUtil.class);
    clock.currentTimeMillis();
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // dispatch
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // before loop
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // creating HCI to send to server
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP + 15000); // checking response time + 15 sec
    // We throw an exception to break out of the loop.  This is called at the log.trace.
View Full Code Here


    }
    fail("did not recieve runtime exception");
  }

  public void testDispatchAndHealthCheckTimeout() throws Exception {
    ClockUtil clock = EasyMock.createMock(ClockUtil.class);
    clock.currentTimeMillis();
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // dispatch
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // before loop
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // creating HCI to send to server
    // Setup health check fail.
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP + 45000); // checking response time + 45 sec
View Full Code Here

TOP

Related Classes of com.google.dataconnector.util.ClockUtil

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.