Package org.apache.camel.util

Examples of org.apache.camel.util.StopWatch.taken()


        StopWatch watch = new StopWatch();
        execute(count);

        assertMockEndpointsSatisfied();
        log.warn("Ran {} tests in {}ms", count, watch.taken());
    }

    @Test
    public void testFilter() throws InterruptedException {
        template.setDefaultEndpointUri("direct:filter");
View Full Code Here


        StopWatch watch = new StopWatch();
        execute(count);

        assertMockEndpointsSatisfied();
        log.warn("Ran {} tests in {}ms", count, watch.taken());
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

        StopWatch watch = new StopWatch();
        execute(count);

        assertMockEndpointsSatisfied();
        log.warn("Ran {} tests in {}ms", count, watch.taken());
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

        StopWatch watch = new StopWatch();

        while (!exclusive) {
            // timeout check
            if (timeout > 0) {
                long delta = watch.taken();
                if (delta > timeout) {
                    LOG.warn("Cannot acquire read lock within " + timeout + " millis. Will skip the file: " + file);
                    // we could not get the lock within the timeout period, so return false
                    return false;
                }
View Full Code Here

            StopWatch watch = new StopWatch();

            while (!exclusive) {
                // timeout check
                if (timeout > 0) {
                    long delta = watch.taken();
                    if (delta > timeout) {
                        LOG.warn("Cannot acquire read lock within " + timeout + " millis. Will skip the file: " + target);
                        // we could not get the lock within the timeout period, so return false
                        return false;
                    }
View Full Code Here

        boolean exclusive = false;
        while (!exclusive) {
            // timeout check
            if (timeout > 0) {
                long delta = watch.taken();
                if (delta > timeout) {
                    LOG.warn("Cannot acquire read lock within " + timeout + " millis. Will skip the file: " + file);
                    // we could not get the lock within the timeout period, so return false
                    return false;
                }
View Full Code Here

        LOG.info("Waiting to process all the files");
        boolean matches = notify.matches(3, TimeUnit.MINUTES);
        LOG.info("Should process all files " + matches);

        LOG.info("Time taken " + watch.taken() + " ms");
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
View Full Code Here

    @Test
    public void testStopwatch() {
        StopWatch stopWatch = StopWatchTestExecutionListener.getStopWatch();
       
        assertNotNull(stopWatch);
        assertTrue(stopWatch.taken() < 100);
    }
   
    @Test
    public void testExcludedRoute() {
        assertNotNull(camelContext.getRoute("excludedRoute"));
View Full Code Here

    @Test
    public void testStopwatch() {
        StopWatch stopWatch = StopWatchTestExecutionListener.getStopWatch();
       
        assertNotNull(stopWatch);
        long taken = stopWatch.taken();
        assertTrue(taken + " > 0, but was: " + taken, taken > 0);
        assertTrue(taken + " < 3000, but was: " + taken, taken < 3000);
    }
}
View Full Code Here

        for (int i = 0; i < size; i++) {
            String out = template.requestBody("http://localhost:{{port}}?foo=" + i, null, String.class);
            assertEquals("Bye " + i, out);
        }

        log.info("Time taken: " + TimeUtils.printDuration(watch.taken()));
    }
   
    @Test
    public void testHttpProxyWithDifferentPath() throws Exception {
        String out = template.requestBody("http://localhost:{{port}}/proxy", null, String.class);
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.