aboutsummaryrefslogtreecommitdiff
path: root/streaming
diff options
context:
space:
mode:
authorSean Owen <sowen@cloudera.com>2015-01-25 19:16:44 -0800
committerAndrew Or <andrew@databricks.com>2015-01-25 19:16:44 -0800
commit0528b85cf96f9c9c074b5fbb5b9c5dd8071c0bc7 (patch)
treef22f63442dd721deff23c2252a32b64c9d88153b /streaming
parentfc2168f04e9b2c7ce45f59db0bf632a26d56c72b (diff)
downloadspark-0528b85cf96f9c9c074b5fbb5b9c5dd8071c0bc7.tar.gz
spark-0528b85cf96f9c9c074b5fbb5b9c5dd8071c0bc7.tar.bz2
spark-0528b85cf96f9c9c074b5fbb5b9c5dd8071c0bc7.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
Diffstat (limited to 'streaming')
-rw-r--r--streaming/src/test/scala/org/apache/spark/streaming/FailureSuite.scala9
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") {