This repository was archived by the owner on Jul 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
integration-test/java/org/neo4j/shell
main/java/org/neo4j/shell/state Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public void wrongPortWithBolt() throws Exception
8888 main .connectMaybeInteractively ( shell , connectionConfig , true );
8989 }
9090
91- @ Ignore
91+ @ Test
9292 public void wrongPortWithNeo4j () throws Exception
9393 {
9494 // given
@@ -103,7 +103,7 @@ public void wrongPortWithNeo4j() throws Exception
103103 ConnectionConfig connectionConfig = sac .connectionConfig ;
104104
105105 exception .expect ( ServiceUnavailableException .class );
106- exception .expectMessage ( "Unable to connect to localhost:1234 , ensure the database is running and that there is a working network connection to it" );
106+ exception .expectMessage ( "Unable to connect to database , ensure the database is running and that there is a working network connection to it" );
107107 main .connectMaybeInteractively ( shell , connectionConfig , true );
108108 }
109109
Original file line number Diff line number Diff line change @@ -172,6 +172,9 @@ private void reconnect() {
172172 }
173173
174174 private void reconnect (boolean keepBookmark ) {
175+ // This will already throw an exception if there is no connectivity
176+ driver .verifyConnectivity ();
177+
175178 SessionConfig .Builder builder = SessionConfig .builder ();
176179 builder .withDefaultAccessMode ( AccessMode .WRITE );
177180 if ( !ABSENT_DB_NAME .equals ( activeDatabaseNameAsSetByUser ) )
You can’t perform that action at this time.
0 commit comments