From 4d681bfc6f19deaf63a42dd0983d15ef89224318 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 28 May 2021 09:26:51 +0200 Subject: [PATCH] Fix test-error which was introduced by porting tests to junit5 (#11330) Motivation: b89a807d15fd925c21d3c875836145cd5302c8c9 moved the buffer tests to junit5 but introduced a small error which could lead to test-failure Modifications: Correctly override the method and assert that super throws (as we can not expand the buffer). Result: No more test failures --- .../buffer/WrappedUnpooledUnsafeByteBufTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/buffer/src/test/java/io/netty/buffer/WrappedUnpooledUnsafeByteBufTest.java b/buffer/src/test/java/io/netty/buffer/WrappedUnpooledUnsafeByteBufTest.java index 5e845e07ef..7a1563d785 100644 --- a/buffer/src/test/java/io/netty/buffer/WrappedUnpooledUnsafeByteBufTest.java +++ b/buffer/src/test/java/io/netty/buffer/WrappedUnpooledUnsafeByteBufTest.java @@ -239,6 +239,17 @@ public class WrappedUnpooledUnsafeByteBufTest extends BigEndianUnsafeDirectByteB }); } + @Test + @Override + public void testGetBytesByteBuffer() { + assertThrows(IndexOutOfBoundsException.class, new Executable() { + @Override + public void execute() { + WrappedUnpooledUnsafeByteBufTest.super.testGetBytesByteBuffer(); + } + }); + } + @Test @Override public void testForEachByteDesc2() {