Skip to content

Commit 5c593a4

Browse files
GH-2623 - Upgrade Neo4j Java driver to 5.2.0.
Closes #2623.
1 parent 025e2eb commit 5c593a4

15 files changed

+151
-156
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<maven.compiler.release>${java.version}</maven.compiler.release>
103103
<mockito>${mockito.version}</mockito>
104104
<mockito.version>4.4.0</mockito.version>
105-
<neo4j-java-driver.version>5.1.0</neo4j-java-driver.version>
105+
<neo4j-java-driver.version>5.2.0</neo4j-java-driver.version>
106106
<neo4j-migrations.version>1.13.1</neo4j-migrations.version>
107107
<neo4j.version>4.4.8</neo4j.version>
108108
<objenesis.version>3.0.1</objenesis.version>

src/main/asciidoc/faq/index.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ import reactor.util.function.Tuple2;
295295
296296
import org.neo4j.driver.Driver;
297297
import org.neo4j.driver.SessionConfig;
298-
import org.neo4j.driver.reactive.RxResult;
299-
import org.neo4j.driver.reactive.RxSession;
298+
import org.neo4j.driver.reactivestreams.RxResult;
299+
import org.neo4j.driver.reactivestreams.RxSession;
300300
import org.neo4j.driver.summary.DatabaseInfo;
301301
import org.neo4j.driver.summary.ResultSummary;
302302
import org.neo4j.driver.summary.ServerInfo;

src/main/java/org/springframework/data/neo4j/core/DefaultReactiveNeo4jClient.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
import org.neo4j.driver.Query;
2121
import org.neo4j.driver.Record;
2222
import org.neo4j.driver.Value;
23-
import org.neo4j.driver.reactive.ReactiveQueryRunner;
24-
import org.neo4j.driver.reactive.ReactiveResult;
25-
import org.neo4j.driver.reactive.ReactiveSession;
23+
import org.neo4j.driver.reactivestreams.ReactiveQueryRunner;
24+
import org.neo4j.driver.reactivestreams.ReactiveResult;
25+
import org.neo4j.driver.reactivestreams.ReactiveSession;
2626
import org.neo4j.driver.summary.ResultSummary;
2727
import org.neo4j.driver.types.TypeSystem;
28+
import org.reactivestreams.Publisher;
2829
import org.springframework.core.convert.ConversionService;
2930
import org.springframework.core.convert.converter.ConverterRegistry;
3031
import org.springframework.core.convert.support.DefaultConversionService;
@@ -36,7 +37,6 @@
3637
import org.springframework.util.Assert;
3738
import org.springframework.util.StringUtils;
3839

39-
import reactor.adapter.JdkFlowAdapter;
4040
import reactor.core.publisher.Flux;
4141
import reactor.core.publisher.Mono;
4242
import reactor.util.function.Tuple2;
@@ -48,7 +48,6 @@
4848
import java.util.Map;
4949
import java.util.Optional;
5050
import java.util.Set;
51-
import java.util.concurrent.Flow.Publisher;
5251
import java.util.concurrent.locks.ReentrantReadWriteLock;
5352
import java.util.function.BiConsumer;
5453
import java.util.function.BiFunction;
@@ -100,7 +99,7 @@ public Mono<ReactiveQueryRunner> getQueryRunner(Mono<DatabaseSelection> database
10099
try {
101100
lock.lock();
102101
Set<Bookmark> lastBookmarks = new HashSet<>(bookmarks);
103-
return Tuples.of(driver.reactiveSession(Neo4jTransactionUtils.sessionConfig(false, lastBookmarks, targetDatabaseAndUser.getT1(), targetDatabaseAndUser.getT2())), lastBookmarks);
102+
return Tuples.of(driver.session(ReactiveSession.class, Neo4jTransactionUtils.sessionConfig(false, lastBookmarks, targetDatabaseAndUser.getT1(), targetDatabaseAndUser.getT2())), lastBookmarks);
104103
} finally {
105104
lock.unlock();
106105
}
@@ -134,7 +133,7 @@ Mono<Void> close() {
134133
// We're only going to close sessions we have acquired inside the client, not something that
135134
// has been retrieved from the tx manager.
136135
if (this.delegate instanceof ReactiveSession session) {
137-
return JdkFlowAdapter.flowPublisherToFlux(session.close()).then().doOnSuccess(signal ->
136+
return Mono.fromDirect(session.close()).then().doOnSuccess(signal ->
138137
this.newBookmarkConsumer.accept(usedBookmarks, session.lastBookmarks()));
139138
}
140139

@@ -418,9 +417,9 @@ Mono<Tuple2<String, Map<String, Object>>> prepareStatement() {
418417

419418
Flux<T> executeWith(Tuple2<String, Map<String, Object>> t, ReactiveQueryRunner runner) {
420419

421-
return Flux.usingWhen(JdkFlowAdapter.flowPublisherToFlux(runner.run(t.getT1(), t.getT2())),
422-
result -> JdkFlowAdapter.flowPublisherToFlux(result.records()).mapNotNull(r -> mappingFunction.apply(typeSystem, r)),
423-
result -> JdkFlowAdapter.flowPublisherToFlux(result.consume()).doOnNext(ResultSummaries::process));
420+
return Flux.usingWhen(Flux.from(runner.run(t.getT1(), t.getT2())),
421+
result -> Flux.from(result.records()).mapNotNull(r -> mappingFunction.apply(typeSystem, r)),
422+
result -> Flux.from(result.consume()).doOnNext(ResultSummaries::process));
424423
}
425424

426425
@Override
@@ -450,8 +449,8 @@ public Flux<T> all() {
450449
Mono<ResultSummary> run() {
451450

452451
return doInQueryRunnerForMono(databaseSelection, userSelection, runner -> prepareStatement()
453-
.flatMap(t -> JdkFlowAdapter.flowPublisherToFlux(runner.run(t.getT1(), t.getT2())).single())
454-
.flatMap(rxResult -> JdkFlowAdapter.flowPublisherToFlux(rxResult.consume()).single().map(ResultSummaries::process)))
452+
.flatMap(t -> Flux.from(runner.run(t.getT1(), t.getT2())).single())
453+
.flatMap(rxResult -> Flux.from(rxResult.consume()).single().map(ResultSummaries::process)))
455454
.onErrorMap(RuntimeException.class, DefaultReactiveNeo4jClient.this::potentiallyConvertRuntimeException);
456455
}
457456
}

src/main/java/org/springframework/data/neo4j/core/ReactiveNeo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.apiguardian.api.API;
2828
import org.neo4j.driver.Driver;
2929
import org.neo4j.driver.Record;
30-
import org.neo4j.driver.reactive.ReactiveQueryRunner;
30+
import org.neo4j.driver.reactivestreams.ReactiveQueryRunner;
3131
import org.neo4j.driver.summary.ResultSummary;
3232
import org.neo4j.driver.types.TypeSystem;
3333
import org.springframework.core.log.LogAccessor;

src/main/java/org/springframework/data/neo4j/core/transaction/ReactiveNeo4jSessionSynchronization.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package org.springframework.data.neo4j.core.transaction;
1717

18-
import reactor.adapter.JdkFlowAdapter;
1918
import reactor.core.publisher.Mono;
2019

2120
import org.neo4j.driver.Driver;
@@ -79,6 +78,6 @@ public Mono<Void> afterCompletion(int status) {
7978
*/
8079
@Override
8180
protected Mono<Void> releaseResource(ReactiveNeo4jTransactionHolder resourceHolder, Object resourceKey) {
82-
return Mono.defer(() -> JdkFlowAdapter.flowPublisherToFlux(resourceHolder.getSession().close()).then());
81+
return Mono.defer(() -> Mono.fromDirect(resourceHolder.getSession().close()).then());
8382
}
8483
}

src/main/java/org/springframework/data/neo4j/core/transaction/ReactiveNeo4jTransactionHolder.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
*/
1616
package org.springframework.data.neo4j.core.transaction;
1717

18-
import reactor.adapter.JdkFlowAdapter;
1918
import reactor.core.publisher.Mono;
2019

2120
import java.util.Collection;
2221
import java.util.Set;
2322

2423
import org.neo4j.driver.Bookmark;
25-
import org.neo4j.driver.reactive.ReactiveSession;
26-
import org.neo4j.driver.reactive.ReactiveTransaction;
24+
import org.neo4j.driver.reactivestreams.ReactiveSession;
25+
import org.neo4j.driver.reactivestreams.ReactiveTransaction;
2726
import org.springframework.data.neo4j.core.DatabaseSelection;
2827
import org.springframework.data.neo4j.core.UserSelection;
2928
import org.springframework.lang.Nullable;
@@ -58,15 +57,15 @@ ReactiveTransaction getTransaction(DatabaseSelection inDatabase, UserSelection a
5857
}
5958

6059
Mono<Set<Bookmark>> commit() {
61-
return JdkFlowAdapter.flowPublisherToFlux(transaction.commit()).then(Mono.fromSupplier(session::lastBookmarks));
60+
return Mono.fromDirect(transaction.commit()).then(Mono.fromSupplier(session::lastBookmarks));
6261
}
6362

6463
Mono<Void> rollback() {
65-
return JdkFlowAdapter.flowPublisherToFlux(transaction.rollback()).then();
64+
return Mono.fromDirect(transaction.rollback()).then();
6665
}
6766

6867
Mono<Void> close() {
69-
return JdkFlowAdapter.flowPublisherToFlux(session.close()).then();
68+
return Mono.fromDirect(session.close()).then();
7069
}
7170

7271
DatabaseSelection getDatabaseSelection() {

src/main/java/org/springframework/data/neo4j/core/transaction/ReactiveNeo4jTransactionManager.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
*/
1616
package org.springframework.data.neo4j.core.transaction;
1717

18-
import reactor.adapter.JdkFlowAdapter;
1918
import reactor.core.publisher.Mono;
2019
import reactor.util.function.Tuples;
2120

2221
import org.apiguardian.api.API;
2322
import org.neo4j.driver.Driver;
2423
import org.neo4j.driver.TransactionConfig;
25-
import org.neo4j.driver.reactive.ReactiveSession;
26-
import org.neo4j.driver.reactive.ReactiveTransaction;
24+
import org.neo4j.driver.reactivestreams.ReactiveSession;
25+
import org.neo4j.driver.reactivestreams.ReactiveTransaction;
2726
import org.springframework.beans.BeansException;
2827
import org.springframework.context.ApplicationContext;
2928
import org.springframework.context.ApplicationContextAware;
@@ -214,8 +213,9 @@ public static Mono<ReactiveTransaction> retrieveReactiveTransaction(
214213

215214
// Otherwise open up a new native transaction
216215
return Mono.defer(() -> {
217-
ReactiveSession session = driver.reactiveSession(Neo4jTransactionUtils.defaultSessionConfig(targetDatabase, asUser));
218-
return JdkFlowAdapter.flowPublisherToFlux(session.beginTransaction(TransactionConfig.empty())).single().map(tx -> {
216+
217+
ReactiveSession session = driver.session(ReactiveSession.class, Neo4jTransactionUtils.defaultSessionConfig(targetDatabase, asUser));
218+
return Mono.fromDirect(session.beginTransaction(TransactionConfig.empty())).map(tx -> {
219219

220220
ReactiveNeo4jTransactionHolder newConnectionHolder = new ReactiveNeo4jTransactionHolder(
221221
new Neo4jTransactionContext(targetDatabase, asUser), session, tx);
@@ -293,8 +293,8 @@ protected Mono<Void> doBegin(TransactionSynchronizationManager transactionSynchr
293293
.getUserSelection()
294294
.switchIfEmpty(Mono.just(UserSelection.connectedUser())),
295295
(databaseSelection, userSelection) -> new Neo4jTransactionContext(databaseSelection, userSelection, bookmarkManager.getBookmarks()))
296-
.map(context -> Tuples.of(context, this.driver.reactiveSession(Neo4jTransactionUtils.sessionConfig(readOnly, context.getBookmarks(), context.getDatabaseSelection(), context.getUserSelection()))))
297-
.flatMap(contextAndSession -> JdkFlowAdapter.flowPublisherToFlux(contextAndSession.getT2().beginTransaction(transactionConfig)).single()
296+
.map(context -> Tuples.of(context, this.driver.session(ReactiveSession.class, Neo4jTransactionUtils.sessionConfig(readOnly, context.getBookmarks(), context.getDatabaseSelection(), context.getUserSelection()))))
297+
.flatMap(contextAndSession -> Mono.fromDirect(contextAndSession.getT2().beginTransaction(transactionConfig)).single()
298298
.map(nativeTransaction -> new ReactiveNeo4jTransactionHolder(contextAndSession.getT1(),
299299
contextAndSession.getT2(), nativeTransaction)))
300300
.doOnNext(transactionHolder -> {

src/test/java/org/springframework/data/neo4j/core/ReactiveNeo4jClientTest.java

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@
3030
import org.neo4j.driver.Record;
3131
import org.neo4j.driver.SessionConfig;
3232
import org.neo4j.driver.Values;
33-
import org.neo4j.driver.reactive.ReactiveResult;
34-
import org.neo4j.driver.reactive.ReactiveSession;
33+
import org.neo4j.driver.reactivestreams.ReactiveResult;
34+
import org.neo4j.driver.reactivestreams.ReactiveSession;
3535
import org.neo4j.driver.summary.ResultSummary;
3636
import org.neo4j.driver.types.TypeSystem;
3737
import org.springframework.data.neo4j.core.transaction.Neo4jTransactionUtils;
3838
import org.springframework.lang.Nullable;
3939
import org.springframework.util.ReflectionUtils;
40-
import reactor.adapter.JdkFlowAdapter;
4140
import reactor.core.publisher.Flux;
4241
import reactor.core.publisher.Mono;
4342
import reactor.core.scheduler.Schedulers;
@@ -89,10 +88,10 @@ void prepareMocks() {
8988

9089
when(driver.defaultTypeSystem()).thenReturn(typeSystem);
9190

92-
when(driver.reactiveSession(any(SessionConfig.class))).thenReturn(session);
91+
when(driver.session(eq(ReactiveSession.class), any(SessionConfig.class))).thenReturn(session);
9392

9493
when(session.lastBookmarks()).thenReturn(Set.of(Mockito.mock(Bookmark.class)));
95-
when(session.close()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.empty()));
94+
when(session.close()).thenReturn(Mono.empty());
9695
}
9796

9897
@AfterEach
@@ -107,9 +106,9 @@ void databaseSelectionShouldWorkBeforeAsUser() {
107106

108107
prepareMocks();
109108

110-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
111-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2).publishOn(Schedulers.single())));
112-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
109+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
110+
when(result.records()).thenReturn(Flux.just(record1, record2).publishOn(Schedulers.single()));
111+
when(result.consume()).thenReturn(Mono.just(resultSummary));
113112

114113
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
115114

@@ -146,9 +145,9 @@ void databaseSelectionShouldWorkAfterAsUser() {
146145

147146
prepareMocks();
148147

149-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
150-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2).publishOn(Schedulers.single())));
151-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
148+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
149+
when(result.records()).thenReturn(Flux.just(record1, record2).publishOn(Schedulers.single()));
150+
when(result.consume()).thenReturn(Mono.just(resultSummary));
152151

153152
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
154153

@@ -185,9 +184,9 @@ void userSelectionShouldWork() {
185184

186185
prepareMocks();
187186

188-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
189-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2).publishOn(Schedulers.single())));
190-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
187+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
188+
when(result.records()).thenReturn(Flux.just(record1, record2).publishOn(Schedulers.single()));
189+
when(result.consume()).thenReturn(Mono.just(resultSummary));
191190

192191
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
193192

@@ -222,9 +221,9 @@ void queryCreationShouldFeelGood() {
222221

223222
prepareMocks();
224223

225-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
226-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2)));
227-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
224+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
225+
when(result.records()).thenReturn(Flux.just(record1, record2));
226+
when(result.consume()).thenReturn(Mono.just(resultSummary));
228227

229228
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
230229

@@ -266,9 +265,9 @@ void databaseSelectionShouldBePossibleOnlyOnce() {
266265

267266
prepareMocks();
268267

269-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
270-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2).publishOn(Schedulers.single())));
271-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
268+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
269+
when(result.records()).thenReturn(Flux.just(record1, record2).publishOn(Schedulers.single()));
270+
when(result.consume()).thenReturn(Mono.just(resultSummary));
272271

273272
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
274273

@@ -318,9 +317,9 @@ void databaseSelectionBeanShouldGetRespectedIfExisting() {
318317

319318
prepareMocks();
320319

321-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
322-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2).publishOn(Schedulers.single())));
323-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
320+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
321+
when(result.records()).thenReturn(Flux.just(record1, record2).publishOn(Schedulers.single()));
322+
when(result.consume()).thenReturn(Mono.just(resultSummary));
324323

325324
String databaseName = "customDatabaseSelection";
326325
String cypher = "RETURN 1";
@@ -407,9 +406,9 @@ void reading() {
407406

408407
prepareMocks();
409408

410-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
411-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1)));
412-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
409+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
410+
when(result.records()).thenReturn(Flux.just(record1));
411+
when(result.consume()).thenReturn(Mono.just(resultSummary));
413412
when(record1.get("name")).thenReturn(Values.value("michael"));
414413

415414
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
@@ -440,9 +439,9 @@ void shouldApplyNullChecksDuringReading() {
440439

441440
prepareMocks();
442441

443-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
444-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1, record2)));
445-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
442+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
443+
when(result.records()).thenReturn(Flux.just(record1, record2));
444+
when(result.consume()).thenReturn(Mono.just(resultSummary));
446445
when(record1.get("name")).thenReturn(Values.value("michael"));
447446

448447
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
@@ -473,8 +472,8 @@ void writing() {
473472

474473
prepareMocks();
475474

476-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
477-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
475+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
476+
when(result.consume()).thenReturn(Mono.just(resultSummary));
478477

479478
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
480479

@@ -505,9 +504,9 @@ void automaticConversion() {
505504

506505
prepareMocks();
507506

508-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
509-
when(result.records()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Flux.just(record1)));
510-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
507+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
508+
when(result.records()).thenReturn(Flux.just(record1));
509+
when(result.consume()).thenReturn(Mono.just(resultSummary));
511510
when(record1.size()).thenReturn(1);
512511
when(record1.get(0)).thenReturn(Values.value(23L));
513512

@@ -534,8 +533,8 @@ void queriesWithoutResultShouldFitInAsWell() {
534533

535534
prepareMocks();
536535

537-
when(session.run(anyString(), anyMap())).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(result)));
538-
when(result.consume()).thenReturn(JdkFlowAdapter.publisherToFlowPublisher(Mono.just(resultSummary)));
536+
when(session.run(anyString(), anyMap())).thenReturn(Mono.just(result));
537+
when(result.consume()).thenReturn(Mono.just(resultSummary));
539538

540539
ReactiveNeo4jClient client = ReactiveNeo4jClient.create(driver);
541540

@@ -559,7 +558,7 @@ void queriesWithoutResultShouldFitInAsWell() {
559558

560559
void verifyDatabaseSelection(@Nullable String targetDatabase) {
561560

562-
verify(driver).reactiveSession(configArgumentCaptor.capture());
561+
verify(driver).session(eq(ReactiveSession.class), configArgumentCaptor.capture());
563562
SessionConfig config = configArgumentCaptor.getValue();
564563

565564
if (targetDatabase != null) {
@@ -571,7 +570,7 @@ void verifyDatabaseSelection(@Nullable String targetDatabase) {
571570

572571
void verifyUserSelection(@Nullable String aUser) {
573572

574-
verify(driver).reactiveSession(configArgumentCaptor.capture());
573+
verify(driver).session(eq(ReactiveSession.class), configArgumentCaptor.capture());
575574
SessionConfig config = configArgumentCaptor.getValue();
576575

577576
// We assume the driver supports this before the test

0 commit comments

Comments
 (0)