Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Netty leak detector extension #1545

Open
wants to merge 1 commit into
base: 5.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5</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