Skip to content

Commit

Permalink
Use newer embedded redis
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmadMasry committed Jan 16, 2025
1 parent 4880131 commit dbbb0a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dd-java-agent/instrumentation/valkey-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ addTestSuiteForDir('latestDepTest', 'test')
dependencies {
compileOnly group: 'io.valkey', name: 'valkey-java', version: '5.3.0'

testImplementation group: 'com.github.kstyrc', name: 'embedded-redis', version: '0.6'
testImplementation group: 'com.github.codemonstur', name: 'embedded-redis', version: '1.4.3'
testImplementation group: 'io.valkey', name: 'valkey-java', version: '5.3.0'
latestDepTestImplementation group: 'io.valkey', name: 'valkey-java', version: '5.+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import datadog.trace.api.DDSpanTypes
import datadog.trace.bootstrap.instrumentation.api.Tags
import io.valkey.Jedis
import redis.embedded.RedisServer

import spock.lang.Shared

abstract class ValkeyClientTest extends VersionedNamingTestBase {
Expand All @@ -17,10 +18,12 @@ abstract class ValkeyClientTest extends VersionedNamingTestBase {
int port = PortUtils.randomOpenPort()

@Shared
RedisServer redisServer = RedisServer.builder()
.setting("bind 127.0.0.1")
RedisServer redisServer = RedisServer.newRedisServer()
.port(port)
.setting("bind 127.0.0.1") // good for local development on Windows to prevent security popups
.setting("maxmemory 128M")
.port(port).build()
.build()

@Shared
Jedis jedis = new Jedis("localhost", port)

Expand All @@ -32,7 +35,6 @@ abstract class ValkeyClientTest extends VersionedNamingTestBase {
}

def setupSpec() {
println "Using redis: $redisServer.args"
redisServer.start()
}

Expand Down

0 comments on commit dbbb0a7

Please sign in to comment.