Skip to content

Commit 4789772

Browse files
committed
Remove useless unit test
1 parent 72aef67 commit 4789772

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

core/src/test/scala/org/apache/spark/io/ChunkedByteBufferSuite.scala

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ package org.apache.spark.io
2020
import java.nio.ByteBuffer
2121

2222
import com.google.common.io.ByteStreams
23-
2423
import org.apache.spark.SparkFunSuite
2524
import org.apache.spark.network.util.ByteArrayWritableChannel
25+
import org.apache.spark.util.Utils
2626
import org.apache.spark.util.io.ChunkedByteBuffer
2727

2828
class ChunkedByteBufferSuite extends SparkFunSuite {
@@ -56,23 +56,6 @@ class ChunkedByteBufferSuite extends SparkFunSuite {
5656
assert(chunkedByteBuffer.getChunks().head.position() === 0)
5757
}
5858

59-
test("benchmark") {
60-
val buffer100 = ByteBuffer.allocate(1024 * 1024 * 100)
61-
val buffer30 = ByteBuffer.allocate(1024 * 1024 * 30)
62-
val chunkedByteBuffer = new ChunkedByteBuffer(Array.fill(5)(buffer100))
63-
var starTime = System.currentTimeMillis()
64-
for (i <- 1 to 10) {
65-
chunkedByteBuffer.writeFully(new ByteArrayWritableChannel(chunkedByteBuffer.size.toInt))
66-
}
67-
// scalastyle:off
68-
System.out.println(System.currentTimeMillis() - starTime)
69-
starTime = System.currentTimeMillis()
70-
for (i <- 1 to 10) {
71-
chunkedByteBuffer.writeWithSlice(new ByteArrayWritableChannel(chunkedByteBuffer.size.toInt))
72-
}
73-
System.out.println(System.currentTimeMillis() - starTime)
74-
}
75-
7659
test("toArray()") {
7760
val empty = ByteBuffer.wrap(Array.empty[Byte])
7861
val bytes = ByteBuffer.wrap(Array.tabulate(8)(_.toByte))

0 commit comments

Comments
 (0)