Skip to content

Commit

Permalink
fixing port conflicts for Enterprise Server integration tests, tends …
Browse files Browse the repository at this point in the history
…to be a problem on POWER8 agents
  • Loading branch information
lassewesth authored and MishaDemianenko committed Jul 31, 2017
1 parent 5820b4f commit 5010a67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions enterprise/server-enterprise/pom.xml
Expand Up @@ -208,6 +208,14 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-com</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Expand Up @@ -23,6 +23,8 @@
import java.io.IOException;
import java.util.Optional;

import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.com.ports.allocation.PortAuthority;
import org.neo4j.kernel.configuration.BoltConnector;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory;
Expand All @@ -33,6 +35,8 @@
import org.neo4j.server.helpers.CommunityServerBuilder;
import org.neo4j.server.rest.web.DatabaseActions;

import static org.neo4j.helpers.ListenSocketAddress.listenAddress;

public class EnterpriseServerBuilder extends CommunityServerBuilder
{
protected EnterpriseServerBuilder( LogProvider logProvider )
Expand All @@ -50,6 +54,8 @@ public static EnterpriseServerBuilder serverOnRandomPorts()
EnterpriseServerBuilder server = server();
server.onRandomPorts();
server.withProperty( new BoltConnector( "bolt" ).listen_address.name(), "localhost:0" );
server.withProperty( OnlineBackupSettings.online_backup_server.name(),
listenAddress( "127.0.0.1", PortAuthority.allocatePort() ) );
return server;
}

Expand Down

0 comments on commit 5010a67

Please sign in to comment.