Examples of matchesMockWaitTime()


Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        mock.setResultWaitTime(3000);

        List<Exchange> sentExchanges = new ArrayList<Exchange>();
        sendExchangesThroughDroppingThrottler(sentExchanges, 15);

        notify.matchesMockWaitTime();
        mock.assertIsSatisfied();

        validateDroppedExchanges(sentExchanges, mock.getReceivedCounter());
    }
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        // sleep through a complete period
        Thread.sleep(1100);
        // send another 5 now
        sendExchangesThroughDroppingThrottler(sentExchanges, 5);

        notify.matchesMockWaitTime();
        mock.assertIsSatisfied();

        validateDroppedExchanges(sentExchanges, mock.getReceivedCounter());
    }
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(2);
        assertMockEndpointsSatisfied();

        notify.matchesMockWaitTime();

        File file = new File("target/filenoop").getAbsoluteFile();
        assertEquals("There should be 2 files", 2, file.list().length);
    }
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

*/
public class NotifyBuilderOnFailureShutdownCamelIssueTest extends ContextTestSupport {

    public void testIssue() throws Exception {
        NotifyBuilder notify = new NotifyBuilder(context).whenDone(10).create();
        assertTrue(notify.matchesMockWaitTime());
    }

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

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        NotifyBuilder notify = new NotifyBuilder(camelContext).whenDone(1).create();

        ProducerTemplate template = camelContext.createProducerTemplate();
        template.sendBody("seda:foo", "test");

        notify.matchesMockWaitTime();

        exchangesCompleted = statistics.getRouteStatistic(camelContext, list.get(0).getId(), "ExchangesCompleted");
        assertEquals("JMX value incorrect, should be 1", new Long(1), exchangesCompleted);
    }
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
        template.sendBodyAndHeader("file:target/zip", "Hello World", Exchange.FILE_NAME, "hello.txt");
        assertMockEndpointsSatisfied();

        event.matchesMockWaitTime();

        File in = new File("target/zip/hello.txt").getAbsoluteFile();
        assertFalse("Should have been deleted " + in, in.exists());

        File out = new File("target/zip/out/hello.txt.zip").getAbsoluteFile();
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

    }

    @Test
    public void testLocalWorkDirectory() throws Exception {
        NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create();
        assertTrue("Should process one file", notify.matchesMockWaitTime());

        // and the out file should exists
        File out = new File("target/out/hello.txt").getAbsoluteFile();
        assertTrue("file should exists", out.exists());
        assertEquals("Hello World", IOConverter.toString(out, null));
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");

        template.sendBodyAndHeader("file:target/gzip", "Hello World", Exchange.FILE_NAME, "hello.txt");

        assertMockEndpointsSatisfied();
        notify.matchesMockWaitTime();

        File in = new File("target/gzip/hello.txt").getAbsoluteFile();
        assertFalse("Should have been deleted " + in, in.exists());

        File out = new File("target/gzip/out/hello.txt.gz").getAbsoluteFile();
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        getMockEndpoint("mock:result").expectedBodiesReceivedInAnyOrder("A", "B", "C", "D", "E");

        context.startRoute("foo");

        assertMockEndpointsSatisfied();
        assertTrue(notify.matchesMockWaitTime());

        Thread.sleep(250);

        // the done file should be deleted
        assertFalse("Done file should be deleted", new File("target/done/foo.done").exists());
View Full Code Here

Examples of org.apache.camel.builder.NotifyBuilder.matchesMockWaitTime()

        getMockEndpoint("mock:result").expectedBodiesReceivedInAnyOrder("A", "B", "C");

        context.startRoute("bar");

        assertMockEndpointsSatisfied();
        assertTrue(notify.matchesMockWaitTime());

        Thread.sleep(250);

        // the done file should be deleted
        assertFalse("Done file should be deleted", new File("target/done2/a.txt.done").exists());
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.