Skip to content

Commit e334fcc

Browse files
committed
Use pooled byte buffer allocator in test
The unpooled allocator is slow on Java 25 with direct buffers.
1 parent 06c3054 commit e334fcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/rabbitmq/stream/impl/ClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import com.rabbitmq.stream.impl.TestUtils.DisabledIfFilteringNotSupported;
3939
import io.netty.buffer.ByteBuf;
4040
import io.netty.buffer.ByteBufAllocator;
41-
import io.netty.buffer.UnpooledByteBufAllocator;
41+
import io.netty.buffer.PooledByteBufAllocator;
4242
import io.netty.channel.ChannelOption;
4343
import io.netty.channel.ConnectTimeoutException;
4444
import java.io.ByteArrayOutputStream;
@@ -510,7 +510,7 @@ void consume() throws Exception {
510510
@ParameterizedTest
511511
@ValueSource(booleans = {true, false})
512512
void publishAndConsume(boolean directBuffer) throws Exception {
513-
ByteBufAllocator allocator = new UnpooledByteBufAllocator(directBuffer);
513+
ByteBufAllocator allocator = new PooledByteBufAllocator(directBuffer);
514514
int publishCount = 1_000_000;
515515

516516
CountDownLatch consumedLatch = new CountDownLatch(publishCount);

0 commit comments

Comments
 (0)