Permalink
Browse files

[SPARK-18963] o.a.s.unsafe.types.UTF8StringSuite.writeToOutputStreamI…

…ntArray test

fails on big endian. Only change byte order on little endian

## What changes were proposed in this pull request?

Fix test to only change byte order on LE platforms

## How was this patch tested?

Test run on Big Endian and Little Endian platforms

Author: Pete Robbins <[email protected]>

Closes #16375 from robbinspg/SPARK-18963.
  • Loading branch information...
1 parent 17579bd commit 1311448ea8da38f9998f1ace79968af6e47d0278 @robbinspg robbinspg committed with srowen Dec 23, 2016
@@ -591,7 +591,7 @@ public void writeToOutputStreamIntArray() throws IOException {
// verify that writes work on objects that are not byte arrays
final ByteBuffer buffer = StandardCharsets.UTF_8.encode("大千世界");
buffer.position(0);
- buffer.order(ByteOrder.LITTLE_ENDIAN);
+ buffer.order(ByteOrder.nativeOrder());
final int length = buffer.limit();
assertEquals(12, length);

0 comments on commit 1311448

Please sign in to comment.