File tree Expand file tree Collapse file tree 9 files changed +24
-3
lines changed
src/test/java/reactor/netty
src/test/java/reactor/netty Expand file tree Collapse file tree 9 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ ext {
130130 awaitilityVersion = ' 4.2.2'
131131 hoverflyJavaVersion = ' 0.19.1'
132132 tomcatVersion = ' 9.0.99'
133+ nettyLeakDetectorJunitExtensionVersion = " 0.0.6"
133134 boringSslVersion = ' 2.0.70.Final'
134135 junitVersion = ' 5.11.4'
135136 junitPlatformLauncherVersion = ' 1.11.4'
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ dependencies {
135135 testImplementation " org.awaitility:awaitility:$awaitilityVersion "
136136 testImplementation " org.junit.jupiter:junit-jupiter-api:$junitVersion "
137137 testImplementation " org.junit.jupiter:junit-jupiter-params:$junitVersion "
138+ testImplementation " io.github.nettyplus:netty-leak-detector-junit-extension:$nettyLeakDetectorJunitExtensionVersion "
138139 testImplementation " org.mockito:mockito-core:$mockitoVersion "
139140 testImplementation " ch.qos.logback:logback-classic:$logbackVersion "
140141 testImplementation " io.projectreactor.tools:blockhound-junit-platform:$blockHoundVersion "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2017-2022 VMware, Inc. or its affiliates, All Rights Reserved.
2+ * Copyright (c) 2017-2024 VMware, Inc. or its affiliates, All Rights Reserved.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1515 */
1616package reactor .netty ;
1717
18+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
1819import io .netty .buffer .ByteBuf ;
1920import org .junit .jupiter .api .AfterAll ;
2021import org .junit .jupiter .api .BeforeAll ;
2122import org .junit .jupiter .api .Test ;
23+ import org .junit .jupiter .api .extension .ExtendWith ;
2224import org .reactivestreams .Publisher ;
2325import reactor .core .publisher .Flux ;
2426import reactor .core .publisher .Mono ;
3840
3941import static org .assertj .core .api .Assertions .assertThat ;
4042
43+ @ ExtendWith (NettyLeakDetectorExtension .class )
4144class ByteBufFluxTest {
4245
4346 private static File temporaryDirectory ;
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2020-2021 VMware, Inc. or its affiliates, All Rights Reserved.
2+ * Copyright (c) 2020-2024 VMware, Inc. or its affiliates, All Rights Reserved.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1515 */
1616package reactor .netty ;
1717
18+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
1819import org .junit .jupiter .api .Test ;
20+ import org .junit .jupiter .api .extension .ExtendWith ;
1921import org .reactivestreams .Publisher ;
2022import reactor .core .publisher .Flux ;
2123import reactor .core .publisher .Mono ;
2426import java .nio .charset .Charset ;
2527import java .time .Duration ;
2628
29+ @ ExtendWith (NettyLeakDetectorExtension .class )
2730class ByteBufMonoTest {
2831
2932 @ Test
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2017-2023 VMware, Inc. or its affiliates, All Rights Reserved.
2+ * Copyright (c) 2017-2024 VMware, Inc. or its affiliates, All Rights Reserved.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2020import java .util .concurrent .atomic .AtomicReference ;
2121import java .util .function .BiConsumer ;
2222
23+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
2324import io .netty .channel .Channel ;
2425import io .netty .channel .ChannelHandler ;
2526import io .netty .channel .ChannelHandlerAdapter ;
3031import io .netty .handler .codec .http .websocketx .Utf8FrameValidator ;
3132import org .junit .jupiter .api .BeforeEach ;
3233import org .junit .jupiter .api .Test ;
34+ import org .junit .jupiter .api .extension .ExtendWith ;
3335import reactor .core .Disposable ;
3436import reactor .core .publisher .Mono ;
3537
4244 * @author Simon Baslé
4345 * @author Violeta Georgieva
4446 */
47+ @ ExtendWith (NettyLeakDetectorExtension .class )
4548class ConnectionTest {
4649
4750 static final BiConsumer <? super ChannelHandlerContext , Object > ADD_EXTRACTOR = ChannelHandlerContext ::fireChannelRead ;
Original file line number Diff line number Diff line change 3333import java .util .function .Predicate ;
3434import javax .net .ssl .SSLException ;
3535
36+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
3637import io .netty .buffer .ByteBuf ;
3738import io .netty .buffer .ByteBufAllocator ;
3839import io .netty .channel .ChannelFuture ;
5253import io .netty .util .ReferenceCountUtil ;
5354import org .junit .jupiter .api .BeforeAll ;
5455import org .junit .jupiter .api .Test ;
56+ import org .junit .jupiter .api .extension .ExtendWith ;
5557import org .reactivestreams .Publisher ;
5658import reactor .core .publisher .Mono ;
5759
5860import static org .assertj .core .api .Assertions .assertThat ;
5961
62+ @ ExtendWith (NettyLeakDetectorExtension .class )
6063class NettyOutboundTest {
6164
6265 static SelfSignedCertificate ssc ;
Original file line number Diff line number Diff line change 1515 */
1616package reactor .netty ;
1717
18+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
1819import io .netty .channel .AbstractChannel ;
1920import io .netty .channel .Channel ;
2021import io .netty .channel .ChannelConfig ;
2425import io .netty .channel .embedded .EmbeddedChannel ;
2526import org .jspecify .annotations .Nullable ;
2627import org .junit .jupiter .api .Test ;
28+ import org .junit .jupiter .api .extension .ExtendWith ;
2729
2830import java .net .InetSocketAddress ;
2931import java .net .SocketAddress ;
3537 *
3638 * @author Violeta Georgieva
3739 */
40+ @ ExtendWith (NettyLeakDetectorExtension .class )
3841class ReactorNettyTest {
3942
4043 /*
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ dependencies {
138138
139139 testImplementation " org.mockito:mockito-core:$mockitoVersion "
140140 testImplementation " io.specto:hoverfly-java-junit5:$hoverflyJavaVersion "
141+ testImplementation " io.github.nettyplus:netty-leak-detector-junit-extension:$nettyLeakDetectorJunitExtensionVersion "
141142 testImplementation " org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion "
142143 testImplementation " io.projectreactor:reactor-test:$testAddonVersion "
143144 testImplementation " org.assertj:assertj-core:$assertJVersion "
Original file line number Diff line number Diff line change 1515 */
1616package reactor .netty ;
1717
18+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
1819import org .jspecify .annotations .Nullable ;
1920import org .junit .jupiter .api .AfterEach ;
21+ import org .junit .jupiter .api .extension .ExtendWith ;
2022import org .junit .jupiter .params .provider .Arguments ;
2123import reactor .netty .http .HttpProtocol ;
2224import reactor .netty .http .client .HttpClient ;
3436 * @author Violeta Georgieva
3537 * @since 1.0.3
3638 */
39+ @ ExtendWith (NettyLeakDetectorExtension .class )
3740public class BaseHttpTest {
3841
3942 protected DisposableServer disposableServer ;
You can’t perform that action at this time.
0 commit comments