File tree Expand file tree Collapse file tree 3 files changed +45
-3
lines changed Expand file tree Collapse file tree 3 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 755755 </additionalClasspathElements >
756756 </configuration >
757757 </execution >
758+ <execution >
759+ <id >reuse-netty-allocators</id >
760+ <goals >
761+ <goal >integration-test</goal >
762+ <goal >verify</goal >
763+ </goals >
764+ <configuration >
765+ <includes >
766+ <include >io/vertx/it/ReuseNettyAllocatorsTest.java</include >
767+ </includes >
768+ <systemProperties >
769+ <vertx .reuseNettyAllocators>true</vertx .reuseNettyAllocators>
770+ </systemProperties >
771+ </configuration >
772+ </execution >
758773 </executions >
759774 </plugin >
760775
9861001
9871002 </profiles >
9881003
989- </project >
1004+ </project >
Original file line number Diff line number Diff line change 1919
2020public class VertxByteBufAllocatorTest {
2121
22-
2322 @ Test
2423 public void defaultShouldNotReuseExistingNettyPooledAllocators () {
2524 Assert .assertNull (System .getProperty ("vertx.reuseNettyAllocators" ));
2625 Assert .assertNotSame (PooledByteBufAllocator .DEFAULT , VertxByteBufAllocator .POOLED_ALLOCATOR );
2726 Assert .assertNotSame (ByteBufAllocator .DEFAULT , VertxByteBufAllocator .POOLED_ALLOCATOR );
2827 Assert .assertSame (ByteBufAllocator .DEFAULT , PooledByteBufAllocator .DEFAULT );
2928 }
30-
3129}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2011-2024 Contributors to the Eclipse Foundation
3+ *
4+ * This program and the accompanying materials are made available under the
5+ * terms of the Eclipse Public License 2.0 which is available at
6+ * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
7+ * which is available at https://www.apache.org/licenses/LICENSE-2.0.
8+ *
9+ * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
10+ */
11+
12+ package io .vertx .it ;
13+
14+ import io .netty .buffer .ByteBufAllocator ;
15+ import io .netty .buffer .PooledByteBufAllocator ;
16+ import io .vertx .core .buffer .impl .VertxByteBufAllocator ;
17+ import org .junit .Assert ;
18+ import org .junit .Test ;
19+
20+ public class ReuseNettyAllocatorsTest {
21+
22+ @ Test
23+ public void testVertxAllocatorsReuseNettyAllocators () {
24+ Assert .assertEquals ("true" , System .getProperty ("vertx.reuseNettyAllocators" ));
25+ Assert .assertSame (PooledByteBufAllocator .DEFAULT , VertxByteBufAllocator .POOLED_ALLOCATOR );
26+ Assert .assertSame (ByteBufAllocator .DEFAULT , VertxByteBufAllocator .POOLED_ALLOCATOR );
27+ Assert .assertSame (ByteBufAllocator .DEFAULT , PooledByteBufAllocator .DEFAULT );
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments