Skip to content

Commit

Permalink
removed the test
Browse files Browse the repository at this point in the history
  • Loading branch information
kiszk committed Apr 6, 2018
1 parent 04e9d5f commit d2dc70f
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.spark.unsafe.memory.ByteArrayMemoryBlock;
import org.apache.spark.unsafe.memory.MemoryBlock;
import org.apache.spark.unsafe.memory.OnHeapMemoryBlock;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.*;
Expand Down Expand Up @@ -516,22 +515,6 @@ public void soundex() {
assertEquals(fromString("世界千世").soundex(), fromString("世界千世"));
}

@Ignore
public void writeToOutputStreamUnderflow() throws IOException {
// offset underflow is apparently supported?
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
final byte[] test = "01234567".getBytes(StandardCharsets.UTF_8);

for (int i = 1; i <= Platform.BYTE_ARRAY_OFFSET; ++i) {
new UTF8String(
new ByteArrayMemoryBlock(test, Platform.BYTE_ARRAY_OFFSET - i, test.length + i))
.writeTo(outputStream);
final ByteBuffer buffer = ByteBuffer.wrap(outputStream.toByteArray(), i, test.length);
assertEquals("01234567", StandardCharsets.UTF_8.decode(buffer).toString());
outputStream.reset();
}
}

@Test
public void writeToOutputStreamSlice() throws IOException {
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Expand Down

0 comments on commit d2dc70f

Please sign in to comment.