Package org.mule.tck.probe

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


        client.dispatch("vm://in5", "test", null);

        assertExceptionMessage(client.request("vm://out5", RECEIVE_TIMEOUT));

        Prober prober = new PollingProber(5000, 100);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return !service.getLifecycleState().isStarted();
View Full Code Here


    public static void assertFileExists(File pluginsDir, String filePath)
    {
        Prober prober = new PollingProber(5000, 100);
        File marker = new File(pluginsDir, filePath);
        prober.check(new FileExists(marker));
    }
}
View Full Code Here

    }

    private void assertNotificationsArrived()
    {
        PollingProber prober = new PollingProber(TIMEOUT_MILLIS, POLL_DELAY_MILLIS);
        prober.check(new JUnitProbe()
        {
            @Override
            protected boolean test() throws Exception
            {
                assertThat(exceptionStrategyStartNotification, is(not(nullValue())));
View Full Code Here

        FileUtils.stringToFile(basepath + "/in/foo.txt", text);

        File file = FileUtils.newFile(basepath, "out/foo.txt.processed");

        PollingProber pollingProber = new PollingProber(5000, 10);
        pollingProber.check(new FileExists(file));

        String result = FileUtils.readFileToString(file, "UTF8");
        assertEquals(text, result);
    }
}
View Full Code Here

        doTest("evict_one", PoolingProfile.WHEN_EXHAUSTED_WAIT,
               PoolingProfile.INITIALISE_ALL, 1, 1, 0);


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

    }

    private void assertNotificationsArrived()
    {
        PollingProber pollingProber = new PollingProber(TIMEOUT_MILLIS, POLL_DELAY_MILLIS);
        pollingProber.check(new JUnitProbe()
        {
            @Override
            protected boolean test() throws Exception
            {
                assertThat(notifications.size(), greaterThanOrEqualTo(2));
View Full Code Here

        {
            final JmsConnector jmsConnector = (JmsConnector) muleContext.getRegistry().lookupConnector("jmsConnector");
            assertThat(jmsConnector.isConnected(), is(false));
            JmsTestContextFactory.failWhenRetrievingInitialContext = false;
            PollingProber prober = new PollingProber(RECEIVE_TIMEOUT,100);
            prober.check(new Probe()
            {
                @Override
                public boolean isSatisfied()
                {
                    return jmsConnector.isConnected();
View Full Code Here

    protected void assertThreads(final int acceptors)
    {
        PollingProber prober = new PollingProber(5000, 50);

        prober.check(new Probe()
        {
            int actual;

            public boolean isSatisfied()
            {
View Full Code Here

        assertConsumersCount();

        this.stopBroker();

        PollingProber prober = new PollingProber(TIMEOUT_MILLIS, 500);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return receiver.consumers.isEmpty();
View Full Code Here

            }
        });

        this.startBroker();

        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                try
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.