Fix a buffer leak in JsonObjectDecoderTest
This commit is contained in:
parent
aed13ba5ef
commit
d0b355b26e
@ -24,8 +24,6 @@ import io.netty.handler.codec.TooLongFrameException;
|
|||||||
import io.netty.util.CharsetUtil;
|
import io.netty.util.CharsetUtil;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class JsonObjectDecoderTest {
|
public class JsonObjectDecoderTest {
|
||||||
@ -176,6 +174,7 @@ public class JsonObjectDecoderTest {
|
|||||||
|
|
||||||
ByteBuf res = ch.readInbound();
|
ByteBuf res = ch.readInbound();
|
||||||
assertEquals(object, res.toString(CharsetUtil.UTF_8));
|
assertEquals(object, res.toString(CharsetUtil.UTF_8));
|
||||||
|
res.release();
|
||||||
|
|
||||||
assertFalse(ch.finish());
|
assertFalse(ch.finish());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user