jiridanek commented on a change in pull request #1463:
URL: https://github.com/apache/qpid-dispatch/pull/1463#discussion_r770857275



##########
File path: tests/system_tests_log_level_update.py
##########
@@ -256,56 +256,69 @@ def router(name, connection):
 
     def test_inter_router_protocol_trace(self):
         qd_manager = QdManager(self, self.address)
-        # Turn off trace logging on all connections for Router B.
-        qd_manager.update("org.apache.qpid.dispatch.log", {"enable": "info+"},
-                          name="log/DEFAULT")
 
+        # The router already has trace logging turned on for all connections.
         # Get the connection id of the inter-router connection
         results = qd_manager.query("org.apache.qpid.dispatch.connection")
         conn_id = None
         for result in results:
             if result['role'] == 'inter-router':
                 conn_id = result['identity']
 
-        # Turn on trace logging for the inter-router connection
-        qd_manager.update("org.apache.qpid.dispatch.connection", 
{"enableProtocolTrace": "true"}, identity=conn_id)
+        # Turn off trace logging for the inter-router connection. This update 
command is run async by the router
+        # so we need to sleep a bit before the operation is actually completed.
+        qd_manager.update("org.apache.qpid.dispatch.connection", 
{"enableProtocolTrace": "false"}, identity=conn_id)
+        time.sleep(1)
 
-        # Create a receiver and make sure the MAU update is seen on the 
inter-router connection log
+        inter_router_cid = "[C" + conn_id + "]"
+
+        num_transfers = 0
+        with open(self.routers[1].logfile_path) as router_log:
+            log_lines = router_log.read().split("\n")

Review comment:
       ```suggestion
               for log_line in router_log:
   ```
   
   Actually, this is what you want. Open file is an iterator over its lines, in 
Python.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to