File tree 9 files changed +24
-3
lines changed
src/test/java/reactor/netty
src/test/java/reactor/netty
9 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ ext {
130
130
awaitilityVersion = ' 4.2.2'
131
131
hoverflyJavaVersion = ' 0.19.1'
132
132
tomcatVersion = ' 9.0.99'
133
+ nettyLeakDetectorJunitExtensionVersion = " 0.0.6"
133
134
boringSslVersion = ' 2.0.70.Final'
134
135
junitVersion = ' 5.11.4'
135
136
junitPlatformLauncherVersion = ' 1.11.4'
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ dependencies {
135
135
testImplementation " org.awaitility:awaitility:$awaitilityVersion "
136
136
testImplementation " org.junit.jupiter:junit-jupiter-api:$junitVersion "
137
137
testImplementation " org.junit.jupiter:junit-jupiter-params:$junitVersion "
138
+ testImplementation " io.github.nettyplus:netty-leak-detector-junit-extension:$nettyLeakDetectorJunitExtensionVersion "
138
139
testImplementation " org.mockito:mockito-core:$mockitoVersion "
139
140
testImplementation " ch.qos.logback:logback-classic:$logbackVersion "
140
141
testImplementation " io.projectreactor.tools:blockhound-junit-platform:$blockHoundVersion "
Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
15
15
*/
16
16
package reactor .netty ;
17
17
18
+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
18
19
import io .netty .buffer .ByteBuf ;
19
20
import org .junit .jupiter .api .AfterAll ;
20
21
import org .junit .jupiter .api .BeforeAll ;
21
22
import org .junit .jupiter .api .Test ;
23
+ import org .junit .jupiter .api .extension .ExtendWith ;
22
24
import org .reactivestreams .Publisher ;
23
25
import reactor .core .publisher .Flux ;
24
26
import reactor .core .publisher .Mono ;
38
40
39
41
import static org .assertj .core .api .Assertions .assertThat ;
40
42
43
+ @ ExtendWith (NettyLeakDetectorExtension .class )
41
44
class ByteBufFluxTest {
42
45
43
46
private static File temporaryDirectory ;
Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
15
15
*/
16
16
package reactor .netty ;
17
17
18
+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
18
19
import org .junit .jupiter .api .Test ;
20
+ import org .junit .jupiter .api .extension .ExtendWith ;
19
21
import org .reactivestreams .Publisher ;
20
22
import reactor .core .publisher .Flux ;
21
23
import reactor .core .publisher .Mono ;
24
26
import java .nio .charset .Charset ;
25
27
import java .time .Duration ;
26
28
29
+ @ ExtendWith (NettyLeakDetectorExtension .class )
27
30
class ByteBufMonoTest {
28
31
29
32
@ Test
Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import java .util .concurrent .atomic .AtomicReference ;
21
21
import java .util .function .BiConsumer ;
22
22
23
+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
23
24
import io .netty .channel .Channel ;
24
25
import io .netty .channel .ChannelHandler ;
25
26
import io .netty .channel .ChannelHandlerAdapter ;
30
31
import io .netty .handler .codec .http .websocketx .Utf8FrameValidator ;
31
32
import org .junit .jupiter .api .BeforeEach ;
32
33
import org .junit .jupiter .api .Test ;
34
+ import org .junit .jupiter .api .extension .ExtendWith ;
33
35
import reactor .core .Disposable ;
34
36
import reactor .core .publisher .Mono ;
35
37
42
44
* @author Simon Baslé
43
45
* @author Violeta Georgieva
44
46
*/
47
+ @ ExtendWith (NettyLeakDetectorExtension .class )
45
48
class ConnectionTest {
46
49
47
50
static final BiConsumer <? super ChannelHandlerContext , Object > ADD_EXTRACTOR = ChannelHandlerContext ::fireChannelRead ;
Original file line number Diff line number Diff line change 33
33
import java .util .function .Predicate ;
34
34
import javax .net .ssl .SSLException ;
35
35
36
+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
36
37
import io .netty .buffer .ByteBuf ;
37
38
import io .netty .buffer .ByteBufAllocator ;
38
39
import io .netty .channel .ChannelFuture ;
52
53
import io .netty .util .ReferenceCountUtil ;
53
54
import org .junit .jupiter .api .BeforeAll ;
54
55
import org .junit .jupiter .api .Test ;
56
+ import org .junit .jupiter .api .extension .ExtendWith ;
55
57
import org .reactivestreams .Publisher ;
56
58
import reactor .core .publisher .Mono ;
57
59
58
60
import static org .assertj .core .api .Assertions .assertThat ;
59
61
62
+ @ ExtendWith (NettyLeakDetectorExtension .class )
60
63
class NettyOutboundTest {
61
64
62
65
static SelfSignedCertificate ssc ;
Original file line number Diff line number Diff line change 15
15
*/
16
16
package reactor .netty ;
17
17
18
+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
18
19
import io .netty .channel .AbstractChannel ;
19
20
import io .netty .channel .Channel ;
20
21
import io .netty .channel .ChannelConfig ;
24
25
import io .netty .channel .embedded .EmbeddedChannel ;
25
26
import org .jspecify .annotations .Nullable ;
26
27
import org .junit .jupiter .api .Test ;
28
+ import org .junit .jupiter .api .extension .ExtendWith ;
27
29
28
30
import java .net .InetSocketAddress ;
29
31
import java .net .SocketAddress ;
35
37
*
36
38
* @author Violeta Georgieva
37
39
*/
40
+ @ ExtendWith (NettyLeakDetectorExtension .class )
38
41
class ReactorNettyTest {
39
42
40
43
/*
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ dependencies {
138
138
139
139
testImplementation " org.mockito:mockito-core:$mockitoVersion "
140
140
testImplementation " io.specto:hoverfly-java-junit5:$hoverflyJavaVersion "
141
+ testImplementation " io.github.nettyplus:netty-leak-detector-junit-extension:$nettyLeakDetectorJunitExtensionVersion "
141
142
testImplementation " org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion "
142
143
testImplementation " io.projectreactor:reactor-test:$testAddonVersion "
143
144
testImplementation " org.assertj:assertj-core:$assertJVersion "
Original file line number Diff line number Diff line change 15
15
*/
16
16
package reactor .netty ;
17
17
18
+ import io .github .nettyplus .leakdetector .junit .NettyLeakDetectorExtension ;
18
19
import org .jspecify .annotations .Nullable ;
19
20
import org .junit .jupiter .api .AfterEach ;
21
+ import org .junit .jupiter .api .extension .ExtendWith ;
20
22
import org .junit .jupiter .params .provider .Arguments ;
21
23
import reactor .netty .http .HttpProtocol ;
22
24
import reactor .netty .http .client .HttpClient ;
34
36
* @author Violeta Georgieva
35
37
* @since 1.0.3
36
38
*/
39
+ @ ExtendWith (NettyLeakDetectorExtension .class )
37
40
public class BaseHttpTest {
38
41
39
42
protected DisposableServer disposableServer ;
You can’t perform that action at this time.
0 commit comments