Skip to content

Commit

Permalink
Migrate RoutingExamplesIT to Testcontainers (neo4j#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
injectives committed Nov 22, 2022
1 parent 5c394b9 commit 6002b6e
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 1,164 deletions.
10 changes: 10 additions & 0 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>neo4j</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
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.neo4j.driver.AuthToken;
import org.neo4j.driver.Bookmark;
import org.neo4j.driver.Config;
Expand All @@ -86,7 +85,6 @@
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;

@ExtendWith(DumpLogsOnFailureWatcher.class)
abstract class AbstractStressTestBase<C extends AbstractContext> {
private static final int THREAD_COUNT = Integer.getInteger("threadCount", 8);
private static final int ASYNC_BATCH_SIZE = Integer.getInteger("asyncBatchSize", 10);
Expand Down Expand Up @@ -183,8 +181,6 @@ private void runStressTest(Function<C, List<Future<?>>> threadLauncher) throws T
verifyResults(context, resourcesInfo);
}

abstract void dumpLogs();

abstract URI databaseUri();

abstract AuthToken authToken();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
import org.neo4j.driver.Config;
import org.neo4j.driver.exceptions.SessionExpiredException;
import org.neo4j.driver.util.cc.LocalOrRemoteClusterExtension;
import org.testcontainers.junit.jupiter.Testcontainers;

@Testcontainers(disabledWithoutDocker = true)
class CausalClusteringStressIT extends AbstractStressTestBase<CausalClusteringStressIT.Context> {
@RegisterExtension
static final LocalOrRemoteClusterExtension clusterRule = new LocalOrRemoteClusterExtension();
Expand Down Expand Up @@ -73,11 +75,6 @@ void printStats(Context context) {
System.out.println("Bookmark failures: " + context.getBookmarkFailures());
}

@Override
void dumpLogs() {
clusterRule.dumpClusterLogs();
}

@Override
List<BlockingCommand<Context>> createTestSpecificBlockingCommands() {
return Arrays.asList(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,4 @@ List<RxCommand<Context>> createTestSpecificRxCommands() {
}

static class Context extends AbstractContext {}

@Override
void dumpLogs() {
neo4j.dumpLogs();
}
}
Loading

0 comments on commit 6002b6e

Please sign in to comment.