Package org.mule.tck.probe

Examples of org.mule.tck.probe.PollingProber


    {
        final TestEventProcessingThread processingThread = new TestEventProcessingThread("testEventProcessingThread", 1);
        try
        {
            processingThread.start();
            Prober prober = new PollingProber(100, 1);
            prober.check(new Probe()
            {
                public boolean isSatisfied()
                {
                    return processingThread.count > 1;
                }
View Full Code Here


                Thread.sleep(verificationTimeout);
                assertThat(outboundMessagesVerifier.numberOfMessagesThatArrived(), Is.is(0));
            }
            else
            {
                new PollingProber(10000, 100).check(new Probe()
                {
                    @Override
                    public boolean isSatisfied()
                    {
                        try
View Full Code Here

        verifyInputStreamIsClosed(inputStream);
    }

    private void verifyInputStreamIsClosed(final ClosableInputStream is)
    {
        final PollingProber pollingProber = new PollingProber(timeoutMs, 100);
        pollingProber.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return is.isClosed();
View Full Code Here

        assertAttachmentWasSaved();
    }
   
    private void assertAttachmentWasSaved()
    {
        Prober prober = new PollingProber(10000, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                // FIXME DZ: don't know why these are empty, so just compare the saved email
                // file to the expected content
View Full Code Here

        fos.write(feed.getBytes("UTF-8"));
        fos.close();

        final EntryReceiver component = (EntryReceiver)getComponent("feedSplitterConsumer");

        PollingProber prober = new PollingProber(10000, 100);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return component.getCount() == 25;
View Full Code Here

    }

    private void waitForPolls()
    {
        Prober prober = new PollingProber(10000, 100);
        prober.check(new Probe()
        {
            private int requiredPollAttempts = numberOfMadePolls+3; // +3 should be safe
            @Override
            public boolean isSatisfied()
            {
View Full Code Here

    @Test
    public void testEchoService() throws Exception
    {
        final EmployeeDirectoryImpl svc = (EmployeeDirectoryImpl) getComponent("employeeDirectoryService");

        Prober prober = new PollingProber(6000, 500);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return (svc.getInvocationCount() == 1);
View Full Code Here

    {
        assertThat(server.getReceivedMessages().length, is(equalTo(NUMBER_OF_MESSAGES)));

        flowExecutionListener.waitUntilFlowIsComplete();

        Prober prober = new PollingProber(TIMEOUT_MILLIS, POLL_DELAY_MILLIS);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return (retrievedMessages.size() == NUMBER_OF_MESSAGES);
View Full Code Here

        }
    }

    private void assertMonitorsCount(final int expectedValue)
    {
        new PollingProber(POLLING_TIMEOUT, POLLING_DELAY).check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return assertMonitors(expectedValue) && assertSchedulers(expectedValue);
View Full Code Here

        MuleMessage result = client.send("clientEndpoint", "Dan", props);
        assertEquals("Hello Dan", result.getPayload());

        final GreeterImpl impl = getGreeter();

        Prober prober = new PollingProber(5000, 100);
        prober.check(new GreeterNotNull(impl));

        assertEquals(1, impl.getInvocationCount());
    }
View Full Code Here

TOP

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

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.