Skip to content

Commit 21a18ab

Browse files
Added guard for restClient shutdown freeze. (#9471)
1 parent 0354de2 commit 21a18ab

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

dd-java-agent/instrumentation/lettuce-4/src/test/groovy/Lettuce4ClientTestBase.groovy

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ abstract class Lettuce4ClientTestBase extends VersionedNamingTestBase {
8080

8181
def cleanup() {
8282
connection.close()
83-
redisClient.shutdown()
83+
84+
try {
85+
redisClient.shutdown(5, 10, TimeUnit.SECONDS)
86+
} catch (Throwable ignored) {
87+
// No-op.
88+
}
89+
8490
redisServer.stop()
8591
}
8692

dd-java-agent/instrumentation/lettuce-5/src/test/groovy/Lettuce5ClientTestBase.groovy

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ abstract class Lettuce5ClientTestBase extends VersionedNamingTestBase {
8181

8282
def cleanup() {
8383
connection.close()
84-
redisClient.shutdown()
84+
85+
try {
86+
redisClient.shutdown(5, 10, TimeUnit.SECONDS)
87+
} catch (Throwable ignored) {
88+
// No-op.
89+
}
90+
8591
redisServer.stop()
8692
}
8793
}

0 commit comments

Comments
 (0)