Create AbstractByteBufTest for ByteBufAdaptor

There are a number of test failures that needs to be looked at, still.
This commit is contained in:
Chris Vest 2021-03-06 11:22:25 +01:00
parent 8d31917bc6
commit 2f9aabc915
2 changed files with 32 additions and 0 deletions

View File

@ -394,6 +394,13 @@
<version>${netty.build.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>${netty.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>

View File

@ -0,0 +1,25 @@
package io.netty.buffer.api.adaptor;
import io.netty.buffer.AbstractByteBufTest;
import io.netty.buffer.ByteBuf;
import org.junit.AfterClass;
import org.junit.BeforeClass;
public class ByteBufAdaptorTest extends AbstractByteBufTest {
static ByteBufAllocatorAdaptor alloc;
@BeforeClass
public static void setUpAllocator() {
alloc = new ByteBufAllocatorAdaptor();
}
@AfterClass
public static void tearDownAllocator() throws Exception {
alloc.close();
}
@Override
protected ByteBuf newBuffer(int capacity, int maxCapacity) {
return alloc.buffer(capacity, capacity);
}
}