From ee9ac065fa92dad59f665bd94924318be9da27c4 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Thu, 10 Aug 2017 07:52:40 +0200 Subject: [PATCH] NO-JIRA Add asserts to SessionTest#testIllegalStateException --- .../tests/integration/jms/client/SessionTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SessionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SessionTest.java index 895fa887973..cbd9686ddc4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SessionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SessionTest.java @@ -29,7 +29,7 @@ public class SessionTest extends JMSTestBase { @Test - public void testIillegalStateException() throws Exception { + public void testIllegalStateException() throws Exception { Connection defaultConn = null; QueueConnection qConn = null; Connection connClientID = null; @@ -47,36 +47,42 @@ public void testIillegalStateException() throws Exception { QueueSession qSess = qConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); try { qSess.createDurableConsumer(topic, "mySub1"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { qSess.createDurableConsumer(topic, "mySub1", "TEST = 'test'", false); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { qSess.createSharedConsumer(topic, "mySub1"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { qSess.createSharedConsumer(topic, "mySub1", "TEST = 'test'"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { qSess.createSharedDurableConsumer(topic, "mySub1"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { qSess.createSharedDurableConsumer(topic, "mySub1", "TEST = 'test'"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } @@ -85,24 +91,28 @@ public void testIillegalStateException() throws Exception { try { defaultSess.createDurableSubscriber(topic, "mySub1"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { defaultSess.createDurableSubscriber(topic, "mySub1", "TEST = 'test'", true); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { defaultSess.createDurableConsumer(topic, "mySub1"); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. } try { defaultSess.createDurableConsumer(topic, "mySub1", "TEST = 'test'", true); + fail("exception expected"); } catch (javax.jms.IllegalStateException ex) { //ok expected. }