You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/08/18 16:03:06 UTC

[GitHub] [qpid-dispatch] ChugR opened a new pull request #827: DISAPTCH-1749: Improve test framwork router.wait_ready function

ChugR opened a new pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827


   This patch adds new check for testing that a router is ready.
   
     * Optional. Enabled by default.
     * Locates "SERVER (notice) Operational" in a log file.
     * Fails test if log settings don't support seeing log message.
     * Fails wait_ready if message never seen.
     * Additional test runs before existing port and connector probes.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] ChugR commented on pull request #827: DISPATCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
ChugR commented on pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827#issuecomment-885835936


   Thanks for the comments @jiridanek but I'm withdrawing this PR. The new code presented here is itself open to problems as yet unseen. 


-- 
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: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] jiridanek commented on pull request #827: DISPATCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
jiridanek commented on pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827#issuecomment-782850972


   Typo in Jira name in commit message.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #827: DISPATCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827#discussion_r579816170



##########
File path: tests/system_test.py
##########
@@ -421,29 +437,71 @@ def attributes(e, level):
             # top level list of tuples ('section-name', dict)
             return "".join(["%s {\n%s}\n"%(n, attributes(p, 1)) for n, p in self])
 
-    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True,
+    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True, wait_for_server_log=True,
                  perform_teardown=True, cl_args=None, expect=Process.RUNNING):
         """
         @param name: name used for for output files, default to id from config.
         @param config: router configuration
         @keyword wait: wait for router to be ready (call self.wait_ready())
+        @param wait_for_server_log Use server log check for "wait ready"
+        @param perform_teardown
+        @param cli_args
+        @param expect
         """
         cl_args = cl_args or []
         self.config = copy(config)
+        self.wait_for_server_log = wait_for_server_log
         self.perform_teardown = perform_teardown
         if not name: name = self.config.router_id
         assert name
         # setup log and debug dump files
         self.dumpfile = os.path.abspath('%s-qddebug.txt' % name)
         self.config.sections('router')[0]['debugDumpFile'] = self.dumpfile
+
+        # setup default logging
+        # sense where server info logs are found
+        # fail if server polling log ready and log setup is insufficient
+        self.logfile = None
+        self.server_logfile = None
+        self.server_search_pattern = "SERVER (notice) Operational"

Review comment:
       I searched and the `QD_LOG_NOTICE, "Operational, %d Threads Running (process ID %ld)",` line seems to be the first thing the router prints after it registers signal handlers in `static void main_process()`. The sigterm handler catches that signal and essentially converts that to a clean exit.
   
   Makes sense. The "crash" is detected by test code if SIGTERM is delivered before dispatch sets a handler for it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #827: DISAPTCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827#discussion_r579800156



##########
File path: tests/system_test.py
##########
@@ -421,29 +437,71 @@ def attributes(e, level):
             # top level list of tuples ('section-name', dict)
             return "".join(["%s {\n%s}\n"%(n, attributes(p, 1)) for n, p in self])
 
-    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True,
+    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True, wait_for_server_log=True,
                  perform_teardown=True, cl_args=None, expect=Process.RUNNING):
         """
         @param name: name used for for output files, default to id from config.
         @param config: router configuration
         @keyword wait: wait for router to be ready (call self.wait_ready())
+        @param wait_for_server_log Use server log check for "wait ready"

Review comment:
       ```suggestion
           @param wait_for_server_log: use server log check for "wait ready"
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] ChugR closed pull request #827: DISPATCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
ChugR closed pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827


   


-- 
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: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #827: DISAPTCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827#discussion_r579800383



##########
File path: tests/system_test.py
##########
@@ -421,29 +437,71 @@ def attributes(e, level):
             # top level list of tuples ('section-name', dict)
             return "".join(["%s {\n%s}\n"%(n, attributes(p, 1)) for n, p in self])
 
-    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True,
+    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True, wait_for_server_log=True,

Review comment:
       There are now three ways of waiting for server readiness. Wait for open port, wait for `/healtz` endpoint (if libwebsockets is enabled for compilation) or wait for special log line. It feels kind of confusing, what is the difference, when should I do what, and so on.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #827: DISAPTCH-1749: Improve test framwork router.wait_ready function

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #827:
URL: https://github.com/apache/qpid-dispatch/pull/827#discussion_r579800230



##########
File path: tests/system_test.py
##########
@@ -421,29 +437,71 @@ def attributes(e, level):
             # top level list of tuples ('section-name', dict)
             return "".join(["%s {\n%s}\n"%(n, attributes(p, 1)) for n, p in self])
 
-    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True,
+    def __init__(self, name=None, config=Config(), pyinclude=None, wait=True, wait_for_server_log=True,
                  perform_teardown=True, cl_args=None, expect=Process.RUNNING):
         """
         @param name: name used for for output files, default to id from config.
         @param config: router configuration
         @keyword wait: wait for router to be ready (call self.wait_ready())
+        @param wait_for_server_log Use server log check for "wait ready"
+        @param perform_teardown
+        @param cli_args
+        @param expect

Review comment:
       Is this good for anything? mentioning the parameters but not giving any description?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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