Search in sources :

Example 26 with NotifyBuilder

use of org.apache.camel.builder.NotifyBuilder in project camel by apache.

the class ZipkinClientRecipientListRouteTest method testZipkinRoute.

@Test
public void testZipkinRoute() throws Exception {
    NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create();
    template.requestBody("direct:start", "Hello World");
    assertTrue(notify.matches(30, TimeUnit.SECONDS));
}
Also used : NotifyBuilder(org.apache.camel.builder.NotifyBuilder) Test(org.junit.Test)

Example 27 with NotifyBuilder

use of org.apache.camel.builder.NotifyBuilder in project camel by apache.

the class ZipkinMulticastRouteTest method testZipkinRoute.

@Test
public void testZipkinRoute() throws Exception {
    NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create();
    template.requestBody("direct:start", "Hello World");
    assertTrue(notify.matches(30, TimeUnit.SECONDS));
}
Also used : NotifyBuilder(org.apache.camel.builder.NotifyBuilder) Test(org.junit.Test)

Example 28 with NotifyBuilder

use of org.apache.camel.builder.NotifyBuilder in project camel by apache.

the class ZipkinRecipientListRouteTest method testZipkinRoute.

@Test
public void testZipkinRoute() throws Exception {
    NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create();
    template.requestBody("direct:start", "Hello World");
    assertTrue(notify.matches(30, TimeUnit.SECONDS));
}
Also used : NotifyBuilder(org.apache.camel.builder.NotifyBuilder) Test(org.junit.Test)

Example 29 with NotifyBuilder

use of org.apache.camel.builder.NotifyBuilder in project camel by apache.

the class ZipkinRouteConcurrentTest method testZipkinRoute.

@Test
public void testZipkinRoute() throws Exception {
    NotifyBuilder notify = new NotifyBuilder(context).whenDone(5).create();
    for (int i = 0; i < 5; i++) {
        template.sendBody("seda:foo", "Hello World");
    }
    assertTrue(notify.matches(30, TimeUnit.SECONDS));
}
Also used : NotifyBuilder(org.apache.camel.builder.NotifyBuilder) Test(org.junit.Test)

Example 30 with NotifyBuilder

use of org.apache.camel.builder.NotifyBuilder in project camel by apache.

the class RestApplicationTest method shouldProduceMessages.

@Test
public void shouldProduceMessages() throws Exception {
    // we expect that one or more messages is automatic done by the Camel
    // route as it uses a timer to trigger
    NotifyBuilder notify = new NotifyBuilder(camelContext).whenDone(1).create();
    assertTrue(notify.matches(10, TimeUnit.SECONDS));
}
Also used : NotifyBuilder(org.apache.camel.builder.NotifyBuilder) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Aggregations

NotifyBuilder (org.apache.camel.builder.NotifyBuilder)109 Test (org.junit.Test)72 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)30 File (java.io.File)24 Exchange (org.apache.camel.Exchange)10 RouteBuilder (org.apache.camel.builder.RouteBuilder)9 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)5 HashSet (java.util.HashSet)4 MBeanServer (javax.management.MBeanServer)4 ObjectName (javax.management.ObjectName)4 Processor (org.apache.camel.Processor)4 StopWatch (org.apache.camel.util.StopWatch)4 ConnectException (java.net.ConnectException)3 ExecutorService (java.util.concurrent.ExecutorService)3 Ignore (org.junit.Ignore)3 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Future (java.util.concurrent.Future)2 ZipFile (java.util.zip.ZipFile)2