Skip to content

Commit 1ec528d

Browse files
Fixed tests for lettuce 7.x (#9746)
1 parent 00bd02b commit 1ec528d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

dd-java-agent/instrumentation/lettuce/lettuce-5.0/gradle.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ de.thetaphi:forbiddenapis:3.8=compileClasspath
5858
info.picocli:picocli:4.6.3=latestDepForkedTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath
5959
io.leangen.geantyref:geantyref:1.3.16=latestDepForkedTestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath
6060
io.lettuce:lettuce-core:5.0.0.RELEASE=compileClasspath,testCompileClasspath,testRuntimeClasspath
61-
io.lettuce:lettuce-core:6.8.1.RELEASE=latestDepForkedTestCompileClasspath,latestDepForkedTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
61+
io.lettuce:lettuce-core:7.0.0.BETA2=latestDepForkedTestCompileClasspath,latestDepForkedTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
6262
io.netty:netty-buffer:4.1.118.Final=latestDepForkedTestCompileClasspath,latestDepForkedTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
6363
io.netty:netty-buffer:4.1.15.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
6464
io.netty:netty-codec-dns:4.1.118.Final=latestDepForkedTestCompileClasspath,latestDepForkedTestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath

dd-java-agent/instrumentation/lettuce/lettuce-5.0/src/test/groovy/Lettuce5AsyncClientTest.groovy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)