Skip to content

Commit c0f4082

Browse files
committed
[MINOR][NETWORK][TEST] Fix TransportFrameDecoderSuite to use ByteBuf instead of ByteBuffer
## What changes were proposed in this pull request? `fireChannelRead` expects `io.netty.buffer.ByteBuf`.I checked that this is the only place which misuse `java.nio.ByteBuffer` in `network` module. ## How was this patch tested? Pass the Jenkins with the existing tests. Closes #23442 from dongjoon-hyun/SPARK-NETWORK-COMMON. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 27e42c1) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent bd6e570 commit c0f4082

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

common/network-common/src/test/java/org/apache/spark/network/util/TransportFrameDecoderSuite.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.spark.network.util;
1919

20-
import java.nio.ByteBuffer;
2120
import java.util.ArrayList;
2221
import java.util.List;
2322
import java.util.Random;
@@ -69,7 +68,7 @@ public void testInterception() throws Exception {
6968
decoder.channelRead(ctx, len);
7069
decoder.channelRead(ctx, dataBuf);
7170
verify(interceptor, times(interceptedReads)).handle(any(ByteBuf.class));
72-
verify(ctx).fireChannelRead(any(ByteBuffer.class));
71+
verify(ctx).fireChannelRead(any(ByteBuf.class));
7372
assertEquals(0, len.refCnt());
7473
assertEquals(0, dataBuf.refCnt());
7574
} finally {

0 commit comments

Comments
 (0)