Skip to content

Commit

Permalink
Remove unnecessary file delete + add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Apr 30, 2014
1 parent 62010fd commit 2b52151
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class FileLoggerSuite extends FunSuite with BeforeAndAfter {

after {
Try { fileSystem.delete(logDirPath, true) }
Try { fileSystem.delete(new Path("falafel"), true) }
}

test("Simple logging") {
Expand Down Expand Up @@ -135,6 +134,10 @@ class FileLoggerSuite extends FunSuite with BeforeAndAfter {
assert(readFileContent(new Path(logDir + "/John_Valjohn"), codec) === "One\nTwo three four...")
}

/**
* Read the content of the file specified by the given path.
* If a compression codec is specified, use it to read the file.
*/
private def readFileContent(logPath: Path, codec: Option[CompressionCodec] = None): String = {
val fstream = fileSystem.open(logPath)
val cstream = codec.map(_.compressedInputStream(fstream)).getOrElse(fstream)
Expand Down

0 comments on commit 2b52151

Please sign in to comment.