Package org.mule.tck.probe

Examples of org.mule.tck.probe.Probe


        MuleClient muleClient = muleContext.getClient();

        bayeuxClient.publish("/test2", "Ross", null);
        final MuleMessage msg = muleClient.request("vm://in2", RECEIVE_TIMEOUT * 2);
        Prober prober = new PollingProber();
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return msg != null;
View Full Code Here


    private void waitForFiles(final File folder, final int expectedAmount) throws InterruptedException
    {
        PollingProber prober = new PollingProber(PROBER_TIMEOUT, PROBER_POLLING_INTERVAL);

        prober.check(new Probe() {
            int lastAmount = 0;

            @Override
            public boolean isSatisfied() {
                lastAmount = FileUtils.listFiles(folder, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE).size();
View Full Code Here

    public void detectsDeletedFilesWhileWaitingForFileChanges() throws Exception
    {
        pollingLatch.countDown();

        Prober prober = new PollingProber(RECEIVE_TIMEOUT, 50);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                return pollingInvoked;
            }
View Full Code Here

    @Test
    public void testNoException() throws Exception
    {
        tmpDir = createFolder(getFileInsideWorkingDirectory("noException").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                // Delivery was successful so message should be gone
View Full Code Here

    @Test
    public void testTransformerException() throws Exception
    {
        tmpDir = createFolder(getFileInsideWorkingDirectory("transformerException").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                // Delivery failed so message should have been restored at the source
View Full Code Here

    @Test
    public void testRouterException() throws Exception
    {
        tmpDir = createFolder(getFileInsideWorkingDirectory("routerException").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                // Delivery failed so message should have been restored at the source
View Full Code Here

    @Test
    public void testComponentException() throws Exception
    {
        tmpDir = createFolder(getFileInsideWorkingDirectory("componentException").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                // Component exception occurs after the SEDA queue for an
View Full Code Here

    @Test
    public void testCatchExceptionStrategyConsumesMessage() throws Exception
    {
        tmpDir = createFolder(getFileInsideWorkingDirectory("exceptionHandled").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                // Component exception occurs after the SEDA queue for an
View Full Code Here

    @Test
    public void testDefaultExceptionStrategyConsumesMessage() throws Exception
    {
        tmpDir = createFolder(getFileInsideWorkingDirectory("commitOnException").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                // Component exception occurs after the SEDA queue for an
View Full Code Here

        final File file = createDataFile(tmpDir, "test1.txt");
        if (!exceptionStrategyLatch.await(RECEIVE_TIMEOUT, TimeUnit.MILLISECONDS))
        {
            fail("message should be redelivered");
        }
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return !file.exists();
View Full Code Here

TOP

Related Classes of org.mule.tck.probe.Probe

Copyright © 2018 www.massapicom. 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.