Package org.mule.tck.listener

Examples of org.mule.tck.listener.ConnectionListener


        // Assert messages are received correctly
        MuleMessage message = client.request("vm://out", RECEIVE_TIMEOUT);
        assertNotNull("No message received", message);

        ConnectionListener connectionListener = new ConnectionListener(muleContext)
                .setExpectedAction(ConnectionNotification.CONNECTION_FAILED).setNumberOfExecutionsRequired(3);

        // Stop the database, Mule should try to reconnect
        stopDatabase();

        // Wait for reconnect attempts ("connect failed" notifications)
        connectionListener.waitUntilNotificationsAreReceived();

        // Restart the database
        startDatabase();
        createTable();
        populateTable();
View Full Code Here


        jmsConnector = (JmsConnector) muleContext.getRegistry().lookupConnector("jmsConnector");

        assertMessageRouted();

        // Stop the broker, and make the connection factory return invalid connections.
        ConnectionListener connectionListener = new ConnectionListener(muleContext)
                .setExpectedAction(ConnectionNotification.CONNECTION_FAILED).setNumberOfExecutionsRequired(3);

        CustomConnectionFactory.returnInvalidConnections = true;
        stopBroker();

        connectionListener.waitUntilNotificationsAreReceived();
        assertTrue(jmsConnector.isStopped());


        // Restart the broker
        CustomConnectionFactory.returnInvalidConnections = false;
View Full Code Here

TOP

Related Classes of org.mule.tck.listener.ConnectionListener

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.