Package org.mule.tck.probe

Examples of org.mule.tck.probe.PollingProber


    @Test
    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


    }

    @Before
    public void setUp() throws IOException
    {
        prober = new PollingProber(10000, 100);
        testFolder1 = getFileInsideWorkingDirectory("testData1").getAbsolutePath();
        testFolder2 = getFileInsideWorkingDirectory("testData2").getAbsolutePath();
    }
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

    protected void assertOnlyOneThreadWaiting(final List<String> messages, CountDownLatch latch)
    {
        boolean failure = false;

        Prober prober = new PollingProber(RECEIVE_TIMEOUT, 50);
        try
        {
            prober.check(new Probe()
            {
                private final int count = 1;

                @Override
                public boolean isSatisfied()
View Full Code Here

        assertStatus(artifactName, ApplicationStatus.STARTED);
    }

    private void assertDeploymentSuccess(final DeploymentListener listener, final String artifactName)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                try
                {
View Full Code Here

        });
    }

    private void assertMuleContextCreated(final DeploymentListener listener, final String appName)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                try
                {
View Full Code Here

        });
    }

    private void assertMuleContextInitialized(final DeploymentListener listener, final String appName)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                try
                {
View Full Code Here

        });
    }

    private void assertMuleContextConfigured(final DeploymentListener listener, final String appName)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                try
                {
View Full Code Here

        });
    }

    private void assertUndeploymentSuccess(final DeploymentListener listener, final String appName)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                try
                {
View Full Code Here

        assertStatus(app, status);
    }

    private void assertStatus(final Application application, final ApplicationStatus status)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new JUnitProbe()
        {
            @Override
            protected boolean test() throws Exception
            {
                assertThat(application.getStatus(), is(status));
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.