From 130e49feac02e1cb3c13a82efe5bb2c120717c92 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 10 Dec 2018 20:38:25 +1300 Subject: [PATCH] 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 --- oslo_service/tests/test_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_service/tests/test_service.py b/oslo_service/tests/test_service.py index 0719bbd6..1c641657 100644 --- a/oslo_service/tests/test_service.py +++ b/oslo_service/tests/test_service.py @@ -227,7 +227,7 @@ class ServiceLauncherTest(ServiceTestBase): os.kill(start_workers[0], signal.SIGHUP) # 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 self._wait(cond, timeout)