Bug 1407203 - Wait for websocketProcessBridge to exit; r?jmaher
We are seeing failures starting websocketProcessBridge due to the port being
in use. It is most likely a previously started websocketProcessBridge process that
is using the port.
On Windows, mozprocess.kill() calls TerminateJobObject/TerminateProcess and
GetExitCodeProcess, but these are asynchronous and don't wait for the process to
actually exit. Adding a wait call should guarantee the process has exited before
continuing which will hopefully ensure the port is free by the time we start an
additional websocketProcessBridge.
MozReview-Commit-ID: HGyjEsy1Ons
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1208,16 +1208,17 @@ class MochitestDesktop(object):
self.log.info('Stopping ssltunnel')
self.sslTunnel.stop()
except Exception:
self.log.critical('Exception stopping ssltunnel')
if self.websocketProcessBridge is not None:
try:
self.websocketProcessBridge.kill()
+ self.websocketProcessBridge.wait()
self.log.info('Stopping websocket/process bridge')
except Exception:
self.log.critical('Exception stopping websocket/process bridge')
def copyExtraFilesToProfile(self, options):
"Copy extra files or dirs specified on the command line to the testing profile."
for f in options.extraProfileFiles:
abspath = self.getFullPath(f)