Actually test child SIGHUP signal

The intention of this test was to wait 5s after sending SIGHUP to a
child process to make sure that it doesn't exit. However, due to a logic
error, it just stopped checking and declared success immediately. Fix
the logic so that we have a better chance of seeing if SIGHUP
incorrectly kills the process.

Change-Id: I1f320a8dfdd7a922b461d070491ad53e6cd2b20d
Related-Bug: #1803731
This commit is contained in:
Zane Bitter 2018-12-10 20:38:25 +13:00
parent 159ef2e1d2
commit 130e49feac
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class ServiceLauncherTest(ServiceTestBase):
os.kill(start_workers[0], signal.SIGHUP) os.kill(start_workers[0], signal.SIGHUP)
# Wait at most 5 seconds to respawn a worker # Wait at most 5 seconds to respawn a worker
cond = lambda: start_workers == self._get_workers() cond = lambda: start_workers != self._get_workers()
timeout = 5 timeout = 5
self._wait(cond, timeout) self._wait(cond, timeout)