Skip to content

Commit

Permalink
Avoid endless testrunner restart loops.
Browse files Browse the repository at this point in the history
If the first test selected by a testrunner thread had a CRASH expectation,
the testrunner believed that it needed to restart and would never actually
get around to running the test.
  • Loading branch information
jdm authored and Ms2ger committed Oct 4, 2017
1 parent c1c60be commit da86772
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -154,6 +154,7 @@ def __init__(self, logger, browser, command_queue, no_timeout=False):
self.browser = browser
self.no_timeout = no_timeout
self.browser_settings = None
self.last_test = None

self.started = False

Expand All @@ -163,8 +164,9 @@ def update_settings(self, test):
browser_settings = self.browser.settings(test)
restart_required = ((self.browser_settings is not None and
self.browser_settings != browser_settings) or
test.expected() == "CRASH")
(self.last_test != test and test.expected() == "CRASH"))
self.browser_settings = browser_settings
self.last_test = test
return restart_required

def init(self):
Expand Down

0 comments on commit da86772

Please sign in to comment.