Alessandro Bellina created SPARK-26945: ------------------------------------------
Summary: Python streaming tests flaky while cleaning temp directories after StreamingQuery.stop Key: SPARK-26945 URL: https://issues.apache.org/jira/browse/SPARK-26945 Project: Spark Issue Type: Bug Components: PySpark Affects Versions: 2.4.0 Reporter: Alessandro Bellina >From the test code, it seems like the `shmutil.rmtree` function is trying to >delete a directory, but there's likely another thread adding entries to a >directory, so when it gets to `os.rmdir(path)` it blows up. I think the test >(and other streaming tests) should call `q.awaitTermination` after `q.stop`, >before going on. I'll file a separate jira. {noformat} ERROR: test_query_manager_await_termination (pyspark.sql.tests.test_streaming.StreamingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jenkins/workspace/SparkPullRequestBuilder/python/pyspark/sql/tests/test_streaming.py", line 259, in test_query_manager_await_termination shutil.rmtree(tmpPath) File "/home/anaconda/lib/python2.7/shutil.py", line 256, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home/anaconda/lib/python2.7/shutil.py", line 254, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/home/jenkins/workspace/SparkPullRequestBuilder/python/target/072153bd-f981-47be-bda2-e2b657a16f65/tmp4WGp7n'{noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org