|
|
@ -16,6 +16,7 @@ os.environ['FAKEUPLOAD'] = "1" |
|
|
|
MAX_STARTUP_TIME = 3 |
|
|
|
MAX_STARTUP_TIME = 3 |
|
|
|
BLACKLIST_PROCS = ['manage_athenad', 'pandad', 'pigeond'] |
|
|
|
BLACKLIST_PROCS = ['manage_athenad', 'pandad', 'pigeond'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestManager(unittest.TestCase): |
|
|
|
class TestManager(unittest.TestCase): |
|
|
|
def setUp(self): |
|
|
|
def setUp(self): |
|
|
|
os.environ['PASSIVE'] = '0' |
|
|
|
os.environ['PASSIVE'] = '0' |
|
|
@ -32,6 +33,10 @@ class TestManager(unittest.TestCase): |
|
|
|
os.environ['PREPAREONLY'] = '1' |
|
|
|
os.environ['PREPAREONLY'] = '1' |
|
|
|
manager.main() |
|
|
|
manager.main() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_blacklisted_procs(self): |
|
|
|
|
|
|
|
# TODO: ensure there are blacklisted procs until we have a dedicated test |
|
|
|
|
|
|
|
self.assertTrue(len(BLACKLIST_PROCS), "No blacklisted procs to test not_run") |
|
|
|
|
|
|
|
|
|
|
|
def test_startup_time(self): |
|
|
|
def test_startup_time(self): |
|
|
|
for _ in range(10): |
|
|
|
for _ in range(10): |
|
|
|
start = time.monotonic() |
|
|
|
start = time.monotonic() |
|
|
@ -59,6 +64,8 @@ class TestManager(unittest.TestCase): |
|
|
|
self.assertTrue(state.running, f"{p.name} not running") |
|
|
|
self.assertTrue(state.running, f"{p.name} not running") |
|
|
|
exit_code = p.stop(retry=False) |
|
|
|
exit_code = p.stop(retry=False) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.assertNotIn(p.name, BLACKLIST_PROCS, f"{p.name} was started") |
|
|
|
|
|
|
|
|
|
|
|
# TODO: mapsd should exit cleanly |
|
|
|
# TODO: mapsd should exit cleanly |
|
|
|
if p.name == "mapsd": |
|
|
|
if p.name == "mapsd": |
|
|
|
continue |
|
|
|
continue |
|
|
|