@@ -415,7 +415,7 @@ void shouldRoundRobinWriteSessionsInTransaction() throws Exception
415415 void shouldFailOnNonDiscoverableServer () throws IOException , InterruptedException
416416 {
417417 // Given
418- StubServer .start ( "discover_not_supported .script" , 9001 );
418+ StubServer .start ( "discover_not_supported_9001 .script" , 9001 );
419419 URI uri = URI .create ( "neo4j://127.0.0.1:9001" );
420420 final Driver driver = GraphDatabase .driver ( uri , INSECURE_CONFIG );
421421
@@ -778,10 +778,10 @@ void shouldRetryWriteTransactionUntilFailure() throws Exception
778778 @ Test
779779 void shouldRetryReadTransactionAndPerformRediscoveryUntilSuccess () throws Exception
780780 {
781- StubServer router1 = StubServer .start ( "acquire_endpoints_v3 .script" , 9010 );
781+ StubServer router1 = StubServer .start ( "acquire_endpoints_v3_9010 .script" , 9010 );
782782 StubServer brokenReader1 = StubServer .start ( "dead_read_server_tx.script" , 9005 );
783783 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 );
785785 StubServer reader = StubServer .start ( "read_server_v3_read_tx.script" , 9004 );
786786
787787 try ( Driver driver = newDriverWithSleeplessClock ( "neo4j://127.0.0.1:9010" ); Session session = driver .session () )
@@ -805,9 +805,9 @@ void shouldRetryReadTransactionAndPerformRediscoveryUntilSuccess() throws Except
805805 @ Test
806806 void shouldRetryWriteTransactionAndPerformRediscoveryUntilSuccess () throws Exception
807807 {
808- StubServer router1 = StubServer .start ( "discover_servers .script" , 9010 );
808+ StubServer router1 = StubServer .start ( "discover_servers_9010 .script" , 9010 );
809809 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 );
811811 StubServer brokenWriter2 = StubServer .start ( "dead_write_server.script" , 9008 );
812812 StubServer writer = StubServer .start ( "write_server_v3_write_tx.script" , 9007 );
813813
@@ -833,16 +833,16 @@ void shouldRetryWriteTransactionAndPerformRediscoveryUntilSuccess() throws Excep
833833 void shouldUseInitialRouterForRediscoveryWhenAllOtherRoutersAreDead () throws Exception
834834 {
835835 // 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 );
837837
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 ) )
839839 {
840840 driver .verifyConnectivity ();
841841 try ( Session session = driver .session ( builder ().withDefaultAccessMode ( AccessMode .READ ).build () ) )
842842 {
843843 // restart router on the same port with different script that contains itself as reader
844844 assertEquals ( 0 , router .exitStatus () );
845- router = StubServer .start ( "rediscover_using_initial_router.script" , 9010 );
845+ router = StubServer .start ( "rediscover_using_initial_router.script" , 9001 );
846846
847847 List <String > names = readStrings ( "MATCH (n) RETURN n.name AS name" , session );
848848 assertEquals ( asList ( "Bob" , "Alice" ), names );
@@ -895,8 +895,8 @@ void shouldSendRoutingContextToServer() throws Exception
895895 @ Test
896896 void shouldServeReadsButFailWritesWhenNoWritersAvailable () throws Exception
897897 {
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 );
900900 StubServer reader = StubServer .start ( "read_server_v3_read_tx.script" , 9003 );
901901
902902 try ( Driver driver = GraphDatabase .driver ( "neo4j://127.0.0.1:9010" , INSECURE_CONFIG );
@@ -919,7 +919,7 @@ void shouldAcceptRoutingTableWithoutWritersAndThenRediscover() throws Exception
919919 {
920920 // first router does not have itself in the resulting routing table so connection
921921 // 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 );
923923 StubServer router2 = null ;
924924 StubServer reader = StubServer .start ( "read_server_v3_read_tx.script" , 9003 );
925925 StubServer writer = StubServer .start ( "write_with_bookmarks.script" , 9007 );
@@ -930,7 +930,7 @@ void shouldAcceptRoutingTableWithoutWritersAndThenRediscover() throws Exception
930930 try ( Session session = driver .session () )
931931 {
932932 // 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 );
934934
935935 assertEquals ( asList ( "Bob" , "Alice" , "Tina" ), readStrings ( "MATCH (n) RETURN n.name" , session ) );
936936
@@ -983,7 +983,7 @@ void shouldSendMultipleBookmarks() throws Exception
983983 StubServer router = StubServer .start ( "acquire_endpoints_v3.script" , 9001 );
984984 StubServer writer = StubServer .start ( "multiple_bookmarks.script" , 9007 );
985985
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 );
987987 Session session = driver .session ( builder ().withBookmarks ( InternalBookmark .parse (
988988 asOrderedSet ( "neo4j:bookmark:v1:tx5" , "neo4j:bookmark:v1:tx29" , "neo4j:bookmark:v1:tx94" , "neo4j:bookmark:v1:tx56" ,
989989 "neo4j:bookmark:v1:tx16" , "neo4j:bookmark:v1:tx68" ) ) ).build () ) )
@@ -1007,16 +1007,16 @@ void shouldSendMultipleBookmarks() throws Exception
10071007 void shouldForgetAddressOnDatabaseUnavailableError () throws Exception
10081008 {
10091009 // perform initial discovery using router1
1010- StubServer router1 = StubServer .start ( "discover_servers .script" , 9010 );
1010+ StubServer router1 = StubServer .start ( "discover_servers_9010 .script" , 9010 );
10111011 // attempt to write using writer1 which fails with 'Neo.TransientError.General.DatabaseUnavailable'
10121012 // it should then be forgotten and trigger new rediscovery
10131013 StubServer writer1 = StubServer .start ( "writer_unavailable.script" , 9001 );
10141014 // 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 );
10161016 // write on writer2 should be successful
10171017 StubServer writer2 = StubServer .start ( "write_server_v3_write_tx.script" , 9007 );
10181018
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 () )
10201020 {
10211021 AtomicInteger invocations = new AtomicInteger ();
10221022 List <Record > records = session .writeTransaction ( queryWork ( "CREATE (n {name:'Bob'})" , invocations ) );
0 commit comments