You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2009/06/03 11:44:51 UTC

Re: svn commit: r781141 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java

rajith@apache.org 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?

> 
> 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:commits-subscribe@qpid.apache.org
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: svn commit: r781141 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java

Posted by Aidan Skinner <ai...@gmail.com>.
On Wed, Jun 3, 2009 at 8:26 AM, Rajith Attapattu <ra...@gmail.com> wrote:
> On Wed, Jun 3, 2009 at 5:44 AM, Gordon Sim <gs...@redhat.com> wrote:
>> rajith@apache.org 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).

That test is in the 010Exclude list.because, IIRC, it was failing
every time with -Dprofile=cpp. I don't have qpid checked out on this
machine (and I'm on holiday using rubbish coffee shop wifi so can't be
bothered git cloning). It fails very intermittently against the Java
broker, but that's not relevant here.

- Aidan (who, btw, has arranged ASF beers in Cambridge for next Weds
in Harvard Sq if anybody here's interested and not on party@a.o)

-- 
Apache Qpid - Give me convenience or give me death
http://qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: svn commit: r781141 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java

Posted by Rajith Attapattu <ra...@gmail.com>.
On Wed, Jun 3, 2009 at 5:44 AM, Gordon Sim <gs...@redhat.com> wrote:
> rajith@apache.org 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:commits-subscribe@qpid.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org