Package com.linkedin.databus.core.util.RateMonitor

Examples of com.linkedin.databus.core.util.RateMonitor.MockRateMonitor.ticks()


    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
     
    curTime = (1L * DbusConstants.NUM_NSECS_IN_SEC) - 10 ;
    mrm.ticks(10L);
    mrm.setNanoTime(curTime);
    Assert.assertEquals(true, rc.checkRateExceeded());

    curTime = (1L * DbusConstants.NUM_NSECS_IN_SEC);
    mrm.setNanoTime(curTime);
View Full Code Here


    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
   
    curTime = (1L * DbusConstants.NUM_NSECS_IN_SEC) - 10 ;
    mrm.ticks(10L);
    mrm.setNanoTime(curTime);
    Assert.assertEquals(10, rc.computeSleepDuration());

    curTime = (1L * DbusConstants.NUM_NSECS_IN_SEC) ;
    mrm.setNanoTime(curTime);
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.