Browse Source

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
Zane Bitter 4 months ago
parent
commit
130e49feac
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      oslo_service/tests/test_service.py

+ 1
- 1
oslo_service/tests/test_service.py View File

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

Loading…
Cancel
Save