Fix: close all connections after each tests
This commit is contained in:
20
src/test/kotlin/eventDemo/externalServices/RedisTest.kt
Normal file
20
src/test/kotlin/eventDemo/externalServices/RedisTest.kt
Normal file
@@ -0,0 +1,20 @@
|
||||
package eventDemo.externalServices
|
||||
|
||||
import io.kotest.core.NamedTag
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
import io.kotest.matchers.equals.shouldBeEqual
|
||||
import redis.clients.jedis.JedisPooled
|
||||
|
||||
private val redisUrl = "redis://localhost:6379"
|
||||
|
||||
class RedisTest :
|
||||
FunSpec({
|
||||
tags(NamedTag("redis"))
|
||||
|
||||
xtest("test connection with jedis") {
|
||||
JedisPooled(redisUrl).also {
|
||||
it.set("test", "test")
|
||||
it.get("test") shouldBeEqual "test"
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user