Skip to content

Commit 959cf64

Browse files
committed
Fixed build failures
1 parent c134dc2 commit 959cf64

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

driver/src/main/java/org/neo4j/driver/v1/StatementRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*
4545
* <ul>
4646
* <li>Read from or discard a result, for instance via {@link StatementResult#next()},
47-
* {@link StatementResult#consume()}, {@link StatementResult#discard()}.</li>
47+
* {@link StatementResult#consume()}.</li>
4848
* <li>Explicitly commit a transaction using {@link Transaction#close()}</li>
4949
* <li>Return a session to the pool using {@link Session#close()}</li>
5050
* </ul>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private void startAndCloseSessions( Driver driver, int sessionCount )
136136
{
137137
Session s = driver.session();
138138
sessions.add( s );
139-
s.run( "RETURN 1" ).discard();
139+
s.run( "RETURN 1" ).consume();
140140
}
141141
}
142142
finally

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private void enableAuth( String password ) throws Exception
9999
"credentials", "neo4j",
100100
"new_credentials", password ).asMap( ofValue()) ) );
101101
Session sess = setPassword.session();
102-
sess.run( "RETURN 1" ).discard();
102+
sess.run( "RETURN 1" ).consume();
103103
sess.close();
104104
setPassword.close();
105105
}

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void shouldThrowHelpfulSyntaxError() throws Throwable
5151

5252
// When
5353
StatementResult result = session.run( "invalid statement" );
54-
result.discard();
54+
result.consume();
5555
}
5656

5757
@Test
@@ -61,7 +61,7 @@ public void shouldNotAllowMoreTxAfterClientException() throws Throwable
6161
Transaction tx = session.beginTransaction();
6262

6363
// And Given an error has occurred
64-
try { tx.run( "invalid" ).discard(); } catch ( ClientException e ) {}
64+
try { tx.run( "invalid" ).consume(); } catch ( ClientException e ) {}
6565

6666
// Expect
6767
exception.expect( ClientException.class );
@@ -77,7 +77,7 @@ public void shouldNotAllowMoreTxAfterClientException() throws Throwable
7777
public void shouldAllowNewStatementAfterRecoverableError() throws Throwable
7878
{
7979
// Given an error has occurred
80-
try { session.run( "invalid" ).discard(); } catch ( ClientException e ) {}
80+
try { session.run( "invalid" ).consume(); } catch ( ClientException e ) {}
8181

8282
// When
8383
StatementResult cursor = session.run( "RETURN 1" );
@@ -93,7 +93,7 @@ public void shouldAllowNewTransactionAfterRecoverableError() throws Throwable
9393
// Given an error has occurred in a prior transaction
9494
try ( Transaction tx = session.beginTransaction() )
9595
{
96-
tx.run( "invalid" ).discard();
96+
tx.run( "invalid" ).consume();
9797
}
9898
catch ( ClientException e ) {}
9999

driver/src/test/java/org/neo4j/driver/v1/util/TestNeo4j.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void clearDatabaseContents( Session session, String reason )
8989
// Note - this hangs for extended periods some times, because there are tests that leave sessions running.
9090
// Thus, we need to wait for open sessions and transactions to time out before this will go through.
9191
// This could be helped by an extension in the future.
92-
session.run( "MATCH (n) DETACH DELETE n" ).discard();
92+
session.run( "MATCH (n) DETACH DELETE n" ).consume();
9393
}
9494

9595
public void restartServerOnEmptyDatabase( Neo4jSettings neo4jSettings ) throws Exception

0 commit comments

Comments
 (0)