diff options
author | Sean Owen <sowen@cloudera.com> | 2015-01-25 19:16:44 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-01-25 19:16:50 -0800 |
commit | cf65620f51d9e85ebe99c50ae65e9814af2b4928 (patch) | |
tree | 06b534ece42c57f15b58622714ebbee2785c0fd3 /streaming | |
parent | 2a2da4271eebbbddd33c248a2fd619f388c9fb27 (diff) | |
download | spark-cf65620f51d9e85ebe99c50ae65e9814af2b4928.tar.gz spark-cf65620f51d9e85ebe99c50ae65e9814af2b4928.tar.bz2 spark-cf65620f51d9e85ebe99c50ae65e9814af2b4928.zip |
SPARK-4430 [STREAMING] [TEST] Apache RAT Checks fail spuriously on test files
Another trivial one. The RAT failure was due to temp files from `FailureSuite` not being cleaned up. This just makes the cleanup more reliable by using the standard temp dir mechanism.
Author: Sean Owen <sowen@cloudera.com>
Closes #4189 from srowen/SPARK-4430 and squashes the following commits:
9ea63ff [Sean Owen] Properly acquire a temp directory to ensure it is cleaned up at shutdown, which helps avoid a RAT check failure
(cherry picked from commit 0528b85cf96f9c9c074b5fbb5b9c5dd8071c0bc7)
Signed-off-by: Andrew Or <andrew@databricks.com>
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/src/test/scala/org/apache/spark/streaming/FailureSuite.scala | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/streaming/src/test/scala/org/apache/spark/streaming/FailureSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/FailureSuite.scala index 40434b1f9b..6500608bba 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/FailureSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/FailureSuite.scala @@ -28,21 +28,16 @@ import java.io.File */ class FailureSuite extends TestSuiteBase with Logging { - var directory = "FailureSuite" + val directory = Utils.createTempDir().getAbsolutePath val numBatches = 30 override def batchDuration = Milliseconds(1000) override def useManualClock = false - override def beforeFunction() { - super.beforeFunction() - Utils.deleteRecursively(new File(directory)) - } - override def afterFunction() { - super.afterFunction() Utils.deleteRecursively(new File(directory)) + super.afterFunction() } test("multiple failures with map") { |