Package org.auraframework.impl.context.LoggingContextImpl

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


        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);
       
        timer.reset();
        assertEquals("Reseted timer has a totalTime", -1, timer.getTime());
    }
View Full Code Here


        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());
       
        timer.stop();
        assertTrue("Completed timer has no totalTime", timer.getTime() >= 0);
    }
View Full Code Here

        assertEquals("Nested Running timer has a totalTime", -1, timer.getTime());
       
        timer.stop();
        assertEquals("Running timer has a totalTime", -1, timer.getTime());
       
        timer.stop();
        assertTrue("Completed timer has no totalTime", timer.getTime() >= 0);
    }
   
    public void testRestart() throws Exception {
        Long skipAhead = 60L * 60L * 1000000000L;
 
View Full Code Here

        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();
        assertTrue("Completed timer has no totalTime", timer.getTime() >= 0);
       
        Field totalTime = Timer.class.getDeclaredField("totalTime");
        totalTime.setAccessible(true);
        totalTime.setLong(timer, skipAhead); //assure value > 0 + likely thread down time
View Full Code Here

       
        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
        //that would be the case if the innerTimer above waited for 1h less that the timer under test.
        //this is extremely unlikely.
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.