Description
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
// First one should make it through MessageConsumer messageConsumer = session.createConsumer(queue, "JMSMessageID = '" + message.getJMSMessageID() + "'"); TextMessage m = (TextMessage) messageConsumer.receive(5000); assertNotNull(m);
with exception
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)
Regarding the first test, the code and exception are essentially the same. Again, it expects to receive a message
MessageConsumer consumer = session.createConsumer(queue, "JMSPriority > 8"); Message msg = consumer.receive(2000); assertNotNull(msg);
and the exception is because nothing was received (because, as I investigated further, the selector did not match anything).
Attachments
Issue Links
- is a child of
-
ARTEMIS-1330 [DISCUSS] Run JMS tests over many protocols (through different JMS client libraries)
- Resolved