prefork restart tests: Use echo server for back off
authorGary Lockyer <gary@catalyst.net.nz>
Wed, 10 Jul 2019 21:28:30 +0000 (09:28 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 16 Jul 2019 08:13:12 +0000 (08:13 +0000)
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 <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
python/samba/tests/prefork_restart.py

index 5233ca1f8055389728579476670b448671a26455..9ab97d062b4d9bfed7a0ad39e6738ae7babf517d 100644 (file)
@@ -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