Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
On the cpp profile the LastValueQueueTest sporadically fails because the semantics of LVQs for messages without a defined key differ from the Java broker's.
The Java broker specifies that:
Messages sent to an LVQ without the specified property will be delivered as normal and will never be "replaced".
The C++ broker does not document its behaviour in this case but seems to treat messages that do not set a key as having the same key.
Therefore, the shutdown messages in o.a.q.s.q.LastValueQueueTest#testParallelProductionAndConsumption replace each other and the second (or rather the first) message is never received by the consumer leading to a NPE:
testParallelProductionAndConsumption(org.apache.qpid.server.queue.LastValueQueueTest) Time elapsed: 10.571 sec <<< FAILURE! junit.framework.AssertionFailedError: null at junit.framework.Assert.fail(Assert.java:55) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertNotNull(Assert.java:256) at junit.framework.Assert.assertNotNull(Assert.java:248) at junit.framework.TestCase.assertNotNull(TestCase.java:417) at org.apache.qpid.server.queue.LastValueQueueTest.receiveMessages(LastValueQueueTest.java:442) at org.apache.qpid.server.queue.LastValueQueueTest.testParallelProductionAndConsumption(LastValueQueueTest.java:405)