diff --git a/python/pyspark/tests/test_daemon.py b/python/pyspark/tests/test_daemon.py index 2cdc16c793b38..898fb39d9ece5 100644 --- a/python/pyspark/tests/test_daemon.py +++ b/python/pyspark/tests/test_daemon.py @@ -47,6 +47,9 @@ def do_termination_test(self, terminator): # daemon should accept connections self.assertTrue(self.connect(port)) + # wait worker process spawned from daemon exit. + time.sleep(1) + # request shutdown terminator(daemon) time.sleep(1)