diff options
author | Joseph K. Bradley <joseph@databricks.com> | 2015-11-19 23:42:24 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-11-19 23:42:24 -0800 |
commit | 0fff8eb3e476165461658d4e16682ec64269fdfe (patch) | |
tree | 2f3f42b49625ec4735a2e34265a715515ea8dc0c /mllib/src/test/scala | |
parent | 7216f405454f6f3557b5b1f72df8f393605faf60 (diff) | |
download | spark-0fff8eb3e476165461658d4e16682ec64269fdfe.tar.gz spark-0fff8eb3e476165461658d4e16682ec64269fdfe.tar.bz2 spark-0fff8eb3e476165461658d4e16682ec64269fdfe.zip |
[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 <joseph@databricks.com>
Closes #9851 from jkbradley/tempdir-cleanup.
Diffstat (limited to 'mllib/src/test/scala')
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 2742026a69..c8a0bb1624 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 = { |