Package org.mule.tck.probe

Examples of org.mule.tck.probe.PollingProber.check()


        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


    }

    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

    }
   
    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.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

    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

        assertEquals("Hello Dan", result.getPayload());

        final GreeterImpl impl = getGreeter();

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

        assertEquals(1, impl.getInvocationCount());
    }

    private GreeterImpl getGreeter() throws Exception
View Full Code Here

        {
            os.store(i, i);
        }

        PollingProber prober = new PollingProber(expirationInterval * 5, expirationInterval);
        prober.check(new JUnitProbe()
        {
            @Override
            public boolean test() throws Exception
            {
                assertThat(os.contains(0), is(false));
View Full Code Here

        {
            os.store(i,i);
        }

        PollingProber prober = new PollingProber(1000, expirationInterval);
        prober.check(new JUnitProbe()
        {
            @Override
            public boolean test() throws Exception
            {
                return os.allKeys().isEmpty();
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.