Repository: spark Updated Branches: refs/heads/branch-1.6 0a878ad0e -> 60d937529
[SPARK-11869][ML] Clean up TempDirectory properly in ML tests Need to remove parent directory (```className```) rather than just tempDir (```className/random_name```) I tested this with IDFSuite, which has 2 read/write tests, and it fixes the problem. CC: mengxr Can you confirm this is fine? I believe it is since the same ```random_name``` is used for all tests in a suite; we basically have an extra unneeded level of nesting. Author: Joseph K. Bradley <jos...@databricks.com> Closes #9851 from jkbradley/tempdir-cleanup. (cherry picked from commit 0fff8eb3e476165461658d4e16682ec64269fdfe) Signed-off-by: Xiangrui Meng <m...@databricks.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/60d93752 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/60d93752 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/60d93752 Branch: refs/heads/branch-1.6 Commit: 60d937529f6b885486e0a9b687883fb4bf66b780 Parents: 0a878ad Author: Joseph K. Bradley <jos...@databricks.com> Authored: Thu Nov 19 23:42:24 2015 -0800 Committer: Xiangrui Meng <m...@databricks.com> Committed: Thu Nov 19 23:42:31 2015 -0800 ---------------------------------------------------------------------- mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/60d93752/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala ---------------------------------------------------------------------- diff --git a/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala b/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala index 2742026..c8a0bb1 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala @@ -35,7 +35,7 @@ trait TempDirectory extends BeforeAndAfterAll { self: Suite => override def beforeAll(): Unit = { super.beforeAll() - _tempDir = Utils.createTempDir(this.getClass.getName) + _tempDir = Utils.createTempDir(namePrefix = this.getClass.getName) } override def afterAll(): Unit = { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org