Bug 927550 - allow an xpcshell test to request a longer timeout before it is killed. r?Ted

This commit is contained in:
aceman 2013-10-16 13:08:00 +01:00
Родитель 7e3a114720
Коммит 86eb535852
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -568,9 +568,14 @@ class XPCShellTestThread(Thread):
completeCmd = cmdH + cmdT + args
testTimeoutInterval = HARNESS_TIMEOUT
# Allow a test to request a multiple of the timeout if it is expected to take long
if 'requesttimeoutfactor' in self.test_object:
testTimeoutInterval *= int(self.test_object['requesttimeoutfactor'])
testTimer = None
if not self.interactive and not self.debuggerInfo:
testTimer = Timer(HARNESS_TIMEOUT, lambda: self.testTimeout(name, proc.pid))
testTimer = Timer(testTimeoutInterval, lambda: self.testTimeout(name, proc.pid))
testTimer.start()
proc = None