diff --git a/tests/system_tests_topology_disposition.py b/tests/system_tests_topology_disposition.py index 25e8046c8c..22b684c268 100644 --- a/tests/system_tests_topology_disposition.py +++ b/tests/system_tests_topology_disposition.py @@ -23,7 +23,6 @@ import unittest from subprocess import PIPE, STDOUT -import proton from proton import Message from proton.handlers import MessagingHandler from proton.reactor import Container @@ -406,7 +405,6 @@ def test_03_connection_id_propagation(self): self.assertIsNone(error) self.assertIsNone(error) - @unittest.skipIf(proton.VERSION > (0, 36, 0), "see DISPATCH-2276") def test_04_scraper_tool(self): name = 'test_04' error = str(None) diff --git a/tools/scraper/amqp_detail.py b/tools/scraper/amqp_detail.py index 0b2c3cd9a5..b1c8147215 100755 --- a/tools/scraper/amqp_detail.py +++ b/tools/scraper/amqp_detail.py @@ -681,7 +681,7 @@ def __init__(self, _router, _common): sdispmap = sess.rx_rcvr_disposition_map if splf.data.is_receiver else sess.rx_sndr_disposition_map else: sdispmap = sess.tx_rcvr_disposition_map if splf.data.is_receiver else sess.tx_sndr_disposition_map - for sdid in range(int(splf.data.first), (int(splf.data.last) + 1)): + for sdid in range(int(splf.data.first, 0), (int(splf.data.last, 0) + 1)): did = str(sdid) if did in sdispmap: old_splf = sdispmap[did] @@ -829,7 +829,7 @@ def evaluate_credit(self): tod_of_second_attach = plf.datetime if look_for_sender_delivery_id: if plf.data.name == "attach" and not plf.data.is_receiver: - current_delivery = int(plf.data.described_type.dict.get("initial-delivery_count", "0")) + current_delivery = int(plf.data.described_type.dict.get("initial-delivery_count", "0"), 0) delivery_limit = current_delivery look_for_sender_delivery_id = False @@ -838,7 +838,7 @@ def evaluate_credit(self): # a flow in the normal direction updates the delivery limit dc = plf.data.described_type.dict.get("delivery-count", "0") lc = plf.data.described_type.dict.get("link-credit", "0") - delivery_limit = int(dc) + int(lc) # TODO: wrap at 32-bits + delivery_limit = int(dc, 0) + int(lc, 0) # TODO: wrap at 32-bits if n_attaches < 2: # a working flow before sender attach - cancel initial stall init_stall = False @@ -858,7 +858,7 @@ def evaluate_credit(self): else: # flow in the opposite direction updates the senders current delivery # normally used to consume credit in response to a drain from receiver - current_delivery = int(plf.data.described_type.dict.get("initial-delivery_count", "0")) + current_delivery = int(plf.data.described_type.dict.get("initial-delivery_count", "0"), 0) elif plf.data.transfer: if plf.data.direction == dir_of_xfer: diff --git a/tools/scraper/parser.py b/tools/scraper/parser.py index 4e1f4cdc01..e5217bfebf 100755 --- a/tools/scraper/parser.py +++ b/tools/scraper/parser.py @@ -296,6 +296,9 @@ def parse_dtype_line(self, _dtype, _line): if '=' not in fields[0]: raise ValueError("Field does not contain equal sign '%s'" % fields[0]) key, val = DescribedType.get_key_and_val(fields[0]) + # New proton logging uses hex strings. Convert to decimal strings. + if val.startswith("0x"): + val = str(int(val, 0)) del fields[0] if DescribedType.is_dtype_name(val): # recursing to process subtype