qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith W <keith.w...@gmail.com>
Subject AMQP 1.0/Python - Question re. encoding of maps and lists : failing qpid_tests.broker_1_0.translation.TranslationTests.test_translate* against Java Broker
Date Mon, 19 Dec 2016 15:57:02 GMT
Hi all,

The qpid_tests.broker_1_0.translation.TranslationTests.test_translate*
tests fail against the Java Broker.  This is not a new problem. The
tests have been excluded against the Java Broker since I first enabled
the Jenkins job about six months ago (pending investigation)

The test I am focusing on is:
qpid_tests.broker_1_0.translation.TranslationTests.test_translate_map_2

This tests the ability of the Broker to translate a map sent from a
client publishing with AMQP 1.0 to a receiver using AMQP 0-10.  When
the test is run against the Java Broker, the test fails as follows:

 fail
Error during test:  Traceback (most recent call last):
    File "/home/keith/tmp/py/bin/qpid-python-test", line 340, in run
      phase()
    File "/home/keith/src/qpid-python/qpid_tests/broker_1_0/translation.py",
line 81, in test_translate_map_2
      self.send_receive_map("amqp1.0", "amqp0-10", '#')
    File "/home/keith/src/qpid-python/qpid_tests/broker_1_0/translation.py",
line 48, in send_receive_map
      self.send_receive_messages([Message(content={'s':'abc','i':10})],
send_version, receive_version, address)
    File "/home/keith/src/qpid-python/qpid_tests/broker_1_0/translation.py",
line 38, in send_receive_messages
      assert msg.content == expected.content, (msg.content, expected.content)
  AssertionError:
('\x00\x00\x00\x17\x00\x00\x00\x02\x01i1\x00\x00\x00\x00\x00\x00\x00\n\x01s\x90\x00\x03abc',
{'i': 10L, 's': 'abc'})

I have turned PN_TRACE_FRM=true on client side and I see:

2016-12-19 16:49:13 [Messaging] trace tcp:Oslo.local:5672 encode(65535)
2016-12-19 16:49:13 [Protocol] trace
[14df4d0e-1eb5-45d8-96b9-fffbc15e2665]: 0 -> @transfer(20) [handle=0,
delivery-id=0, delivery-tag=b"\x00\x00\x00\x00", message-format=0,
settled=false, more=false] (75)
"\x00Sp\xc0\x04\x02BP\x00\x00Ss\xd0\x00\x00\x00\x14\x00\x00\x00\x07@@@@@@\xa3\x08amqp/map\x00St\xc1\x01\x00\x00Su\xa0\x1b\x00\x00\x00\x17\x00\x00\x00\x02\x01i1\x00\x00\x00\x00\x00\x00\x00\x0a\x01s\x90\x00\x03abc"
2016-12-19 16:49:13 [Network] debug tcp:Oslo.local:5672 encoded 111
bytes from 65535

By debugging the Java Broker's translation module, I can see that the
AMQP 1.0 publishing end is sending the map encoded within a
DataSection.  This surprises me - I was expecting the application-data
to be an amqp-value containing the map.  The Java Broker doesn't know
how to translate this for the 0-10 and hence the test fails.

Why does Qpid Python / swigged client encode the map this way?


cheers Keith.

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


Mime
View raw message