[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>
This commit is contained in:
parent
f65dc9593e
commit
27e42c1de5
|
@ -17,7 +17,6 @@
|
|||
|
||||
package org.apache.spark.network.util;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
@ -69,7 +68,7 @@ public class TransportFrameDecoderSuite {
|
|||
decoder.channelRead(ctx, len);
|
||||
decoder.channelRead(ctx, dataBuf);
|
||||
verify(interceptor, times(interceptedReads)).handle(any(ByteBuf.class));
|
||||
verify(ctx).fireChannelRead(any(ByteBuffer.class));
|
||||
verify(ctx).fireChannelRead(any(ByteBuf.class));
|
||||
assertEquals(0, len.refCnt());
|
||||
assertEquals(0, dataBuf.refCnt());
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue