Package org.auraframework.impl.context.LoggingContextImpl

Examples of org.auraframework.impl.context.LoggingContextImpl.Timer.start()


    public void testTimer() throws Exception {
        Timer timer = new Timer("foo");
        assertEquals("Uninitialized timer has a totalTime", -1, timer.getTime());
        assertEquals("Timer name is wrong", "foo", timer.getName());
       
        timer.start();
        assertEquals("Running timer has a totalTime", -1, timer.getTime());
       
        timer.stop();
        assertTrue("Completed timer has no totalTime", timer.getTime() >= 0);
       
View Full Code Here


    }
   
    public void testNesting() throws Exception {
        Timer timer = new Timer("foo");
       
        timer.start();
        assertEquals("Running timer has a totalTime", -1, timer.getTime());
       
        timer.start();
        assertEquals("Nested Running timer has a totalTime", -1, timer.getTime());
       
View Full Code Here

        Timer timer = new Timer("foo");
       
        timer.start();
        assertEquals("Running timer has a totalTime", -1, timer.getTime());
       
        timer.start();
        assertEquals("Nested Running timer has a totalTime", -1, timer.getTime());
       
        timer.stop();
        assertEquals("Running timer has a totalTime", -1, timer.getTime());
       
View Full Code Here

        Long skipAhead = 60L * 60L * 1000000000L;
        Timer timer = new Timer("foo");
        //this test is a little funky to avoid the need for Thread.sleep()
        //a second timer is used as somewhat of a control.
       
        timer.start();
        assertEquals("Running timer has a totalTime", -1, timer.getTime());
       
        //since totalTime is initially negative even if no time has passed
        //it will change to '0' and this test will pass
        timer.stop();
View Full Code Here

        totalTime.setAccessible(true);
        totalTime.setLong(timer, skipAhead); //assure value > 0 + likely thread down time
       
        Timer innerTimer = new Timer("bar");
        timer.start();
        innerTimer.start();
       
        innerTimer.stop(); //probably '0' totalTime but it could be a whole lot more
        timer.stop();
       
        //if reset is broken in the future this test becomes flappable with false passes
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.