diff options
author | Karen Feng <karenfeng.us@gmail.com> | 2013-07-12 14:26:56 -0700 |
---|---|---|
committer | Karen Feng <karenfeng.us@gmail.com> | 2013-07-12 14:26:56 -0700 |
commit | 73984b96a8450674b472676eaa855cc2df68a754 (patch) | |
tree | a9ac52b5d8d1370e2a1541c566a4a8f5923d244b | |
parent | 5c67ca027834582bcd6cdd55baee5fd74e743a71 (diff) | |
download | spark-73984b96a8450674b472676eaa855cc2df68a754.tar.gz spark-73984b96a8450674b472676eaa855cc2df68a754.tar.bz2 spark-73984b96a8450674b472676eaa855cc2df68a754.zip |
Removed unit test of nonexistent function Utils.lastNBytes
-rw-r--r-- | core/src/test/scala/spark/UtilsSuite.scala | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/core/src/test/scala/spark/UtilsSuite.scala b/core/src/test/scala/spark/UtilsSuite.scala index d83a0307fa..1e1260f606 100644 --- a/core/src/test/scala/spark/UtilsSuite.scala +++ b/core/src/test/scala/spark/UtilsSuite.scala @@ -91,33 +91,6 @@ class UtilsSuite extends FunSuite { assert(str(10 * hour + 59 * minute + 59 * second + 999) === "11.00 h") } - test("reading last n bytes of a file") { - val tmpDir = Files.createTempDir() - - // File smaller than limit - val f1Path = tmpDir + "/f1" - val f1 = new FileOutputStream(f1Path) - f1.write("a\nb\nc\nd".getBytes(Charsets.UTF_8)) - f1.close() - assert(Utils.lastNBytes(f1Path, 1024) === "a\nb\nc\nd") - - // File larger than limit - val f2Path = tmpDir + "/f2" - val f2 = new FileOutputStream(f2Path) - f2.write("1\n2\n3\n4\n5\n6\n7\n8\n".getBytes(Charsets.UTF_8)) - f2.close() - assert(Utils.lastNBytes(f2Path, 8) === "5\n6\n7\n8\n") - - // Request limit too - val f3Path = tmpDir + "/f2" - val f3 = new FileOutputStream(f3Path) - f3.write("1\n2\n3\n4\n5\n6\n7\n8\n".getBytes(Charsets.UTF_8)) - f3.close() - assert(Utils.lastNBytes(f3Path, 8) === "5\n6\n7\n8\n") - - FileUtils.deleteDirectory(tmpDir) - } - test("reading offset bytes of a file") { val tmpDir2 = Files.createTempDir() val f1Path = tmpDir2 + "/f1" |