Skip to content

Commit a18fc72

Browse files
committed
Use initial cluster port for boltkit
1 parent 88f0daa commit a18fc72

File tree

6 files changed

+30
-28
lines changed

6 files changed

+30
-28
lines changed

driver/src/test/java/org/neo4j/driver/v1/integration/CausalClusteringIT.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
* Copyright (c) 2002-2016 "Neo Technology,"
33
* Network Engine for Objects in Lund AB [http://neotechnology.com]
4-
* <p>
4+
*
55
* This file is part of Neo4j.
6-
* <p>
6+
*
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
* <p>
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
* <p>
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

driver/src/test/java/org/neo4j/driver/v1/util/cc/Cluster.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
* Copyright (c) 2002-2016 "Neo Technology,"
33
* Network Engine for Objects in Lund AB [http://neotechnology.com]
4-
* <p>
4+
*
55
* This file is part of Neo4j.
6-
* <p>
6+
*
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
* <p>
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
* <p>
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

driver/src/test/java/org/neo4j/driver/v1/util/cc/ClusterControl.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static boolean boltKitAvailable()
3737
{
3838
try
3939
{
40-
executeCommand( "neoctrl-cluster", "-h" );
40+
executeCommand( "neoctrl-cluster", "--help" );
4141
return true;
4242
}
4343
catch ( ClusterControlException e )
@@ -46,11 +46,12 @@ static boolean boltKitAvailable()
4646
}
4747
}
4848

49-
static void installCluster( String neo4jVersion, int cores, int readReplicas, String password, Path path )
49+
static void installCluster( String neo4jVersion, int cores, int readReplicas, String password, int port,
50+
Path path )
5051
{
5152
executeCommand( "neoctrl-cluster", "install",
52-
"-c", String.valueOf( cores ), "-r", String.valueOf( readReplicas ),
53-
"-p", password,
53+
"--cores", String.valueOf( cores ), "--read-replicas", String.valueOf( readReplicas ),
54+
"--password", password, "--initial-port", String.valueOf( port ),
5455
neo4jVersion, path.toString() );
5556
}
5657

@@ -66,7 +67,7 @@ static void stopCluster( Path path )
6667

6768
static void killCluster( Path path )
6869
{
69-
executeCommand( "neoctrl-cluster", "stop", "-k", path.toString() );
70+
executeCommand( "neoctrl-cluster", "stop", "--kill", path.toString() );
7071
}
7172

7273
private static String executeCommand( String... command )

driver/src/test/java/org/neo4j/driver/v1/util/cc/ClusterMember.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
* Copyright (c) 2002-2016 "Neo Technology,"
33
* Network Engine for Objects in Lund AB [http://neotechnology.com]
4-
* <p>
4+
*
55
* This file is part of Neo4j.
6-
* <p>
6+
*
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
* <p>
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
* <p>
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

driver/src/test/java/org/neo4j/driver/v1/util/cc/ClusterRule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class ClusterRule extends ExternalResource
3838
{
3939
private static final Path CLUSTER_DIR = Paths.get( "target", "test-cluster" ).toAbsolutePath();
4040
private static final String PASSWORD = "test";
41+
private static final int INITIAL_PORT = 20_000;
4142

4243
public Cluster getCluster()
4344
{
@@ -60,7 +61,7 @@ protected void before() throws Throwable
6061
{
6162
delete( CLUSTER_DIR );
6263
// todo: get version from env
63-
SharedCluster.install( "3.1.0-M13-beta3", 3, 2, PASSWORD, CLUSTER_DIR );
64+
SharedCluster.install( "3.1.0-M13-beta3", 3, 2, PASSWORD, INITIAL_PORT, CLUSTER_DIR );
6465
SharedCluster.start();
6566
}
6667
finally

driver/src/test/java/org/neo4j/driver/v1/util/cc/SharedCluster.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
* Copyright (c) 2002-2016 "Neo Technology,"
33
* Network Engine for Objects in Lund AB [http://neotechnology.com]
4-
* <p>
4+
*
55
* This file is part of Neo4j.
6-
* <p>
6+
*
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
* <p>
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
* <p>
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,10 +45,10 @@ static boolean exists()
4545
return clusterInstance != null;
4646
}
4747

48-
static void install( String neo4jVersion, int cores, int readReplicas, String password, Path path )
48+
static void install( String neo4jVersion, int cores, int readReplicas, String password, int port, Path path )
4949
{
5050
assertClusterDoesNotExist();
51-
ClusterControl.installCluster( neo4jVersion, cores, readReplicas, password, path );
51+
ClusterControl.installCluster( neo4jVersion, cores, readReplicas, password, port, path );
5252
clusterInstance = new Cluster( path, password );
5353
}
5454

0 commit comments

Comments
 (0)