Skip to content

Commit c1061ba

Browse files
committed
Fixing imports and class naming
1 parent 9c085a5 commit c1061ba

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

modules/tests/it/src/test/scala/com/github/scoquelin/arugula/BaseRedisCommandsIntegrationSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ trait BaseRedisCommandsIntegrationSpec extends AsyncWordSpecLike with TestContai
5454
clientResources = clientResources
5555
)
5656

57-
cachedClients = RedisCommandCachedClients(redisSingleNodeConfig, redisClusterConfig)
57+
cachedClients = RedisCommandsCachedClients(redisSingleNodeConfig, redisClusterConfig)
5858
}
5959

6060
override def afterEach(): Unit = {

modules/tests/it/src/test/scala/com/github/scoquelin/arugula/CachedClients.scala renamed to modules/tests/it/src/test/scala/com/github/scoquelin/arugula/RedisCommandsCachedClients.scala

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.github.scoquelin.arugula
22

3-
import com.github.scoquelin.arugula.codec.RedisCodec
4-
import com.github.scoquelin.arugula.codec.LongCodec
3+
import com.github.scoquelin.arugula.codec.{LongCodec, RedisCodec}
54
import com.github.scoquelin.arugula.config.LettuceRedisClientConfig
6-
import io.lettuce.core.codec.{StringCodec => JStringCodec, RedisCodec => JRedisCodec}
5+
import io.lettuce.core.codec.{StringCodec => JStringCodec}
76

87
import scala.concurrent.ExecutionContext
98

@@ -17,12 +16,12 @@ trait CachedClients {
1716
def getClient[K, V](codec: RedisCodec[K, V], connectionType: RedisConnectionType): RedisCommandsClient[K, V]
1817
}
1918

20-
private class RedisCommandCachedClients(redisSingleNodeClientWithStringValue: RedisCommandsClient[String, String],
21-
redisSingleNodeClientWithLongValue: RedisCommandsClient[String, Long],
22-
redisClusterClientWithStringValue: RedisCommandsClient[String, String],
23-
redisClusterClientWithLongValue: RedisCommandsClient[String, Long]) extends CachedClients {
19+
private class RedisCommandsCachedClients(redisSingleNodeClientWithStringValue: RedisCommandsClient[String, String],
20+
redisSingleNodeClientWithLongValue: RedisCommandsClient[String, Long],
21+
redisClusterClientWithStringValue: RedisCommandsClient[String, String],
22+
redisClusterClientWithLongValue: RedisCommandsClient[String, Long]) extends CachedClients {
2423

25-
def getClient[K, V](codec: RedisCodec[K, V], connectionType: RedisConnectionType): RedisCommandsClient[K, V] = {
24+
override def getClient[K, V](codec: RedisCodec[K, V], connectionType: RedisConnectionType): RedisCommandsClient[K, V] = {
2625
(codec, connectionType) match {
2726
case (RedisCodec(JStringCodec.UTF8), SingleNode) => redisSingleNodeClientWithStringValue.asInstanceOf[RedisCommandsClient[K, V]]
2827
case (RedisCodec(JStringCodec.UTF8), Cluster) => redisClusterClientWithStringValue.asInstanceOf[RedisCommandsClient[K, V]]
@@ -33,13 +32,13 @@ private class RedisCommandCachedClients(redisSingleNodeClientWithStringValue: Re
3332
}
3433
}
3534

36-
object RedisCommandCachedClients {
35+
object RedisCommandsCachedClients {
3736
def apply(singleNodeConfig: LettuceRedisClientConfig, clusterConfig: LettuceRedisClientConfig)(implicit ec: ExecutionContext): CachedClients = {
3837
val redisSingleNodeClientWithStringValue = LettuceRedisCommandsClient(singleNodeConfig, RedisCodec.Utf8WithValueAsStringCodec)
3938
val redisSingleNodeClientWithLongValue = LettuceRedisCommandsClient(singleNodeConfig, RedisCodec.Utf8WithValueAsLongCodec)
4039
val redisClusterClientWithStringValue = LettuceRedisCommandsClient(clusterConfig, RedisCodec.Utf8WithValueAsStringCodec)
4140
val redisClusterClientWithLongValue = LettuceRedisCommandsClient(clusterConfig, RedisCodec.Utf8WithValueAsLongCodec)
42-
new RedisCommandCachedClients(
41+
new RedisCommandsCachedClients(
4342
redisSingleNodeClientWithStringValue,
4443
redisSingleNodeClientWithLongValue,
4544
redisClusterClientWithStringValue,

0 commit comments

Comments
 (0)