@@ -356,7 +356,7 @@ abstract class Lettuce5AsyncClientTest extends Lettuce5ClientTestBase {
356356 def " command completes exceptionally" () {
357357 setup :
358358 // turn off auto flush to complete the command exceptionally manually
359- asyncCommands . setAutoFlushCommands(false )
359+ connection . setAutoFlushCommands(false )
360360 def conds = new AsyncConditions ()
361361 RedisFuture redisFuture = asyncCommands. del(" key1" , " key2" )
362362 boolean completedExceptionally = ((AsyncCommand ) redisFuture). completeExceptionally(new IllegalStateException (" TestException" ))
@@ -371,7 +371,8 @@ abstract class Lettuce5AsyncClientTest extends Lettuce5ClientTestBase {
371371
372372 when :
373373 // now flush and execute the command
374- asyncCommands. flushCommands()
374+ connection. flushCommands()
375+ connection. setAutoFlushCommands(true )
375376 redisFuture. get()
376377
377378 then :
@@ -405,7 +406,7 @@ abstract class Lettuce5AsyncClientTest extends Lettuce5ClientTestBase {
405406
406407 def " cancel command before it finishes" () {
407408 setup :
408- asyncCommands . setAutoFlushCommands(false )
409+ connection . setAutoFlushCommands(false )
409410 def conds = new AsyncConditions ()
410411 RedisFuture redisFuture = asyncCommands. sadd(" SKEY" , " 1" , " 2" )
411412 redisFuture. whenCompleteAsync({ res , throwable ->
@@ -417,7 +418,8 @@ abstract class Lettuce5AsyncClientTest extends Lettuce5ClientTestBase {
417418
418419 when :
419420 boolean cancelSuccess = redisFuture. cancel(true )
420- asyncCommands. flushCommands()
421+ connection. flushCommands()
422+ connection. setAutoFlushCommands(true )
421423
422424 then :
423425 conds. await()
0 commit comments