@ -164,26 +164,29 @@ public abstract class AbstractDataBufferAllocatingTests {
@@ -164,26 +164,29 @@ public abstract class AbstractDataBufferAllocatingTests {
@SuppressWarnings ( "deprecation" ) // PooledByteBufAllocator no longer supports tinyCacheSize.
public static Stream < Arguments > dataBufferFactories ( ) {
return Stream . of (
// arguments(named("NettyDataBufferFactory - UnpooledByteBufAllocator - preferDirect = true",
// new NettyDataBufferFactory(new UnpooledByteBufAllocator(true)))),
// Netty 4
arguments ( named ( "NettyDataBufferFactory - UnpooledByteBufAllocator - preferDirect = true" ,
new NettyDataBufferFactory ( new UnpooledByteBufAllocator ( true ) ) ) ) ,
arguments ( named ( "NettyDataBufferFactory - UnpooledByteBufAllocator - preferDirect = false" ,
new NettyDataBufferFactory ( new UnpooledByteBufAllocator ( false ) ) ) ) ,
// 1) Disable caching for reliable leak detection, see https://github.com/netty/netty/issues/5275
// 2) maxOrder is 4 (vs default 11) but can be increased if necessary
// arguments(named("NettyDataBufferFactory - PooledByteBufAllocator - preferDirect = true",
// new NettyDataBufferFactory(new PooledByteBufAllocator(true, 1, 1, 4096, 4, 0, 0, 0, true)))),
// arguments(named("NettyDataBufferFactory - PooledByteBufAllocator - preferDirect = false",
// new NettyDataBufferFactory(new PooledByteBufAllocator(false, 1, 1, 4096, 4, 0, 0, 0, true)))),
arguments ( named ( "NettyDataBufferFactory - PooledByteBufAllocator - preferDirect = true" ,
new NettyDataBufferFactory ( new PooledByteBufAllocator ( true , 1 , 1 , 4096 , 4 , 0 , 0 , 0 , true ) ) ) ) ,
arguments ( named ( "NettyDataBufferFactory - PooledByteBufAllocator - preferDirect = false" ,
new NettyDataBufferFactory ( new PooledByteBufAllocator ( false , 1 , 1 , 4096 , 4 , 0 , 0 , 0 , true ) ) ) ) ,
// Netty 5
arguments ( named ( "Netty5DataBufferFactory - BufferAllocator.onHeapUnpooled()" ,
new Netty5DataBufferFactory ( BufferAllocator . onHeapUnpooled ( ) ) ) ) ,
// arguments(named("Netty5DataBufferFactory - BufferAllocator.offHeapUnpooled()",
// new Netty5DataBufferFactory(BufferAllocator.offHeapUnpooled()))),
// arguments(named("Netty5DataBufferFactory - BufferAllocator.onHeapPooled()",
// new Netty5DataBufferFactory(BufferAllocator.onHeapPooled()))),
// arguments(named("Netty5DataBufferFactory - BufferAllocator.offHeapPooled()",
// new Netty5DataBufferFactory(BufferAllocator.offHeapPooled()))),
// arguments(named("DefaultDataBufferFactory - preferDirect = true",
// new DefaultDataBufferFactory(true))),
arguments ( named ( "Netty5DataBufferFactory - BufferAllocator.offHeapUnpooled()" ,
new Netty5DataBufferFactory ( BufferAllocator . offHeapUnpooled ( ) ) ) ) ,
arguments ( named ( "Netty5DataBufferFactory - BufferAllocator.onHeapPooled()" ,
new Netty5DataBufferFactory ( BufferAllocator . onHeapPooled ( ) ) ) ) ,
arguments ( named ( "Netty5DataBufferFactory - BufferAllocator.offHeapPooled()" ,
new Netty5DataBufferFactory ( BufferAllocator . offHeapPooled ( ) ) ) ) ,
// Default
arguments ( named ( "DefaultDataBufferFactory - preferDirect = true" ,
new DefaultDataBufferFactory ( true ) ) ) ,
arguments ( named ( "DefaultDataBufferFactory - preferDirect = false" ,
new DefaultDataBufferFactory ( false ) ) )
) ;