update jedis config
This commit is contained in:
@@ -3,16 +3,18 @@ package eventDemo.adapter.infrastructureLayer
|
||||
import io.kotest.core.NamedTag
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
import io.kotest.matchers.equals.shouldBeEqual
|
||||
import redis.clients.jedis.JedisPool
|
||||
import redis.clients.jedis.JedisPooled
|
||||
|
||||
private val redisUrl = "redis://localhost:6379"
|
||||
|
||||
class RedisTest :
|
||||
FunSpec({
|
||||
tags(NamedTag("redis"))
|
||||
|
||||
test("test connection with jedis") {
|
||||
JedisPool("redis://localhost:6379").apply {
|
||||
resource.set("test", "test")
|
||||
resource.get("test") shouldBeEqual "test"
|
||||
JedisPooled(redisUrl).also {
|
||||
it.set("test", "test")
|
||||
it.get("test") shouldBeEqual "test"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user