1919package org .neo4j .driver .integration ;
2020
2121import static java .time .Duration .ofMillis ;
22- import static java .util .Arrays .asList ;
2322import static org .hamcrest .MatcherAssert .assertThat ;
2423import static org .hamcrest .Matchers .containsString ;
2524import static org .hamcrest .Matchers .greaterThan ;
@@ -78,13 +77,13 @@ void shouldSetTransactionMetadata() {
7877 Map <String , Object > metadata = new HashMap <>();
7978 metadata .put ("a" , "hello world" );
8079 metadata .put ("b" , LocalDate .now ());
81- metadata .put ("c" , asList ( true , false , true ) );
80+ metadata .put ("c" , false );
8281
8382 TransactionConfig config =
8483 TransactionConfig .builder ().withMetadata (metadata ).build ();
8584
8685 // call listTransactions procedure that should list itself with the specified metadata
87- Result result = driver .session ().run ("CALL dbms.listTransactions() " , config );
86+ Result result = driver .session ().run ("SHOW TRANSACTIONS YIELD metaData " , config );
8887 Map <String , Object > receivedMetadata = result .single ().get ("metaData" ).asMap ();
8988
9089 assertEquals (metadata , receivedMetadata );
@@ -101,7 +100,7 @@ void shouldSetTransactionMetadataAsync() {
101100
102101 // call listTransactions procedure that should list itself with the specified metadata
103102 CompletionStage <Map <String , Object >> metadataFuture = driver .asyncSession ()
104- .runAsync ("CALL dbms.listTransactions() " , config )
103+ .runAsync ("SHOW TRANSACTIONS YIELD metaData " , config )
105104 .thenCompose (ResultCursor ::singleAsync )
106105 .thenApply (record -> record .get ("metaData" ).asMap ());
107106
@@ -312,10 +311,10 @@ private static void testTransactionMetadataWithAsyncTransactionFunctions(boolean
312311 // call listTransactions procedure that should list itself with the specified metadata
313312 CompletionStage <Record > singleFuture = read
314313 ? asyncSession .readTransactionAsync (
315- tx -> tx .runAsync ("CALL dbms.listTransactions() " ).thenCompose (ResultCursor ::singleAsync ),
314+ tx -> tx .runAsync ("SHOW TRANSACTIONS YIELD metaData " ).thenCompose (ResultCursor ::singleAsync ),
316315 config )
317316 : asyncSession .writeTransactionAsync (
318- tx -> tx .runAsync ("CALL dbms.listTransactions() " ).thenCompose (ResultCursor ::singleAsync ),
317+ tx -> tx .runAsync ("SHOW TRANSACTIONS YIELD metaData " ).thenCompose (ResultCursor ::singleAsync ),
319318 config );
320319
321320 CompletionStage <Map <String , Object >> metadataFuture =
@@ -337,9 +336,9 @@ private static void testTransactionMetadataWithTransactionFunctions(boolean read
337336 // call listTransactions procedure that should list itself with the specified metadata
338337 Record single = read
339338 ? session .readTransaction (
340- tx -> tx .run ("CALL dbms.listTransactions() " ).single (), config )
339+ tx -> tx .run ("SHOW TRANSACTIONS YIELD metaData " ).single (), config )
341340 : session .writeTransaction (
342- tx -> tx .run ("CALL dbms.listTransactions() " ).single (), config );
341+ tx -> tx .run ("SHOW TRANSACTIONS YIELD metaData " ).single (), config );
343342
344343 Map <String , Object > receivedMetadata = single .get ("metaData" ).asMap ();
345344
0 commit comments