On Wed, Jun 3, 2009 at 5:44 AM, Gordon Sim <[email protected]> wrote: > [email protected] wrote: >> >> Author: rajith >> Date: Tue Jun 2 19:53:23 2009 >> New Revision: 781141 >> >> URL: http://svn.apache.org/viewvc?rev=781141&view=rev >> Log: >> This is a fix for QPID-1887 >> The TimeToLiveTest should be enough to cover this case. > > The TimeToLiveTest doesn't test the 0-10 codepath though, does it? If it was > this error would have caused failures up until now would it not?
That was also my thinking until I took a very close look yesterday. Looking at the code I don't see a reason as to how it shouldn't have failed. But when tried without the fix it also seems to work. However this test has been failing before (according to Aidan). I will look into this more closely. I want to ensure that this test is acurate and covers this issue properly (All though on the surface the test seems good). >> >> Modified: >> >> >> qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java >> >> Modified: >> qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java >> URL: >> http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java?rev=781141&r1=781140&r2=781141&view=diff >> >> ============================================================================== >> --- >> qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java >> (original) >> +++ >> qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java >> Tue Jun 2 19:53:23 2009 >> @@ -98,13 +98,11 @@ >> deliveryProp.setTimestamp(currentTime); >> if (timeToLive > 0) >> { >> - deliveryProp.setExpiration(currentTime + timeToLive); >> - message.setJMSExpiration(currentTime + timeToLive); >> + deliveryProp.setTtl(timeToLive); >> } > > [> else >> >> { >> - deliveryProp.setExpiration(0); >> - message.setJMSExpiration(0); >> + deliveryProp.setTtl(0); >> } >> message.setJMSTimestamp(currentTime); >> } >> >> >> >> --------------------------------------------------------------------- >> Apache Qpid - AMQP Messaging Implementation >> Project: http://qpid.apache.org >> Use/Interact: mailto:[email protected] >> >> > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > -- Regards, Rajith Attapattu Red Hat http://rajith.2rlabs.com/ --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
