|
30 | 30 | import java.util.ArrayList;
|
31 | 31 | import java.util.List;
|
32 | 32 |
|
33 |
| -import org.neo4j.driver.AccessMode; |
34 | 33 | import org.neo4j.driver.AuthTokens;
|
35 | 34 | import org.neo4j.driver.Config;
|
36 | 35 | import org.neo4j.driver.Driver;
|
37 | 36 | import org.neo4j.driver.GraphDatabase;
|
38 |
| -import org.neo4j.driver.Result; |
39 | 37 | import org.neo4j.driver.Session;
|
40 | 38 | import org.neo4j.driver.async.AsyncSession;
|
41 | 39 | import org.neo4j.driver.async.ResultCursor;
|
|
55 | 53 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
56 | 54 | import static org.junit.jupiter.api.Assertions.assertNull;
|
57 | 55 | import static org.neo4j.driver.SessionConfig.builder;
|
58 |
| -import static org.neo4j.driver.SessionConfig.forDatabase; |
59 | 56 | import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING;
|
60 | 57 | import static org.neo4j.driver.util.StubServer.INSECURE_CONFIG;
|
61 | 58 | import static org.neo4j.driver.util.TestUtil.await;
|
@@ -127,28 +124,6 @@ void shouldStreamingRecordsInBatchesRx() throws Exception
|
127 | 124 | }
|
128 | 125 | }
|
129 | 126 |
|
130 |
| - @Test |
131 |
| - void shouldOnlyPullRecordsWhenNeededSimpleSession() throws Exception |
132 |
| - { |
133 |
| - StubServer server = stubController.startStub( "streaming_records_v4_buffering.script", 9001 ); |
134 |
| - try |
135 |
| - { |
136 |
| - try ( Driver driver = GraphDatabase.driver( "bolt://localhost:9001", INSECURE_CONFIG ) ) |
137 |
| - { |
138 |
| - Session session = driver.session( builder().withFetchSize( 2 ).build() ); |
139 |
| - Result result = session.run( "MATCH (n) RETURN n.name" ); |
140 |
| - ArrayList<String> resultList = new ArrayList<>(); |
141 |
| - result.forEachRemaining( ( rec ) -> resultList.add( rec.get( 0 ).asString() ) ); |
142 |
| - |
143 |
| - assertEquals( resultList, asList( "Bob", "Alice", "Tina", "Frank", "Daisy", "Clive" ) ); |
144 |
| - } |
145 |
| - } |
146 |
| - finally |
147 |
| - { |
148 |
| - assertEquals( 0, server.exitStatus() ); |
149 |
| - } |
150 |
| - } |
151 |
| - |
152 | 127 | @Test
|
153 | 128 | void shouldOnlyPullRecordsWhenNeededAsyncSession() throws Exception
|
154 | 129 | {
|
@@ -196,39 +171,6 @@ void shouldPullAllRecordsOnListAsyncWhenOverWatermark() throws Exception
|
196 | 171 | }
|
197 | 172 | }
|
198 | 173 |
|
199 |
| - @Test |
200 |
| - void shouldAllowDatabaseNameInSessionRun() throws Throwable |
201 |
| - { |
202 |
| - StubServer server = stubController.startStub( "read_server_v4_read.script", 9001 ); |
203 |
| - |
204 |
| - try ( Driver driver = GraphDatabase.driver( "bolt://localhost:9001", INSECURE_CONFIG ); |
205 |
| - Session session = driver.session( builder().withDatabase( "mydatabase" ).withDefaultAccessMode( AccessMode.READ ).build() ) ) |
206 |
| - { |
207 |
| - final Result result = session.run( "MATCH (n) RETURN n.name" ); |
208 |
| - result.consume(); |
209 |
| - } |
210 |
| - finally |
211 |
| - { |
212 |
| - assertEquals( 0, server.exitStatus() ); |
213 |
| - } |
214 |
| - } |
215 |
| - |
216 |
| - @Test |
217 |
| - void shouldAllowDatabaseNameInBeginTransaction() throws Throwable |
218 |
| - { |
219 |
| - StubServer server = stubController.startStub( "read_server_v4_read_tx.script", 9001 ); |
220 |
| - |
221 |
| - try ( Driver driver = GraphDatabase.driver( "bolt://localhost:9001", INSECURE_CONFIG ); |
222 |
| - Session session = driver.session( forDatabase( "mydatabase" ) ) ) |
223 |
| - { |
224 |
| - session.readTransaction( tx -> tx.run( "MATCH (n) RETURN n.name" ).consume() ); |
225 |
| - } |
226 |
| - finally |
227 |
| - { |
228 |
| - assertEquals( 0, server.exitStatus() ); |
229 |
| - } |
230 |
| - } |
231 |
| - |
232 | 174 | @Test
|
233 | 175 | void shouldDiscardIfPullNotFinished() throws Throwable
|
234 | 176 | {
|
|
0 commit comments