Package org.mule.tck.probe

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


            // the output file should exist now
            // check that the files with the correct output pattern were generated
            Prober prober = new PollingProber(2000, 50);

            prober.check(new Probe()
            {
                @Override
                public boolean isSatisfied()
                {
                  return FileUtils.newFile(myDir, myFileName1).exists() && FileUtils.newFile(myDir2, myFileName2).exists();
View Full Code Here


    {
        sendMessage("vm://testAsynch");

        file = new File(FILE_PATH);
        Prober prober = new PollingProber(10000, 2000);
        prober.check(new FileCompleteProbe());
    }

    private void sendMessage(String endpoint) throws Exception
    {
        MuleClient client = muleContext.getClient();
View Full Code Here

        LocalMuleClient client = muleContext.getClient();
        client.dispatch("vm://testInput", TEST_MESSAGE, null);
        client.dispatch("vm://testInput", TEST_MESSAGE, null);

        Prober prober = new PollingProber(1000, 10);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return count == 2;
View Full Code Here

        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

        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

        muleContext.start();

        try
        {
            Prober prober = new PollingProber(RECEIVE_TIMEOUT, 100);
            prober.check(new ExceptionListenerInvokedProbe(exceptionListener));
        }
        finally
        {
            latch.countDown();
        }
View Full Code Here

        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

    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

        // Auto-delete happens after FileInputStream.close() when streaming.  Streaming is default.
        assertTrue(tempDir.listFiles().length > 0);
        ((InputStream) message.getPayload()).close();
        // Give file-system some time (annoying but necessary wait apparently due to OS caching?)
        Prober prober = new PollingProber(1000, 100);
        prober.check(new Probe()
        {
            @Override
            public boolean isSatisfied()
            {
                return tempDir.listFiles().length == 0;
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.