qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim van der Riet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPIDIT-77) Shims always send list items as well as map values and keys encoded as string
Date Fri, 03 Mar 2017 16:18:46 GMT

    [ https://issues.apache.org/jira/browse/QPIDIT-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894650#comment-15894650

Kim van der Riet commented on QPIDIT-77:

This is a bug. I think it is a duplicate of QPIDIT-46. Can you review that bug and see if
you agree. If so, please mark this as a dup of that bug.

> Shims always send list items as well as map values and keys encoded as string
> -----------------------------------------------------------------------------
>                 Key: QPIDIT-77
>                 URL: https://issues.apache.org/jira/browse/QPIDIT-77
>             Project: Apache QPID IT
>          Issue Type: Bug
>          Components: Proton C++ Shim, Proton Python Shim
>            Reporter: Jiri Danek
> While examining the project and writing my own shim (see QPIDIT-76) I noticed that the
existing shims seem to behave differently than I would expect.
> When sending the following message
> bq. # /usr/libexec/qpid_interop_test/shims/qpid-proton-python/amqp_types_test/Sender.py
'localhost:5672' 'jms.queue.qpid-interop.amqp_types_test.map.ProtonPython.ProtonGot' 'map'
'[{}, {"string:one": "ubyte:1", "string:two": "ushort:2"}, {"string:One": "long:-1234567890",
"none:": "string:None", "short:2": "int:2", "string:map": {"char:A": "int:1", "char:B": "int:2"},
"boolean:True": "string:True", "string:False": "boolean:False", "string:None": "none:"}]'
> and receiving it with 
> {{# /usr/libexec/qpid_interop_test/shims/qpid-proton-go/amqp_types_test/Receiver 'localhost:5672'
'jms.queue.qpid-interop.amqp_types_test.map.ProtonPython.ProtonGot' 'map' '3'}}
> My shim printed wrong message, with keys and values looking like {{string:boolean:True}}
> {noformat}
> map
> [{},{"string:string:one":"string:ubyte:1","string:string:two":"string:ushort:2"},{"string:boolean:True":"string:string:True","string:none:":"string:string:None","string:short:2":"string:int:2","string:string:False":"string:boolean:False","string:string:None":"string:none:","string:string:One":"string:long:-1234567890","string:string:map":{"string:char:A":"string:int:1","string:char:B":"string:int:2"}}]
> {noformat}
> I suspected my code, but when I deliberately made my code "wrong", see commit https://github.com/jdanekrh/qpid-interop-test/commit/bdaca47959083ef0c54656adb38285486316553b,
the shim started working.
> For the above reason, I suspect that when shims (at least the Python one and C++ one,
these I tried) put data into map keys, map values and list items as strings, without bothering
to convert them.
> This sounds sort of incredible how could this happen, but having no tool to print messages
in-flight and given that the change in the commit above fixed my shim, I think it is plausible.
> -I looked at code of the other shims, but could not confirm or deny my suspicion. The
code is for me hard to penetrate.- I think C++ code really does what I described above. The
question is, is that a bug?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message