diff --git a/enterprise/cluster/pom.xml b/enterprise/cluster/pom.xml index b3e0a4503b2a7..351269517a069 100644 --- a/enterprise/cluster/pom.xml +++ b/enterprise/cluster/pom.xml @@ -104,5 +104,12 @@ mockito-core test + + org.neo4j + neo4j-com + ${project.version} + test-jar + test + diff --git a/enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/ClusterNetworkTest.java b/enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/ClusterNetworkIT.java similarity index 98% rename from enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/ClusterNetworkTest.java rename to enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/ClusterNetworkIT.java index e6e09d8243777..caf969176d875 100644 --- a/enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/ClusterNetworkTest.java +++ b/enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/ClusterNetworkIT.java @@ -57,6 +57,7 @@ import org.neo4j.cluster.protocol.atomicbroadcast.multipaxos.InMemoryAcceptorInstanceStore; import org.neo4j.cluster.protocol.election.ServerIdElectionCredentialsProvider; import org.neo4j.cluster.timeout.FixedTimeoutStrategy; +import org.neo4j.com.ports.allocation.PortAuthority; import org.neo4j.helpers.NamedThreadFactory; import org.neo4j.helpers.collection.MapUtil; import org.neo4j.kernel.configuration.Config; @@ -66,7 +67,7 @@ import org.neo4j.test.rule.LoggerRule; @RunWith( value = Parameterized.class ) -public class ClusterNetworkTest +public class ClusterNetworkIT { @Parameterized.Parameters public static Collection data() @@ -151,7 +152,7 @@ public static Collection data() private static ExecutorService executor; - public ClusterNetworkTest( int nrOfServers, ClusterTestScript script ) + public ClusterNetworkIT( int nrOfServers, ClusterTestScript script ) throws URISyntaxException { this.script = script; @@ -161,7 +162,7 @@ public ClusterNetworkTest( int nrOfServers, ClusterTestScript script ) for ( int i = 0; i < nrOfServers; i++ ) { - final URI uri = new URI( "neo4j://localhost:800" + (i + 1) ); + final URI uri = new URI( "neo4j://localhost:" + PortAuthority.allocatePort() ); Monitors monitors = new Monitors(); NetworkedServerFactory factory = new NetworkedServerFactory( life,