]> git.parisson.com Git - pdf.js.git/commitdiff
Terminates browser processes; if killed waits for termination
authorYury Delendik <ydelendik@mozilla.com>
Mon, 23 Apr 2012 20:05:50 +0000 (15:05 -0500)
committerYury Delendik <ydelendik@mozilla.com>
Mon, 23 Apr 2012 20:05:50 +0000 (15:05 -0500)
test/test.py

index c3d7517d04c4d5eccbd3e796cc9133268236abfe..d5b473107819b23bd821e16a444bd3d9a78f9dbd 100644 (file)
@@ -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)