Skip to content

Commit 4f2f9d3

Browse files
author
Zhen Li
authored
Merge pull request #199 from pontusmelke/1.0-init-eagerly
Send INIT eagerly
2 parents 703afe8 + 6677d58 commit 4f2f9d3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

driver/src/main/java/org/neo4j/driver/internal/connector/socket/SocketConnection.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public SocketConnection( String host, int port, Config config )
6767
public void init( String clientName, Map<String,Value> authToken )
6868
{
6969
queueMessage( new InitMessage( clientName, authToken ), StreamCollector.NO_OP );
70+
sync();
7071
}
7172

7273
@Override

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,12 @@ public void shouldGetHelpfulErrorOnInvalidCredentials() throws Throwable
7474
String password = "secret";
7575
enableAuth( password );
7676

77-
Driver driver = GraphDatabase.driver( neo4j.address(), basic("thisisnotthepassword", password ) );
78-
Session session = driver.session();
79-
8077
// Expect
8178
exception.expect( ClientException.class );
8279
exception.expectMessage( "The client is unauthorized due to authentication failure." );
8380

8481
// When
85-
session.run( "RETURN 1" ).single().get(0);
82+
GraphDatabase.driver( neo4j.address(), basic("thisisnotthepassword", password ) ).session();
8683
}
8784

8885
private void enableAuth( String password ) throws Exception

0 commit comments

Comments
 (0)