From: Yury Delendik Date: Mon, 23 Apr 2012 20:05:50 +0000 (-0500) Subject: Terminates browser processes; if killed waits for termination X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d2600ea9da5fb952fc8c21e370b3c9767fe3b18a;p=pdf.js.git Terminates browser processes; if killed waits for termination --- diff --git a/test/test.py b/test/test.py index c3d7517..d5b4731 100644 --- a/test/test.py +++ b/test/test.py @@ -292,6 +292,8 @@ class BaseBrowserCommand(object): self.browserLog = open(BROWSERLOG_FILE, "w") def teardown(self): + self.process.terminate() + # If the browser is still running, wait up to ten seconds for it to quit if self.process and self.process.poll() is None: checks = 0 @@ -302,6 +304,7 @@ class BaseBrowserCommand(object): if self.process.poll() is None: print "Process %s is still running. Killing." % self.name self.process.kill() + self.process.wait() if self.tempDir is not None and os.path.exists(self.tempDir): shutil.rmtree(self.tempDir)