From 1c4b9ba36c724b6fcc26a51af5202483ab3f1c23 Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Thu, 11 Jul 2019 09:28:30 +1200 Subject: [PATCH] prefork restart tests: Use echo server for back off Use the echo server for the restart back off tests in the samba.tests.prefork_restart tests instead of the kdc. The kdc is not enabled when the ADDC is built to run MIT Kerberos. Changing the test to use the echo server means it can be run when MIT Kerberos is enabled. Signed-off-by: Gary Lockyer Reviewed-by: Andreas Schneider --- python/samba/tests/prefork_restart.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/samba/tests/prefork_restart.py b/python/samba/tests/prefork_restart.py index 5233ca1f805..9ab97d062b4 100644 --- a/python/samba/tests/prefork_restart.py +++ b/python/samba/tests/prefork_restart.py @@ -404,7 +404,7 @@ class PreforkProcessRestartTests(TestCase): def test_master_restart_backoff(self): # get kdc master process - pid = self.get_process("prefork-master-kdc") + pid = self.get_process("prefork-master-echo") self.assertIsNotNone(pid) # @@ -417,13 +417,13 @@ class PreforkProcessRestartTests(TestCase): # Get the worker processes workers = self.get_worker_pids("kdc", NUM_WORKERS) - process = self.get_process("prefork-master-kdc") + process = self.get_process("prefork-master-echo") os.kill(process, signal.SIGTERM) # wait for the process to restart start = time.time() - self.wait_for_process("prefork-master-kdc", process, 0, 1, 30) + self.wait_for_process("prefork-master-echo", process, 0, 1, 30) # wait for the workers to restart as well - self.wait_for_workers("kdc", workers) + self.wait_for_workers("echo", workers) end = time.time() duration = end - start @@ -434,7 +434,7 @@ class PreforkProcessRestartTests(TestCase): self.assertGreaterEqual(duration, expected) # check that the worker processes have restarted - new_workers = self.get_worker_pids("kdc", NUM_WORKERS) + new_workers = self.get_worker_pids("echo", NUM_WORKERS) for x in range(NUM_WORKERS): self.assertNotEquals(workers[x], new_workers[x]) @@ -449,12 +449,12 @@ class PreforkProcessRestartTests(TestCase): # prefork maximum backoff = 10 backoff_increment = 5 for expected in [0, 5, 10, 10]: - process = self.get_process("prefork-worker-kdc-2") + process = self.get_process("prefork-worker-echo-2") self.assertIsNotNone(process) os.kill(process, signal.SIGTERM) # wait for the process to restart start = time.time() - self.wait_for_process("prefork-worker-kdc-2", process, 0, 1, 30) + self.wait_for_process("prefork-worker-echo-2", process, 0, 1, 30) end = time.time() duration = end - start -- 2.47.3