Examples of matchesMockWaitTime()


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

        for (int i = 0; i < 10; ++i) {
            template.sendBodyAndHeader("file://target/file-batch2", "CIAO", "CamelFileName", "CIAO" + i);
        }

        Assert.assertTrue("Timeout waiting for match" + nb.toString(), nb.matchesMockWaitTime());
        context.stop();

        Configuration conf = new Configuration();
        Path file1 = new Path("file:///" + file.toUri());
        FileSystem fs1 = FileSystem.get(file1.toUri(), conf);
View Full Code Here

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

        for (int i = 0; i < 10; ++i) {
            template.sendBodyAndHeader("file://target/file-batch3", "CIAO", "CamelFileName", "CIAO" + i);
        }

        Assert.assertTrue("Timeout waiting for match" + nb.toString(), nb.matchesMockWaitTime());
        context.stop();

        Configuration conf = new Configuration();
        Path file1 = new Path("file:///" + file.toUri());
        FileSystem fs1 = FileSystem.get(file1.toUri(), conf);
View Full Code Here

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

        for (int i = 0; i < 10; ++i) {
            template.sendBodyAndHeader("file://target/file-batch4", "CIAO" + i, "CamelFileName", "CIAO" + i);
        }

        Assert.assertTrue("Timeout waiting for match" + nb.toString(), nb.matchesMockWaitTime());
        context.stop();

        Configuration conf = new Configuration();
        Path file1 = new Path("file:///" + file.toUri());
        FileSystem fs1 = FileSystem.get(file1.toUri(), conf);
View Full Code Here

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

        }
        for (int i = 0; i < 2; ++i) {
            template.sendBodyAndHeader("file://target/file-batch5", bb, "CamelFileName", "CIAO" + i);
        }

        Assert.assertTrue("Timeout waiting for match" + nb.toString(), nb.matchesMockWaitTime());
        context.stop();

        Configuration conf = new Configuration();
        Path file1 = new Path("file:///" + file.toUri() + '/' + HdfsConstants.DEFAULT_SEGMENT_PREFIX + 0);
        FileSystem fs1 = FileSystem.get(file1.toUri(), conf);
View Full Code Here

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

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

        assertMockEndpointsSatisfied();

        notify.matchesMockWaitTime();

        File file = new File("./target/file2file/out/hello.txt");
        file = file.getAbsoluteFile();
        assertTrue("The file should exists", file.exists());
    }
View Full Code Here

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

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

        template.sendBody("activemq:queue:foo", "blah");

        notify.matchesMockWaitTime();

        assertTrue("Expected only 1 calls to process() (1 failure) but encountered "
                   + getConditionalExceptionProcessor().getCount() + "."
                   , getConditionalExceptionProcessor().getCount() == 1);
    }
View Full Code Here

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

        template.sendBodyAndHeader("file://target/deletefile", body, Exchange.FILE_NAME, "hello.txt");

        getMockEndpoint("mock:result").expectedBodiesReceived(body);

        assertMockEndpointsSatisfied();
        notify.matchesMockWaitTime();

        assertEquals(3, counter);

        // assert the file is deleted
        File file = new File("./target/deletefile/hello.txt");
View Full Code Here

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

    public void testJmsInOnlyHttpPostIssue() throws Exception {
        NotifyBuilder notify = new NotifyBuilder(context).whenCompleted(1).from("jms*").create();

        template.sendBody("jms:queue:in", "Hello World");

        assertTrue("Should complete the JMS route", notify.matchesMockWaitTime());
    }

    @Test
    public void testJmsInOutHttpPostIssue() throws Exception {
        String out = template.requestBody("jms:queue:in", "Hello World", String.class);
View Full Code Here

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

        context.startRoute("FromFilePollThirdTimeOkTest");

        getMockEndpoint("mock:result").expectedBodiesReceived(body);

        assertMockEndpointsSatisfied();
        assertTrue(notify.matchesMockWaitTime());
        assertEquals(3, counter);

        // assert the file is deleted
        File file = new File("./target/deletefile/hello.txt").getAbsoluteFile();
        assertFalse("The file should have been deleted", file.exists());
View Full Code Here

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

        mock.expectedMessageCount(1);

        template.sendBody("direct:start", "Hello World");

        assertMockEndpointsSatisfied();
        notify.matchesMockWaitTime();

        assertEquals("onCompleteA", sync);
        assertEquals("onCompleteA", lastOne);
    }
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.