Examples of onCoordinatorActionEvent()


Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

                "user1", "wf-app-name1", nominalTime, startDate, "missingDep1");
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, wfEventListner.getTopic(cae));
            wfEventListner.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("endTime"));
            assertFalse(message.getText().contains("errorCode"));
            assertFalse(message.getText().contains("errorMessage"));
            CoordinatorActionMessage coordActionWaitingMessage = JMSMessagingUtils
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

                "user1", "wf-app-name1", nominalTime, startDate, null);
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae));
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("endTime"));
            assertFalse(message.getText().contains("errorCode"));
            assertFalse(message.getText().contains("errorMessage"));
            assertFalse(message.getText().contains("missingDependency"));
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

        cae.setEndTime(endDate);
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae));
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("errorCode"));
            assertFalse(message.getText().contains("errorMessage"));
            assertFalse(message.getText().contains("missingDependency"));
            CoordinatorActionMessage coordActionSuccessMessage = JMSMessagingUtils
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

        cae.setErrorMessage("dummyError");
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae));
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("missingDependency"));
            CoordinatorActionMessage coordActionFailMessage = JMSMessagingUtils
                    .getEventMessage(message);
            assertEquals(CoordinatorAction.Status.FAILED, coordActionFailMessage.getStatus());
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            String selector = JMSHeaderConstants.USER + "='user1'";
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae), selector);
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            CoordinatorActionMessage coordActionFailMessage = JMSMessagingUtils
                    .getEventMessage(message);
            Assert.assertEquals(CoordinatorAction.Status.FAILED, coordActionFailMessage.getStatus());
            assertEquals("user1", coordActionFailMessage.getUser());
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            // Pass a selector which wont match and assert for null message
            String selector = JMSHeaderConstants.USER + "='Non_matching_user'";
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae), selector);
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertNull(message);
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

                "user1", "wf-app-name1", nominalTime, startDate, "missingDep1");
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, wfEventListner.getTopic(cae));
            wfEventListner.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("endTime"));
            assertFalse(message.getText().contains("errorCode"));
            assertFalse(message.getText().contains("errorMessage"));
            CoordinatorActionMessage coordActionWaitingMessage = JMSMessagingUtils
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

                "user1", "wf-app-name1", nominalTime, startDate, null);
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae));
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("endTime"));
            assertFalse(message.getText().contains("errorCode"));
            assertFalse(message.getText().contains("errorMessage"));
            assertFalse(message.getText().contains("missingDependency"));
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

        cae.setEndTime(endDate);
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae));
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("errorCode"));
            assertFalse(message.getText().contains("errorMessage"));
            assertFalse(message.getText().contains("missingDependency"));
            CoordinatorActionMessage coordActionSuccessMessage = JMSMessagingUtils
View Full Code Here

Examples of org.apache.oozie.jms.JMSJobEventListener.onCoordinatorActionEvent()

        cae.setErrorMessage("dummyError");
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae));
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertFalse(message.getText().contains("missingDependency"));
            CoordinatorActionMessage coordActionFailMessage = JMSMessagingUtils
                    .getEventMessage(message);
            assertEquals(CoordinatorAction.Status.FAILED, coordActionFailMessage.getStatus());
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.