Skip to content

Commit 8fd3067

Browse files
authored
ARROW-17112: [Java] Fix a failure of TestArrowReaderWriter.testFileFooterSizeOverflow on s390x (#13638)
`TestArrowReaderWriter.testFileFooterSizeOverflow` in arrow-vectors always causes a failure on s390x. This is because the test code stores footer length in platform native-endian buffer while footer length is stored as little-endian in a footer. This PR fixes only the test code. Authored-by: Kazuaki Ishizaki <ishizaki@jp.ibm.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent d81d845 commit 8fd3067

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ public void testFileFooterSizeOverflow() {
897897
System.arraycopy(magicBytes, 0, data, 0, ArrowMagic.MAGIC_LENGTH);
898898
int footerLength = Integer.MAX_VALUE;
899899
byte[] footerLengthBytes =
900-
ByteBuffer.allocate(4).order(ByteOrder.nativeOrder()).putInt(footerLength).array();
900+
ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(footerLength).array();
901901
int footerOffset = data.length - ArrowMagic.MAGIC_LENGTH - 4;
902902
System.arraycopy(footerLengthBytes, 0, data, footerOffset, 4);
903903
System.arraycopy(magicBytes, 0, data, footerOffset + 4, ArrowMagic.MAGIC_LENGTH);

0 commit comments

Comments
 (0)