Bug 1352360 - Supress a bogus warning during wpt shutdown, r=majazf draft
authorJames Graham <james@hoppipolla.co.uk>
Fri, 24 Mar 2017 11:48:43 +0000
changeset 554262 20b853d6b7affdcdac18fb33f6cf18afef9e023a
parent 552445 d4af7ec6cfcd9b81cd1f433a00b412de61e95b62
child 622290 8f2a59253966d2b0ed50a4aea101d63c56e48ca8
push id51884
push userbmo:james@hoppipolla.co.uk
push dateFri, 31 Mar 2017 09:36:43 +0000
reviewersmajazf
bugs1352360
milestone55.0a1
Bug 1352360 - Supress a bogus warning during wpt shutdown, r=majazf During shutdown we fail to proces a message telling us that the runner has shut down. However this is expected so just ignore it rather than printing a warning. MozReview-Commit-ID: 5kRBgDRbLT9
testing/web-platform/harness/wptrunner/testrunner.py
--- a/testing/web-platform/harness/wptrunner/testrunner.py
+++ b/testing/web-platform/harness/wptrunner/testrunner.py
@@ -648,17 +648,19 @@ class TestRunnerManager(threading.Thread
         self.remote_queue.put((command, args))
 
     def cleanup(self):
         self.logger.debug("TestManager cleanup")
         if self.browser:
             self.browser.cleanup()
         while True:
             try:
-                self.logger.warning(" ".join(map(repr, self.command_queue.get_nowait())))
+                dropped = self.command_queue.get_nowait()
+                if dropped[0] != "runner_teardown":
+                    self.logger.warning(" ".join(map(repr, dropped)))
             except Empty:
                 break
 
 class TestQueue(object):
     def __init__(self, test_source_cls, test_type, tests, **kwargs):
         self.queue = None
         self.test_source_cls = test_source_cls
         self.test_type = test_type