@@ -415,7 +415,7 @@ void shouldRoundRobinWriteSessionsInTransaction() throws Exception
415
415
void shouldFailOnNonDiscoverableServer () throws IOException , InterruptedException
416
416
{
417
417
// Given
418
- StubServer .start ( "discover_not_supported .script" , 9001 );
418
+ StubServer .start ( "discover_not_supported_9001 .script" , 9001 );
419
419
URI uri = URI .create ( "neo4j://127.0.0.1:9001" );
420
420
final Driver driver = GraphDatabase .driver ( uri , INSECURE_CONFIG );
421
421
@@ -778,10 +778,10 @@ void shouldRetryWriteTransactionUntilFailure() throws Exception
778
778
@ Test
779
779
void shouldRetryReadTransactionAndPerformRediscoveryUntilSuccess () throws Exception
780
780
{
781
- StubServer router1 = StubServer .start ( "acquire_endpoints_v3 .script" , 9010 );
781
+ StubServer router1 = StubServer .start ( "acquire_endpoints_v3_9010 .script" , 9010 );
782
782
StubServer brokenReader1 = StubServer .start ( "dead_read_server_tx.script" , 9005 );
783
783
StubServer brokenReader2 = StubServer .start ( "dead_read_server_tx.script" , 9006 );
784
- StubServer router2 = StubServer .start ( "discover_servers .script" , 9003 );
784
+ StubServer router2 = StubServer .start ( "discover_servers_9010 .script" , 9003 );
785
785
StubServer reader = StubServer .start ( "read_server_v3_read_tx.script" , 9004 );
786
786
787
787
try ( Driver driver = newDriverWithSleeplessClock ( "neo4j://127.0.0.1:9010" ); Session session = driver .session () )
@@ -805,9 +805,9 @@ void shouldRetryReadTransactionAndPerformRediscoveryUntilSuccess() throws Except
805
805
@ Test
806
806
void shouldRetryWriteTransactionAndPerformRediscoveryUntilSuccess () throws Exception
807
807
{
808
- StubServer router1 = StubServer .start ( "discover_servers .script" , 9010 );
808
+ StubServer router1 = StubServer .start ( "discover_servers_9010 .script" , 9010 );
809
809
StubServer brokenWriter1 = StubServer .start ( "dead_write_server.script" , 9001 );
810
- StubServer router2 = StubServer .start ( "acquire_endpoints_v3 .script" , 9002 );
810
+ StubServer router2 = StubServer .start ( "acquire_endpoints_v3_9010 .script" , 9002 );
811
811
StubServer brokenWriter2 = StubServer .start ( "dead_write_server.script" , 9008 );
812
812
StubServer writer = StubServer .start ( "write_server_v3_write_tx.script" , 9007 );
813
813
@@ -833,16 +833,16 @@ void shouldRetryWriteTransactionAndPerformRediscoveryUntilSuccess() throws Excep
833
833
void shouldUseInitialRouterForRediscoveryWhenAllOtherRoutersAreDead () throws Exception
834
834
{
835
835
// initial router does not have itself in the returned set of routers
836
- StubServer router = StubServer .start ( "acquire_endpoints_v3.script" , 9010 );
836
+ StubServer router = StubServer .start ( "acquire_endpoints_v3.script" , 9001 );
837
837
838
- try ( Driver driver = GraphDatabase .driver ( "neo4j://127.0.0.1:9010 " , INSECURE_CONFIG ) )
838
+ try ( Driver driver = GraphDatabase .driver ( "neo4j://127.0.0.1:9001 " , INSECURE_CONFIG ) )
839
839
{
840
840
driver .verifyConnectivity ();
841
841
try ( Session session = driver .session ( builder ().withDefaultAccessMode ( AccessMode .READ ).build () ) )
842
842
{
843
843
// restart router on the same port with different script that contains itself as reader
844
844
assertEquals ( 0 , router .exitStatus () );
845
- router = StubServer .start ( "rediscover_using_initial_router.script" , 9010 );
845
+ router = StubServer .start ( "rediscover_using_initial_router.script" , 9001 );
846
846
847
847
List <String > names = readStrings ( "MATCH (n) RETURN n.name AS name" , session );
848
848
assertEquals ( asList ( "Bob" , "Alice" ), names );
@@ -895,8 +895,8 @@ void shouldSendRoutingContextToServer() throws Exception
895
895
@ Test
896
896
void shouldServeReadsButFailWritesWhenNoWritersAvailable () throws Exception
897
897
{
898
- StubServer router1 = StubServer .start ( "discover_no_writers .script" , 9010 );
899
- StubServer router2 = StubServer .start ( "discover_no_writers .script" , 9004 );
898
+ StubServer router1 = StubServer .start ( "discover_no_writers_9010 .script" , 9010 );
899
+ StubServer router2 = StubServer .start ( "discover_no_writers_9010 .script" , 9004 );
900
900
StubServer reader = StubServer .start ( "read_server_v3_read_tx.script" , 9003 );
901
901
902
902
try ( Driver driver = GraphDatabase .driver ( "neo4j://127.0.0.1:9010" , INSECURE_CONFIG );
@@ -919,7 +919,7 @@ void shouldAcceptRoutingTableWithoutWritersAndThenRediscover() throws Exception
919
919
{
920
920
// first router does not have itself in the resulting routing table so connection
921
921
// towards it will be closed after rediscovery
922
- StubServer router1 = StubServer .start ( "discover_no_writers .script" , 9010 );
922
+ StubServer router1 = StubServer .start ( "discover_no_writers_9010 .script" , 9010 );
923
923
StubServer router2 = null ;
924
924
StubServer reader = StubServer .start ( "read_server_v3_read_tx.script" , 9003 );
925
925
StubServer writer = StubServer .start ( "write_with_bookmarks.script" , 9007 );
@@ -930,7 +930,7 @@ void shouldAcceptRoutingTableWithoutWritersAndThenRediscover() throws Exception
930
930
try ( Session session = driver .session () )
931
931
{
932
932
// start another router which knows about writes, use same address as the initial router
933
- router2 = StubServer .start ( "acquire_endpoints_v3 .script" , 9010 );
933
+ router2 = StubServer .start ( "acquire_endpoints_v3_9010 .script" , 9010 );
934
934
935
935
assertEquals ( asList ( "Bob" , "Alice" , "Tina" ), readStrings ( "MATCH (n) RETURN n.name" , session ) );
936
936
@@ -983,7 +983,7 @@ void shouldSendMultipleBookmarks() throws Exception
983
983
StubServer router = StubServer .start ( "acquire_endpoints_v3.script" , 9001 );
984
984
StubServer writer = StubServer .start ( "multiple_bookmarks.script" , 9007 );
985
985
986
- try ( Driver driver = GraphDatabase .driver ( "neo4j://localhost :9001" , INSECURE_CONFIG );
986
+ try ( Driver driver = GraphDatabase .driver ( "neo4j://127.0.0.1 :9001" , INSECURE_CONFIG );
987
987
Session session = driver .session ( builder ().withBookmarks ( InternalBookmark .parse (
988
988
asOrderedSet ( "neo4j:bookmark:v1:tx5" , "neo4j:bookmark:v1:tx29" , "neo4j:bookmark:v1:tx94" , "neo4j:bookmark:v1:tx56" ,
989
989
"neo4j:bookmark:v1:tx16" , "neo4j:bookmark:v1:tx68" ) ) ).build () ) )
@@ -1007,16 +1007,16 @@ void shouldSendMultipleBookmarks() throws Exception
1007
1007
void shouldForgetAddressOnDatabaseUnavailableError () throws Exception
1008
1008
{
1009
1009
// perform initial discovery using router1
1010
- StubServer router1 = StubServer .start ( "discover_servers .script" , 9010 );
1010
+ StubServer router1 = StubServer .start ( "discover_servers_9010 .script" , 9010 );
1011
1011
// attempt to write using writer1 which fails with 'Neo.TransientError.General.DatabaseUnavailable'
1012
1012
// it should then be forgotten and trigger new rediscovery
1013
1013
StubServer writer1 = StubServer .start ( "writer_unavailable.script" , 9001 );
1014
1014
// perform rediscovery using router2, it should return a valid writer2
1015
- StubServer router2 = StubServer .start ( "acquire_endpoints_v3 .script" , 9002 );
1015
+ StubServer router2 = StubServer .start ( "acquire_endpoints_v3_9010 .script" , 9002 );
1016
1016
// write on writer2 should be successful
1017
1017
StubServer writer2 = StubServer .start ( "write_server_v3_write_tx.script" , 9007 );
1018
1018
1019
- try ( Driver driver = newDriverWithSleeplessClock ( "neo4j://localhost :9010" ); Session session = driver .session () )
1019
+ try ( Driver driver = newDriverWithSleeplessClock ( "neo4j://127.0.0.1 :9010" ); Session session = driver .session () )
1020
1020
{
1021
1021
AtomicInteger invocations = new AtomicInteger ();
1022
1022
List <Record > records = session .writeTransaction ( queryWork ( "CREATE (n {name:'Bob'})" , invocations ) );
0 commit comments