spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [01/50] [abbrv] git commit: Removed unit test of nonexistent function Utils.lastNBytes
Date Wed, 17 Jul 2013 00:30:58 GMT
Updated Branches:
  refs/heads/master d733527bb -> 87d586e4d


Removed unit test of nonexistent function Utils.lastNBytes


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/73984b96
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/73984b96
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/73984b96

Branch: refs/heads/master
Commit: 73984b96a8450674b472676eaa855cc2df68a754
Parents: 5c67ca0
Author: Karen Feng <karenfeng.us@gmail.com>
Authored: Fri Jul 12 14:26:56 2013 -0700
Committer: Karen Feng <karenfeng.us@gmail.com>
Committed: Fri Jul 12 14:26:56 2013 -0700

----------------------------------------------------------------------
 core/src/test/scala/spark/UtilsSuite.scala | 27 -------------------------
 1 file changed, 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/73984b96/core/src/test/scala/spark/UtilsSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/spark/UtilsSuite.scala b/core/src/test/scala/spark/UtilsSuite.scala
index d83a030..1e1260f 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"


Mime
View raw message