-
- Downloads
SPARK-1798. Tests should clean up temp files
Three issues related to temp files that tests generate – these should be touched up for hygiene but are not urgent. Modules have a log4j.properties which directs the unit-test.log output file to a directory like `[module]/target/unit-test.log`. But this ends up creating `[module]/[module]/target/unit-test.log` instead of former. The `work/` directory is not deleted by "mvn clean", in the parent and in modules. Neither is the `checkpoint/` directory created under the various external modules. Many tests create a temp directory, which is not usually deleted. This can be largely resolved by calling `deleteOnExit()` at creation and trying to call `Utils.deleteRecursively` consistently to clean up, sometimes in an `@After` method. _If anyone seconds the motion, I can create a more significant change that introduces a new test trait along the lines of `LocalSparkContext`, which provides management of temp directories for subclasses to take advantage of._ Author: Sean Owen <sowen@cloudera.com> Closes #732 from srowen/SPARK-1798 and squashes the following commits: 5af578e [Sean Owen] Try to consistently delete test temp dirs and files, and set deleteOnExit() for each b21b356 [Sean Owen] Remove work/ and checkpoint/ dirs with mvn clean bdd0f41 [Sean Owen] Remove duplicate module dir in log4j.properties output path for tests
Showing
- bagel/src/test/resources/log4j.properties 1 addition, 1 deletionbagel/src/test/resources/log4j.properties
- core/src/main/scala/org/apache/spark/TestUtils.scala 1 addition, 0 deletionscore/src/main/scala/org/apache/spark/TestUtils.scala
- core/src/main/scala/org/apache/spark/util/Utils.scala 10 additions, 8 deletionscore/src/main/scala/org/apache/spark/util/Utils.scala
- core/src/test/java/org/apache/spark/JavaAPISuite.java 5 additions, 13 deletionscore/src/test/java/org/apache/spark/JavaAPISuite.java
- core/src/test/resources/log4j.properties 1 addition, 1 deletioncore/src/test/resources/log4j.properties
- core/src/test/scala/org/apache/spark/CheckpointSuite.scala 2 additions, 3 deletionscore/src/test/scala/org/apache/spark/CheckpointSuite.scala
- core/src/test/scala/org/apache/spark/FileServerSuite.scala 14 additions, 4 deletionscore/src/test/scala/org/apache/spark/FileServerSuite.scala
- core/src/test/scala/org/apache/spark/FileSuite.scala 25 additions, 31 deletionscore/src/test/scala/org/apache/spark/FileSuite.scala
- core/src/test/scala/org/apache/spark/input/WholeTextFileRecordReaderSuite.scala 3 additions, 1 deletion...g/apache/spark/input/WholeTextFileRecordReaderSuite.scala
- core/src/test/scala/org/apache/spark/rdd/PairRDDFunctionsSuite.scala 2 additions, 0 deletions...st/scala/org/apache/spark/rdd/PairRDDFunctionsSuite.scala
- core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala 11 additions, 4 deletions...rg/apache/spark/scheduler/EventLoggingListenerSuite.scala
- core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala 8 additions, 6 deletions...cala/org/apache/spark/scheduler/ReplayListenerSuite.scala
- core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala 22 additions, 8 deletions...cala/org/apache/spark/storage/DiskBlockManagerSuite.scala
- core/src/test/scala/org/apache/spark/util/FileLoggerSuite.scala 11 additions, 6 deletions...rc/test/scala/org/apache/spark/util/FileLoggerSuite.scala
- core/src/test/scala/org/apache/spark/util/UtilsSuite.scala 1 addition, 0 deletionscore/src/test/scala/org/apache/spark/util/UtilsSuite.scala
- external/flume/src/test/resources/log4j.properties 1 addition, 1 deletionexternal/flume/src/test/resources/log4j.properties
- external/kafka/src/test/resources/log4j.properties 1 addition, 1 deletionexternal/kafka/src/test/resources/log4j.properties
- external/mqtt/src/test/resources/log4j.properties 1 addition, 1 deletionexternal/mqtt/src/test/resources/log4j.properties
- external/twitter/src/test/resources/log4j.properties 1 addition, 1 deletionexternal/twitter/src/test/resources/log4j.properties
- external/zeromq/src/test/resources/log4j.properties 1 addition, 1 deletionexternal/zeromq/src/test/resources/log4j.properties
Loading
Please register or sign in to comment