|
24 | 24 | import org.junit.jupiter.api.Disabled;
|
25 | 25 | import org.junit.jupiter.api.Tag;
|
26 | 26 | import org.junit.jupiter.api.Test;
|
27 |
| -import org.nd4j.common.tests.BaseND4JTest; |
28 | 27 | import org.nd4j.aeron.ipc.NDArrayMessage;
|
29 | 28 | import org.nd4j.aeron.util.BufferUtil;
|
| 29 | +import org.nd4j.common.tests.BaseND4JTest; |
30 | 30 | import org.nd4j.common.tests.tags.NativeTag;
|
31 | 31 | import org.nd4j.common.tests.tags.TagNames;
|
32 | 32 | import org.nd4j.linalg.factory.Nd4j;
|
33 | 33 |
|
34 | 34 | import javax.annotation.concurrent.NotThreadSafe;
|
| 35 | +import java.nio.Buffer; |
35 | 36 | import java.nio.ByteBuffer;
|
36 | 37 |
|
37 | 38 | import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
@@ -67,11 +68,13 @@ public void testChunkSerialization() {
|
67 | 68 | //test equality of direct byte buffer contents vs chunked
|
68 | 69 | ByteBuffer byteBuffer = buffer.byteBuffer();
|
69 | 70 | ByteBuffer concatAll = BufferUtil.concat(concat, buffer.capacity());
|
| 71 | + Buffer concatAllBuffer = (Buffer) concatAll; |
| 72 | + Buffer byteBuffer1 = (Buffer) byteBuffer; |
70 | 73 | byte[] arrays = new byte[byteBuffer.capacity()];
|
71 |
| - byteBuffer.rewind(); |
| 74 | + byteBuffer1.rewind(); |
72 | 75 | byteBuffer.get(arrays);
|
73 | 76 | byte[] arrays2 = new byte[concatAll.capacity()];
|
74 |
| - concatAll.rewind(); |
| 77 | + concatAllBuffer.rewind(); |
75 | 78 | concatAll.get(arrays2);
|
76 | 79 | assertArrayEquals(arrays, arrays2);
|
77 | 80 | NDArrayMessage message1 = NDArrayMessage.fromChunks(chunks);
|
|
0 commit comments