You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2019/11/25 21:33:05 UTC

[qpid-dispatch] branch master updated: DISPATCH-1476: Ignore new proton log FRAME text; reenable test

This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new e805072  DISPATCH-1476: Ignore new proton log FRAME text; reenable test
e805072 is described below

commit e80507200aca4cf50ab1e9ce480bde6bdf8e7806
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Mon Nov 25 16:18:02 2019 -0500

    DISPATCH-1476: Ignore new proton log FRAME text; reenable test
---
 tests/system_tests_topology_disposition.py.in | 1 -
 tools/scraper/log_splitter.py                 | 4 ++++
 tools/scraper/parser.py                       | 4 ++++
 tools/scraper/test_data/test_data.txt         | 2 ++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/system_tests_topology_disposition.py.in b/tests/system_tests_topology_disposition.py.in
index 4fa51f1..b41c3ad 100644
--- a/tests/system_tests_topology_disposition.py.in
+++ b/tests/system_tests_topology_disposition.py.in
@@ -437,7 +437,6 @@ class TopologyDispositionTests ( TestCase ):
 
 
     def test_04_scraper_tool ( self ):
-        self.skipTest("Test skipped during development of new qpid-proton log formats.")
         name = 'test_04'
         error = str(None)
         if self.skip [ name ] :
diff --git a/tools/scraper/log_splitter.py b/tools/scraper/log_splitter.py
index d537872..321c1d7 100755
--- a/tools/scraper/log_splitter.py
+++ b/tools/scraper/log_splitter.py
@@ -131,6 +131,10 @@ class parsed_attach():
         # get the session (channel) number
         if self.line.startswith(':'):
             self.line = self.line[1:]
+        proton_frame_key = "FRAME: "
+        if self.line.startswith(proton_frame_key):
+            self.line = self.line[len(proton_frame_key):]
+
         sti = self.line.find(' ')
         if sti < 0:
             raise ValueError("space not found after channel number at head of line %s" % (self.line))
diff --git a/tools/scraper/parser.py b/tools/scraper/parser.py
index 7a6992d..bcf9a07 100755
--- a/tools/scraper/parser.py
+++ b/tools/scraper/parser.py
@@ -375,6 +375,7 @@ class ParsedLogLine(object):
     policy_trace_key = "POLICY (trace) ["
     router_ls_key = "ROUTER_LS (info)"
     transfer_key = "@transfer(20)"
+    proton_frame_key = "FRAME: "
 
     def sender_settle_mode_of(self, value):
         if value == "0":
@@ -854,6 +855,9 @@ class ParsedLogLine(object):
         # get the session (channel) number
         if self.line.startswith(':'):
             self.line = self.line[1:]
+        if self.line.startswith(self.proton_frame_key):
+            self.line = self.line[len(self.proton_frame_key):]
+
         sti = self.line.find(' ')
         if sti < 0:
             raise ValueError("space not found after channel number at head of line %s" % (self.line))
diff --git a/tools/scraper/test_data/test_data.txt b/tools/scraper/test_data/test_data.txt
index d1630b7..32fe4ec 100644
--- a/tools/scraper/test_data/test_data.txt
+++ b/tools/scraper/test_data/test_data.txt
@@ -29,3 +29,5 @@
 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"]]
+2019-11-25 14:35:55.022016 -0500 SERVER (trace) [2]:FRAME: 0 -> @close(24) [error=@error(29) [condition=:"amqp:connection:framing-error", description="connection aborted"]] (/home/chug/git/qpid-dispatch/src/server.c:107)
+2019-11-25 14:35:55.022077 -0500 SERVER (trace) [2]:FRAME:   <- EOS (/home/chug/git/qpid-dispatch/src/server.c:107)


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