Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 2f9aabc

Browse files
committed
Create AbstractByteBufTest for ByteBufAdaptor
There are a number of test failures that needs to be looked at, still.
1 parent 8d31917 commit 2f9aabc

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,13 @@
394394
<version>${netty.build.version}</version>
395395
<scope>test</scope>
396396
</dependency>
397+
<dependency>
398+
<groupId>io.netty</groupId>
399+
<artifactId>netty-buffer</artifactId>
400+
<version>${netty.version}</version>
401+
<type>test-jar</type>
402+
<scope>test</scope>
403+
</dependency>
397404
<dependency>
398405
<groupId>io.netty</groupId>
399406
<artifactId>netty-handler</artifactId>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package io.netty.buffer.api.adaptor;
2+
3+
import io.netty.buffer.AbstractByteBufTest;
4+
import io.netty.buffer.ByteBuf;
5+
import org.junit.AfterClass;
6+
import org.junit.BeforeClass;
7+
8+
public class ByteBufAdaptorTest extends AbstractByteBufTest {
9+
static ByteBufAllocatorAdaptor alloc;
10+
11+
@BeforeClass
12+
public static void setUpAllocator() {
13+
alloc = new ByteBufAllocatorAdaptor();
14+
}
15+
16+
@AfterClass
17+
public static void tearDownAllocator() throws Exception {
18+
alloc.close();
19+
}
20+
21+
@Override
22+
protected ByteBuf newBuffer(int capacity, int maxCapacity) {
23+
return alloc.buffer(capacity, capacity);
24+
}
25+
}

0 commit comments

Comments
 (0)