qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject qpid-dispatch git commit: DISPATCH-1219: AMQP error may not have a description
Date Mon, 10 Dec 2018 22:55:42 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master ac57daddf -> afda5828b


DISPATCH-1219: AMQP error may not have a description


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/afda5828
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/afda5828
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/afda5828

Branch: refs/heads/master
Commit: afda5828b921666543007b64a9e0347218ae1f84
Parents: ac57dad
Author: Chuck Rolke <crolke@redhat.com>
Authored: Mon Dec 10 17:55:31 2018 -0500
Committer: Chuck Rolke <crolke@redhat.com>
Committed: Mon Dec 10 17:55:31 2018 -0500

----------------------------------------------------------------------
 tools/scraper/parser.py               | 17 +++++++++++++++--
 tools/scraper/test_data/test_data.txt |  1 +
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/afda5828/tools/scraper/parser.py
----------------------------------------------------------------------
diff --git a/tools/scraper/parser.py b/tools/scraper/parser.py
index 5f74266..bf8156b 100755
--- a/tools/scraper/parser.py
+++ b/tools/scraper/parser.py
@@ -144,7 +144,7 @@ class LogLineData:
         self.is_router_ls = False  # line is ROUTER_LS (info)
         self.fid = ""  # Log line (frame) id as used in javascript code
         self.amqp_error = False
-        self.link_class = "normal"  # attach sees: normal, router, router-data (, management?)
+        self.link_class = "client"  # attach sees: normal, router, router-data (, management?)
         self.disposition_display = ""
         self.final_disposition = None
         self.no_parent_link = False
@@ -707,8 +707,11 @@ class ParsedLogLine(object):
 
         if "error" in resdict:
             res.amqp_error = True
+            dct = resdict["error"].dict
+            condi = dct["condition"]
+            descr = dct["description"] if "description" in dct else ""
             res.web_show_str += (" <span style=\"background-color:yellow\">error</span>
"
-                                 "%s %s" % (resdict["error"].dict["condition"], resdict["error"].dict["description"]))
+                                 "%s %s" % (condi, descr))
 
     def adverbl_link_to(self):
         """
@@ -996,6 +999,14 @@ def parse_log_file(fn, log_index, comn):
 
 
 if __name__ == "__main__":
+    class dummy_args():
+        skip_all_data = False
+        skip_detail = False
+        skip_msg_progress = False
+        split = False
+        time_start = None
+        time_end = None
+
     print("Line-by-line split test")
     try:
         for line in td.TestData().data():
@@ -1013,6 +1024,7 @@ if __name__ == "__main__":
     log_index = 0  # from file for router A
     instance = 0  # all from router instance 0
     comn = common.Common()
+    comn.args = dummy_args()
     try:
         for i in range(len(data)):
             temp = ParsedLogLine(log_index, instance, i, data[i], comn, None)
@@ -1024,6 +1036,7 @@ if __name__ == "__main__":
 
     print("Read two-instance file test")
     comn2 = common.Common()
+    comn2.args = dummy_args()
     routers = parse_log_file('test_data/A-two-instances.log', 0, comn2)
     if len(routers) != 2:
         print("ERROR: Expected two router instances in log file")

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/afda5828/tools/scraper/test_data/test_data.txt
----------------------------------------------------------------------
diff --git a/tools/scraper/test_data/test_data.txt b/tools/scraper/test_data/test_data.txt
index f659a34..d1630b7 100644
--- a/tools/scraper/test_data/test_data.txt
+++ b/tools/scraper/test_data/test_data.txt
@@ -28,3 +28,4 @@
 2018-08-24 14:29:26.821739 -0400 SERVER (trace) [2]:0 <- @attach(18) [name="qdlink.YoQaLsapwDzqhOL",
handle=1, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0,
expiry-policy=:"session-end", timeout=0, dynamic=false, capabilities=:"qd.router"], target=@target(41)
[durable=0, expiry-policy=:"session-end", timeout=0, dynamic=false, capabilities=:"qd.router"],
initial-delivery-count=0, max-message-size=0] (/home/chug/git/qpid-dispatch/src/server.c:106)
 2018-08-24 14:29:26.821750 -0400 SERVER (trace) [1]:0 <- @attach(18) [name="qdlink.qvRSF0ysELu13cM",
handle=2, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0,
expiry-policy=:"session-end", timeout=0, dynamic=false, capabilities=:"qd.router-data"], target=@target(41)
[durable=0, expiry-policy=:"session-end", timeout=0, dynamic=false, capabilities=:"qd.router-data"],
initial-delivery-count=0, max-message-size=0] (/home/chug/git/qpid-dispatch/src/server.c:106)
 2018-10-11 14:55:31.302512 -0400 SERVER (trace) [4]:0 -> @open(16) [container-id="A",
max-frame-size=16384, channel-max=32767, idle-time-out=60000, offered-capabilities=:"ANONYMOUS-RELAY",
properties={:product="qpid-dispatch-router", :version="1.4.0-SNAPSHOT", :"qd.conn-id"=4}]
(/home/chug/git/qpid-dispatch/src/server.c:106)
+2018-12-07 10:20:00.235660 -0400 SERVER (trace) [3]:0 <- @close(24) [error=@error(29)
[condition=:"amqp:connection:forced"]]


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


Mime
View raw message