Skip to content

Commit

Permalink
add Netty leak detector extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis committed Mar 25, 2024
1 parent 2db210a commit 9a927ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
<artifactId>neo4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.nettyplus</groupId>
<artifactId>netty-leak-detector-junit-extension</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING;
import static org.neo4j.driver.testutil.TestUtil.assertNoCircularReferences;

import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension;
import java.time.Clock;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import java.util.stream.LongStream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
Expand All @@ -53,6 +55,7 @@
import org.neo4j.driver.testutil.TestUtil;

@ParallelizableIT
@ExtendWith(NettyLeakDetectorExtension.class)
class TransactionIT {
@RegisterExtension
static final SessionExtension session = new SessionExtension();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.neo4j.driver.testutil.TestUtil.assertNoCircularReferences;
import static org.neo4j.driver.testutil.TestUtil.await;

import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -48,6 +49,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.neo4j.driver.Query;
import org.neo4j.driver.async.AsyncSession;
Expand All @@ -60,6 +62,7 @@
import org.neo4j.driver.testutil.ParallelizableIT;

@ParallelizableIT
@ExtendWith(NettyLeakDetectorExtension.class)
class AsyncTransactionIT {
@RegisterExtension
static final DatabaseExtension neo4j = new DatabaseExtension();
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<hamcrest.version>2.2</hamcrest.version>
<mockito-core.version>5.8.0</mockito-core.version>
<junit.version>5.10.2</junit.version>
<netty-leak-detector.version>0.0.4</netty-leak-detector.version>
<!-- supply a newer version than the one supplied by the reactive-streams 1.0.4 -->
<testng.version>7.9.0</testng.version>
<jarchivelib.version>1.2.0</jarchivelib.version>
Expand Down Expand Up @@ -219,6 +220,11 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.github.nettyplus</groupId>
<artifactId>netty-leak-detector-junit-extension</artifactId>
<version>${netty-leak-detector.version}</version>
</dependency>

<!-- Testkit Backend Dependencies -->
<dependency>
Expand Down

0 comments on commit 9a927ca

Please sign in to comment.