Package org.apache.oozie.jms

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


            assertEquals(MessageType.JOB, wfSuccMessage.getMessageType());
            assertEquals(AppType.WORKFLOW_JOB, wfSuccMessage.getAppType());
            assertEquals(EventStatus.SUCCESS, wfSuccMessage.getEventStatus());
            assertEquals("user1", wfSuccMessage.getUser());
            assertEquals("wf-app-name1", wfSuccMessage.getAppName());
            wfEventListener.destroy();

        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
View Full Code Here


            assertEquals(EventStatus.FAILURE, wfFailMessage.getEventStatus());
            assertEquals("user1", wfFailMessage.getUser());
            assertEquals("wf-app-name1", wfFailMessage.getAppName());
            assertEquals("dummyErrorCode", wfFailMessage.getErrorCode());
            assertEquals("dummyErrorMessage", wfFailMessage.getErrorMessage());
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

            assertEquals(EventStatus.SUSPEND, wfFailMessage.getEventStatus());
            assertEquals("user1", wfFailMessage.getUser());
            assertEquals("wf-app-name1", wfFailMessage.getAppName());
            assertNull(wfFailMessage.getErrorCode());
            assertNull(wfFailMessage.getErrorMessage());
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

            TextMessage message = (TextMessage) consumer.receive(5000);
            WorkflowJobMessage wfFailMessage = JMSMessagingUtils.getEventMessage(message);
            Assert.assertEquals(WorkflowJob.Status.FAILED, wfFailMessage.getStatus());
            assertEquals("user_1", wfFailMessage.getUser());
            assertEquals(MessageType.JOB, wfFailMessage.getMessageType());
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

            String selector = JMSHeaderConstants.USER + "='Non_matching_user'";
            MessageConsumer consumer = jmsContext.createConsumer(session, wfEventListener.getTopic(wfe), selector);
            wfEventListener.onWorkflowJobEvent(wfe);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertNull(message);
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

            TextMessage message = (TextMessage) consumer.receive(5000);
            WorkflowJobMessage wfFailMessage = JMSMessagingUtils.getEventMessage(message);
            Assert.assertEquals(WorkflowJob.Status.FAILED, wfFailMessage.getStatus());
            assertEquals("user1", wfFailMessage.getUser());
            assertEquals(MessageType.JOB, wfFailMessage.getMessageType());
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

            TextMessage message = (TextMessage) consumer.receive(5000);
            WorkflowJobMessage wfFailMessage = JMSMessagingUtils.getEventMessage(message);
            Assert.assertEquals(WorkflowJob.Status.FAILED, wfFailMessage.getStatus());
            assertEquals("user1", wfFailMessage.getUser());
            assertEquals(MessageType.JOB, wfFailMessage.getMessageType());
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

            MessageConsumer consumer = jmsContext.createConsumer(session, wfEventListener.getTopic(wfe));
            wfEventListener.onWorkflowJobEvent(wfe);
            TextMessage message = (TextMessage) consumer.receive(5000);
            assertNotNull(message);
            broker.stop();
            wfEventListener.destroy();
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
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.