Skip to content

Commit

Permalink
use Netty leak detector extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis committed Feb 22, 2024
1 parent 84a4e36 commit 67d79e3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.github.nettyplus</groupId>
<artifactId>netty-leak-detector-junit-extension</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.asynchttpclient;

import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension;
import org.asynchttpclient.test.EchoHandler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
Expand All @@ -24,12 +25,14 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.asynchttpclient.test.TestUtils.addHttpConnector;

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@ExtendWith(NettyLeakDetectorExtension.class)
public abstract class AbstractBasicTest {
protected static final Logger logger = LoggerFactory.getLogger(AbstractBasicTest.class);
protected static final int TIMEOUT = 30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@
*/
package org.asynchttpclient.testserver;

import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension;
import org.asynchttpclient.AsyncHttpClient;
import org.asynchttpclient.AsyncHttpClientConfig;
import org.asynchttpclient.DefaultAsyncHttpClientConfig;
import org.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.asynchttpclient.Dsl.asyncHttpClient;
import static org.asynchttpclient.Dsl.config;

@ExtendWith(NettyLeakDetectorExtension.class)
public abstract class HttpTest {

protected static final String COMPLETED_EVENT = "Completed";
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.github.nettyplus</groupId>
<artifactId>netty-leak-detector-junit-extension</artifactId>
<version>0.0.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down

0 comments on commit 67d79e3

Please sign in to comment.