Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val commonSettings: Seq[Setting[_]] = Seq(
organization := "net.debasishg",
version := "3.7",
scalaVersion := "2.11.12",
crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.7"),
crossScalaVersions := Seq("2.12.6", "2.11.12", "2.10.7", "2.13.0-M4"),

scalacOptions in Compile ++= Seq( "-unchecked", "-feature", "-language:postfixOps", "-deprecation" ),

Expand All @@ -20,10 +20,10 @@ lazy val coreSettings = commonSettings ++ Seq(
libraryDependencies ++= Seq(
"commons-pool" % "commons-pool" % "1.6",
"org.slf4j" % "slf4j-api" % "1.7.25",
"org.slf4j" % "slf4j-log4j12" % "1.7.25" % "provided",
"log4j" % "log4j" % "1.2.17" % "provided",
"junit" % "junit" % "4.12" % "test",
"org.scalatest" %% "scalatest" % "3.0.4" % "test"),
"org.slf4j" % "slf4j-log4j12" % "1.7.25" % "provided",
"log4j" % "log4j" % "1.2.17" % "provided",
"junit" % "junit" % "4.12" % "test",
"org.scalatest" %% "scalatest" % "3.0.6-SNAP2" % "test"),

parallelExecution in Test := false,
publishTo := version { (v: String) =>
Expand Down
9 changes: 5 additions & 4 deletions src/test/scala/com/redis/cluster/RedisClusterSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.scalatest.junit.JUnitRunner
import org.junit.runner.RunWith
import com.redis.RedisClient
import com.redis.serialization.Format

import collection.mutable.WrappedArray


Expand All @@ -18,7 +19,7 @@ class RedisClusterSpec extends FunSpec
with BeforeAndAfterAll {

val nodes = Array(ClusterNode("node1", "localhost", 6379), ClusterNode("node2", "localhost", 6380), ClusterNode("node3", "localhost", 6381))
val r = new RedisCluster(new WrappedArray.ofRef(nodes): _*) {
val r = new RedisCluster(new WrappedArray.ofRef(nodes).toSeq: _*) {
val keyTag = Some(RegexKeyTag)
}

Expand Down Expand Up @@ -104,7 +105,7 @@ class RedisClusterSpec extends FunSpec
}

it("replace node should not change hash ring order"){
val r = new RedisCluster(new WrappedArray.ofRef(nodes): _*) {
val r = new RedisCluster(new WrappedArray.ofRef(nodes).toSeq: _*) {
val keyTag = Some(RegexKeyTag)
}
r.set("testkey1", "testvalue2")
Expand All @@ -130,7 +131,7 @@ class RedisClusterSpec extends FunSpec
}

it("remove failure node should change hash ring order so that key on failure node should be served by other running nodes"){
val r = new RedisCluster(new WrappedArray.ofRef(nodes): _*) {
val r = new RedisCluster(new WrappedArray.ofRef(nodes).toSeq: _*) {
val keyTag = Some(RegexKeyTag)
}
r.set("testkey1", "testvalue2")
Expand All @@ -147,7 +148,7 @@ class RedisClusterSpec extends FunSpec
}

it("list nodes should return the running nodes but not configured nodes"){
val r = new RedisCluster(new WrappedArray.ofRef(nodes): _*) {
val r = new RedisCluster(new WrappedArray.ofRef(nodes).toSeq: _*) {
val keyTag = Some(RegexKeyTag)
}
r.listServers.toSet should equal (nodes.toSet)
Expand Down