Skip to content

Commit 5b1bd55

Browse files
WeichenXu123HyukjinKwon
authored andcommitted
[SPARK-28582][PYSPARK] Fix flaky test DaemonTests.do_termination_test which fail on Python 3.7
Fix flaky test DaemonTests.do_termination_test which fail on Python 3.7. I add a sleep after the test connection to daemon. Run test ``` python/run-tests --python-executables=python3.7 --testname "pyspark.tests.test_daemon DaemonTests" ``` **Before** Fail on test "test_termination_sigterm". And we can see daemon process do not exit. **After** Test passed Closes #25315 from WeichenXu123/fix_py37_daemon. Authored-by: WeichenXu <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
1 parent 0c6874f commit 5b1bd55

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

python/pyspark/tests/test_daemon.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def do_termination_test(self, terminator):
4747
# daemon should accept connections
4848
self.assertTrue(self.connect(port))
4949

50+
# wait worker process spawned from daemon exit.
51+
time.sleep(1)
52+
5053
# request shutdown
5154
terminator(daemon)
5255
time.sleep(1)

0 commit comments

Comments
 (0)