You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2015/08/26 17:13:53 UTC
qpid-interop-test git commit: NO-JIRA: Update of AMQP type support
patch etc/proton-python-amqp-types.patch. Update QUICKSTART file. Commented
out some troublesome types in simple_type_tests.py so that the those that do
work will complete.
Repository: qpid-interop-test
Updated Branches:
refs/heads/master ebdacb0dd -> 6c8f781bb
NO-JIRA: Update of AMQP type support patch etc/proton-python-amqp-types.patch. Update QUICKSTART file. Commented out some troublesome types in simple_type_tests.py so that the those that do work will complete.
Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/6c8f781b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/6c8f781b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/6c8f781b
Branch: refs/heads/master
Commit: 6c8f781bb4a99a710eb6fa058d1d7c2a161289e3
Parents: ebdacb0
Author: Kim van der Riet <kp...@apache.org>
Authored: Wed Aug 26 11:13:29 2015 -0400
Committer: Kim van der Riet <kp...@apache.org>
Committed: Wed Aug 26 11:13:29 2015 -0400
----------------------------------------------------------------------
QUICKSTART | 5 ++-
etc/proton-python-amqp-types.patch | 46 +++++++-------------
.../types/simple_type_tests.py | 27 ++++++------
3 files changed, 32 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/6c8f781b/QUICKSTART
----------------------------------------------------------------------
diff --git a/QUICKSTART b/QUICKSTART
index cc7d0d9..bb30d97 100644
--- a/QUICKSTART
+++ b/QUICKSTART
@@ -50,10 +50,11 @@ export LD_LIBRARY_PATH=/usr/local/lib64
export QPID_INTEROP_TEST_HOME=<abs path to top level qpid-interop-test directory>
Start a broker. If using qpidd:
-qpidd --load-module amqp.so -m yes --auth no --queue-pattern qpid-interop.simple_type_tests --default-flow-stop-threshold 0 --default-flow-resume-threshold 0 --default-queue-limit 0 --log-enable info+
+qpidd --load-module amqp.so -m yes --auth no --queue-pattern qpid-interop --default-flow-stop-threshold 0 --default-flow-resume-threshold 0 --default-queue-limit 0 --log-enable info+
-NOTE: YOU MUST USE THE --queue-pattern qpid-interop.simple_type_tests parameter with the Qpid broker!
+NOTE: for qpidd, YOU MUST USE THE --queue-pattern qpid-interop parameter so it will create non-existent queues as needed.
From top level directory:
+./src/py/qpid-interop-test/jms/jms_message_tests.py
./src/py/qpid-interop-test/types/simple_type_tests.py
http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/6c8f781b/etc/proton-python-amqp-types.patch
----------------------------------------------------------------------
diff --git a/etc/proton-python-amqp-types.patch b/etc/proton-python-amqp-types.patch
index eabe25a..9a4da22 100644
--- a/etc/proton-python-amqp-types.patch
+++ b/etc/proton-python-amqp-types.patch
@@ -1,18 +1,8 @@
-From bc720193ab06730e8b69b01b9ada314f62660084 Mon Sep 17 00:00:00 2001
-From: Kim van der Riet <kp...@localhost.localdomain>
-Date: Tue, 12 May 2015 11:44:54 -0400
-Subject: [PATCH 1924/1924] Added python classes to represent AMQP types not
- currently supported
-
----
- proton-c/bindings/python/proton/__init__.py | 110 +++++++++++++++++++++++-----
- 1 file changed, 90 insertions(+), 20 deletions(-)
-
diff --git a/proton-c/bindings/python/proton/__init__.py b/proton-c/bindings/python/proton/__init__.py
-index e3cd9e3..26ad1f3 100644
+index 353c396..e5e0eee 100644
--- a/proton-c/bindings/python/proton/__init__.py
+++ b/proton-c/bindings/python/proton/__init__.py
-@@ -1275,6 +1275,56 @@ class char(unicode):
+@@ -1290,6 +1290,56 @@ class char(unicode):
def __repr__(self):
return "char(%s)" % unicode.__repr__(self)
@@ -69,7 +59,7 @@ index e3cd9e3..26ad1f3 100644
class Described(object):
def __init__(self, descriptor, value):
-@@ -1887,42 +1937,42 @@ class Data:
+@@ -1902,42 +1952,42 @@ class Data:
If the current node is an unsigned byte, returns its value,
returns 0 otherwise.
"""
@@ -113,12 +103,12 @@ index e3cd9e3..26ad1f3 100644
If the current node is a signed int, returns its value, returns 0
otherwise.
"""
-- return pn_data_get_int(self._data)
+- return int(pn_data_get_int(self._data))
+ return int32(pn_data_get_int(self._data))
def get_char(self):
"""
-@@ -1957,7 +2007,7 @@ class Data:
+@@ -1972,7 +2022,7 @@ class Data:
If the current node is a float, returns its value, raises 0
otherwise.
"""
@@ -127,7 +117,7 @@ index e3cd9e3..26ad1f3 100644
def get_double(self):
"""
-@@ -1972,7 +2022,7 @@ class Data:
+@@ -1987,7 +2037,7 @@ class Data:
If the current node is a decimal32, returns its value, returns 0
otherwise.
"""
@@ -136,7 +126,7 @@ index e3cd9e3..26ad1f3 100644
# XXX: need to convert
def get_decimal64(self):
-@@ -1980,7 +2030,7 @@ class Data:
+@@ -1995,7 +2045,7 @@ class Data:
If the current node is a decimal64, returns its value, returns 0
otherwise.
"""
@@ -145,7 +135,7 @@ index e3cd9e3..26ad1f3 100644
# XXX: need to convert
def get_decimal128(self):
-@@ -1988,7 +2038,7 @@ class Data:
+@@ -2003,7 +2053,7 @@ class Data:
If the current node is a decimal128, returns its value, returns 0
otherwise.
"""
@@ -154,7 +144,7 @@ index e3cd9e3..26ad1f3 100644
def get_uuid(self):
"""
-@@ -2140,19 +2190,29 @@ class Data:
+@@ -2155,18 +2205,29 @@ class Data:
put_mappings = {
None.__class__: lambda s, _: s.put_null(),
bool: put_bool,
@@ -171,18 +161,17 @@ index e3cd9e3..26ad1f3 100644
+ byte: put_byte,
+ short: put_short,
+ int32: put_int,
- int: put_long,
-- char: put_char,
++ int: put_long,
long: put_long,
-- ulong: put_ulong,
-- timestamp: put_timestamp,
+ float32: put_float,
- float: put_double,
++ float: put_double,
+ decimal32: put_decimal32,
+ decimal64: put_decimal64,
+ decimal128: put_decimal128,
-+ char: put_char,
-+ timestamp: put_timestamp,
+ char: put_char,
+- ulong: put_ulong,
+ timestamp: put_timestamp,
+- float: put_double,
uuid.UUID: put_uuid,
+ bytes: put_binary,
+ unicode: put_string,
@@ -193,7 +182,7 @@ index e3cd9e3..26ad1f3 100644
Described: put_py_described,
Array: put_py_array
}
-@@ -3998,5 +4058,15 @@ __all__ = [
+@@ -4062,5 +4123,15 @@ __all__ = [
"dispatch",
"symbol",
"timestamp",
@@ -210,6 +199,3 @@ index e3cd9e3..26ad1f3 100644
+ "decimal64",
+ "decimal128"
]
---
-1.9.3
-
http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/6c8f781b/src/py/qpid-interop-test/types/simple_type_tests.py
----------------------------------------------------------------------
diff --git a/src/py/qpid-interop-test/types/simple_type_tests.py b/src/py/qpid-interop-test/types/simple_type_tests.py
index 3457d13..aab369a 100755
--- a/src/py/qpid-interop-test/types/simple_type_tests.py
+++ b/src/py/qpid-interop-test/types/simple_type_tests.py
@@ -88,10 +88,10 @@ class AmqpPrimitiveTypes(object):
'0xfff0000000000000', # -Infinity
'0x7ff8000000000000', # +NaN
'0xfff8000000000000'], # -NaN
- 'decimal32': [0, 100, -1000.001, 3.14159, 1.234e+56],
- 'decimal64': [0, 100, -1000.001, 3.14159, 1.234e+56],
- 'decimal128': [0, 100, -1000.001, 3.14159, 1.234e+56], # Hangs python shim, ok in jms shim
- 'char': [u'a', u'Z', u'\u0001', u'\u007f'], # Hangs python shim, ok in jms shim
+ #'decimal32': [0, 100, -1000.001, 3.14159, 1.234e+56],
+ #'decimal64': [0, 100, -1000.001, 3.14159, 1.234e+56],
+ #'decimal128': [0, 100, -1000.001, 3.14159, 1.234e+56], # Hangs python shim, ok in jms shim
+ #'char': [u'a', u'Z', u'\u0001', u'\u007f'], # Hangs python shim, ok in jms shim
# timestamp must be in milliseconds since the unix epoch
'timestamp': [0, int(mktime((2000, 1, 1, 0, 0, 0, 5, 1, 0))*1000), int(time()*1000)],
'uuid': [UUID(int=0x0), UUID('00010203-0405-0607-0809-0a0b0c0d0e0f'), uuid4()],
@@ -99,15 +99,15 @@ class AmqpPrimitiveTypes(object):
#b'The quick brown fox jumped over the lazy dog 0123456789.' * 1000],
# strings must be unicode to comply with AMQP spec
'string': [u'', u'Hello, world!', u'"Hello, world!"', u"Charlie's peach",
- u'The quick brown fox jumped over the lazy dog 0123456789.' * 1000],
- 'symbol': ['', 'myDomain.123', 'domain.0123456789.' * 1000],
- 'list': [[],
- [1, -2, 3.14],
- [u'a', u'b', u'c'],
- [ulong(12345), timestamp(int(time()*1000)), int32(-25), uuid4(), symbol('a.b.c')],
- [[], None, [1,2,3], {1:'one', 2:'two', 3:'three', 4:True, 5:False, 6:None}, True, False, char(u'5')],
- [[],[[],[[],[],[]],[]],[]],
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] * 1000],
+ u'The quick brown fox jumped over the lazy dog 0123456789.' * 100],
+ 'symbol': ['', 'myDomain.123', 'domain.0123456789.' * 100],
+ #'list': [[],
+ # [1, -2, 3.14],
+ # [u'a', u'b', u'c'],
+ # [ulong(12345), timestamp(int(time()*1000)), int32(-25), uuid4(), symbol('a.b.c')],
+ # [[], None, [1,2,3], {1:'one', 2:'two', 3:'three', 4:True, 5:False, 6:None}, True, False, char(u'5')],
+ # [[],[[],[[],[],[]],[]],[]],
+ # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] * 1000],
#'map': [{}, {1:u'one', 2:u'two'}, {None:None, 1:1, '2':'2', True:False, False:True}]#, # TODO: Bug in handling maps
#'array': [[], [1,2,3], ['Hello', 'world']] # TODO: Not yet implemented
}
@@ -265,7 +265,6 @@ class Shim(object):
amqp_type == 'map':
received_test_value_list.append(StrToObj(list(stv).__iter__()).run())
else:
-# raise SimpleTypeTestError('ERROR: Shim.receive(): AMQP type \'%s\' not implemented' % amqp_type)
raise InteropTestError('ERROR: Shim.receive(): AMQP type \'%s\' not implemented' % amqp_type)
return received_test_value_list
else:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org