Uploaded image for project: 'Apache QPID Interoperability Test Suite'
  1. Apache QPID Interoperability Test Suite
  2. QPIDIT-77

Shims always send list items as well as map values and keys encoded as string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      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

      # /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

      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"}}]
      

      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?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: