From 670e92c52122cb6fac831fc1ab4dcbb995fc3d93 Mon Sep 17 00:00:00 2001 From: masahitojp Date: Sun, 9 Sep 2018 03:13:14 +0900 Subject: [PATCH 1/2] Scala 2.13.0-M4 --- build.sbt | 10 +++++----- .../scala/com/redis/cluster/RedisClusterSpec.scala | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index 94f31b84..f31d384a 100644 --- a/build.sbt +++ b/build.sbt @@ -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" ), @@ -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) => diff --git a/src/test/scala/com/redis/cluster/RedisClusterSpec.scala b/src/test/scala/com/redis/cluster/RedisClusterSpec.scala index c14244bd..b244a241 100644 --- a/src/test/scala/com/redis/cluster/RedisClusterSpec.scala +++ b/src/test/scala/com/redis/cluster/RedisClusterSpec.scala @@ -8,7 +8,9 @@ import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith import com.redis.RedisClient import com.redis.serialization.Format + import collection.mutable.WrappedArray +import scala.collection.mutable @RunWith(classOf[JUnitRunner]) @@ -18,7 +20,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 mutable.WrappedArray.ofRef(nodes).toSeq: _*) { val keyTag = Some(RegexKeyTag) } @@ -104,7 +106,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") @@ -130,7 +132,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") @@ -147,7 +149,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) From a166e85976d59298135362f484c53a57a48e8992 Mon Sep 17 00:00:00 2001 From: masahitojp Date: Sun, 9 Sep 2018 03:23:51 +0900 Subject: [PATCH 2/2] Scala 2.13.0-M4 --- src/test/scala/com/redis/cluster/RedisClusterSpec.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/scala/com/redis/cluster/RedisClusterSpec.scala b/src/test/scala/com/redis/cluster/RedisClusterSpec.scala index b244a241..903ec677 100644 --- a/src/test/scala/com/redis/cluster/RedisClusterSpec.scala +++ b/src/test/scala/com/redis/cluster/RedisClusterSpec.scala @@ -10,7 +10,6 @@ import com.redis.RedisClient import com.redis.serialization.Format import collection.mutable.WrappedArray -import scala.collection.mutable @RunWith(classOf[JUnitRunner]) @@ -20,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 mutable.WrappedArray.ofRef(nodes).toSeq: _*) { + val r = new RedisCluster(new WrappedArray.ofRef(nodes).toSeq: _*) { val keyTag = Some(RegexKeyTag) }