I got the exception again today running a full test on camel-jms

-------------------------------------------------------------------------------
Test set: org.apache.camel.component.jms.JmsTimerBasedPollingConsumerTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.566
sec <<< FAILURE!
testJmsTimerBasedPollingConsumer(org.apache.camel.component.jms.JmsTimerBasedPollingConsumerTest)
 Time elapsed: 5.466 sec  <<< FAILURE!
java.lang.AssertionError: mock://result Messages not ascending.
Message 5 has value: 6 and message 6 has value: 5 for expression:
header(number). Exchanges: Exchange[JmsMessage: ActiveMQTextMessage
{commandId = 9, responseRequired = false, messageId =
ID:davsclaus.local-52850-1303892310926-2:1:2:1:3, originalDestination
= null, originalTransactionId = null, producerId =
ID:davsclaus.local-52850-1303892310926-2:1:2:1, destination =
queue://queue.foo, transactionId = null, expiration = 0, timestamp =
1303892311241, arrival = 0, brokerInTime = 1303892311242,
brokerOutTime = 1303892311243, correlationId = null, replyTo = null,
persistent = true, type = null, priority = 4, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID
= null, content = null, marshalledProperties = null, dataStructure =
null, redeliveryCounter = 0, size = 1046, properties =
{breadcrumbId=ID-davsclaus-local-52849-1303892308934-0-41, number=6},
readOnlyProperties = true, readOnlyBody = true, droppable = false,
text = Hello World}] and Exchange[JmsMessage: ActiveMQTextMessage
{commandId = 7, responseRequired = false, messageId =
ID:davsclaus.local-52850-1303892310926-2:7:1:1:3, originalDestination
= null, originalTransactionId = null, producerId =
ID:davsclaus.local-52850-1303892310926-2:7:1:1, destination =
queue://queue.foo, transactionId = null, expiration = 0, timestamp =
1303892311239, arrival = 0, brokerInTime = 1303892311245,
brokerOutTime = 1303892311246, correlationId = null, replyTo = null,
persistent = true, type = null, priority = 4, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID
= null, content = null, marshalledProperties = null, dataStructure =
null, redeliveryCounter = 0, size = 1046, properties =
{breadcrumbId=ID-davsclaus-local-52849-1303892308934-0-39, number=5},
readOnlyProperties = true, readOnlyBody = true, droppable = false,
text = Hello World}]
        at 
org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1084)
        at 
org.apache.camel.component.mock.MockEndpoint.assertMessagesSorted(MockEndpoint.java:783)
        at 
org.apache.camel.component.mock.MockEndpoint.assertMessagesAscending(MockEndpoint.java:756)
        at 
org.apache.camel.component.mock.MockEndpoint$9.run(MockEndpoint.java:675)
        at 
org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:378)
        at 
org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:346)
        at 
org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:334)
        at 
org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:172)
        at 
org.apache.camel.test.junit4.CamelTestSupport.assertMockEndpointsSatisfied(CamelTestSupport.java:391)
        at 
org.apache.camel.component.jms.JmsTimerBasedPollingConsumerTest.testJmsTimerBasedPollingConsumer(JmsTimerBasedPollingConsumerTest.java:46)




On Tue, Apr 26, 2011 at 7:18 PM, Hadrian Zbarcea <hzbar...@gmail.com> wrote:
> Yes, messages are consumed in fifo order with jms. As far as I know that part 
> is tested to death in amq, so the issues may be with the test framework, but 
> I didn't see errors like this in ages.
>
> Hadrian
>
>
> On Apr 26, 2011, at 12:07 PM, Claus Ibsen wrote:
>
>> On Tue, Apr 26, 2011 at 5:24 PM, Heath Kesler <hkes...@savoirtech.com> wrote:
>>> Thanks Claus,
>>>
>>> I will take a look at this, I have done a few things in JMS lately and look 
>>> forward to the improved performance.... I also noticed a couple of failures 
>>> I will try and fix.
>>>
>>
>> The optimization in AMQ is among others about acknowledgement so AMQ
>> can do that in batches/bulk.
>> However I think I have seen one test which failed due message2 arrived
>> before message1.
>> Running the test many times thereafter didnt show this error.
>>
>> Of course I would expect AMQ to consume messages in FIFO order when 1
>> consumer only.
>> So anyway, just wanted to share. If we start see "odd" failures. Then
>> we may have to report to AMQ and/or disable some of the optimizations.
>>
>> PS: The big boost would be to not fork the JVM per test. And also to
>> reduce the number of Spring XML based test, as Spring Framework is
>> becoming dead slow at booting up its XML files. (Spring 2.0 or older
>> was much faster at this).
>>
>>
>>
>>
>>> Cheers
>>> Heath
>>>
>>> On Apr 26, 2011, at 1:35 AM, Claus Ibsen wrote:
>>>
>>>> Hi
>>>>
>>>> I recently commited a change to camel-jms with some optimize
>>>> instructions to AMQ.
>>>> This cut down unit test time a bit. I see roughly about 1min or better
>>>> on my system.
>>>>
>>>> But in case some unit tests start to mis behave on your system. Then
>>>> please report back so we can take a look.
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> -----------------
>>>> FuseSource
>>>> Email: cib...@fusesource.com
>>>> Web: http://fusesource.com
>>>> CamelOne 2011: http://fusesource.com/camelone2011/
>>>> Twitter: davsclaus
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cib...@fusesource.com
>> Web: http://fusesource.com
>> CamelOne 2011: http://fusesource.com/camelone2011/
>> Twitter: davsclaus
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to