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

Migrate RoutingExamplesIT to Testcontainers #1215

Merged
merged 1 commit into from
May 10, 2022
Merged
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
10 changes: 10 additions & 0 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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 @@ -21,7 +21,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.reactivestreams.Publisher;
import reactor.core.publisher.Flux;

Expand Down Expand Up @@ -88,7 +87,6 @@
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static org.neo4j.driver.SessionConfig.builder;

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

abstract void dumpLogs();

abstract URI databaseUri();

abstract AuthToken authToken();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.neo4j.driver.stress;

import org.junit.jupiter.api.extension.RegisterExtension;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.net.URI;
import java.util.Arrays;
Expand All @@ -30,6 +31,7 @@
import org.neo4j.driver.exceptions.SessionExpiredException;
import org.neo4j.driver.util.cc.LocalOrRemoteClusterExtension;

@Testcontainers( disabledWithoutDocker = true )
injectives marked this conversation as resolved.
Show resolved Hide resolved
class CausalClusteringStressIT extends AbstractStressTestBase<CausalClusteringStressIT.Context>
{
@RegisterExtension
Expand Down Expand Up @@ -84,12 +86,6 @@ void printStats( Context context )
System.out.println( "Bookmark failures: " + context.getBookmarkFailures() );
}

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

@Override
List<BlockingCommand<Context>> createTestSpecificBlockingCommands()
{
Expand All @@ -112,5 +108,4 @@ int getLeaderSwitchCount()
return leaderSwitches.get();
}
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,4 @@ List<RxCommand<Context>> createTestSpecificRxCommands()
static class Context extends AbstractContext
{
}

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