You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jiri Danek (JIRA)" <ji...@apache.org> on 2017/08/09 15:03:00 UTC

[jira] [Created] (ARTEMIS-1339) JMS tests JMSMessageConsumerTest#testSelectorsWithJMSPriority and #testJMSSelectorFiltersJMSMessageID fail with OpenWire protocol (activemq-client JMS library)

Jiri Danek created ARTEMIS-1339:
-----------------------------------

             Summary: JMS tests JMSMessageConsumerTest#testSelectorsWithJMSPriority and #testJMSSelectorFiltersJMSMessageID fail with OpenWire protocol (activemq-client JMS library)
                 Key: ARTEMIS-1339
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1339
             Project: ActiveMQ Artemis
          Issue Type: Test
          Components: Broker, OpenWire
    Affects Versions: 2.3.0
            Reporter: Jiri Danek


Consider tests {{org.apache.activemq.artemis.tests.integration.amqp.JMSMessageConsumerTest#testSelectorsWithJMSPriority}} and {{#testJMSSelectorFiltersJMSMessageID}} in the same class. When these are adapted to work with multiple JMS ConnectionFactories, or made standalone as in https://github.com/jdanekrh/jms-reproducers/blob/master/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSMessageConsumerTest.java, then

Core and AMQP pass, while OpenWire fails (both tests)

Regarding the second mentioned test, the fail happens at

{noformat}
         // First one should make it through
         MessageConsumer messageConsumer = session.createConsumer(queue, "JMSMessageID = '" + message.getJMSMessageID() + "'");
         TextMessage m = (TextMessage) messageConsumer.receive(5000);
         assertNotNull(m);
{noformat}

with exception

{noformat}
java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:86)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at org.junit.Assert.assertNotNull(Assert.java:621)
	at org.junit.Assert.assertNotNull(Assert.java:631)
	at org.apache.activemq.artemis.tests.integration.amqp.JMSMessageConsumerTest.testJMSSelectorFiltersJMSMessageID(JMSMessageConsumerTest.java:185)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
{noformat}

Regarding the first test, the code and exception are essentially the same. Again, it expects to receive a message

{noformat}
         MessageConsumer consumer = session.createConsumer(queue, "JMSPriority > 8");
         Message msg = consumer.receive(2000);
         assertNotNull(msg);
{noformat}

and the exception is because nothing was received (because, as I investigated further, the selector did not match anything).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)