qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Need help Re: jenkins interop test failing due to PROTON-215 commits?
Date Thu, 28 Feb 2013 20:37:34 GMT
On 02/28/2013 09:49 AM, Alan Conway wrote:
> On 02/27/2013 06:31 PM, Keith W wrote:
>> On 27 February 2013 22:28, Alan Conway <aconway@redhat.com> wrote:
>>> On Wed, 2013-02-27 at 11:19 +0000, Phil Harvey wrote:
>>>> Hi,
>>>> I notice that proton-jni on Jenkins is failing [1] , probably due to the
>>>> recent PROTON-215 commits.

I've committed a fix, but with a horrible hack:

r1451329 | aconway | 2013-02-28 15:32:31 -0500 (Thu, 28 Feb 2013) | 8 lines

PROTON-215: Fix python test error introduced by previous commits.

In interop.py, after decoding a message, Message.body is of <type 'str'> under
plain Python or proton-j Jython, but under proton-jni Jython it is a
<type 'org.apache.qpid.proton.amqp.Binary'>

Check the type and extract the Binary's data as a str if necessary.


The hack is:

         body = self.message.body
         if str(type(body)) == "<type 'org.apache.qpid.proton.amqp.Binary'>":
             body = body.array.tostring()

So is this a bug in JNI Jython that it behaves differently from the other cases?
Or is there another, portable way to extract data from a decoded message that I 
should be using?

Soon as I know I will make it right.


View raw message