akka-distributed-data compiler warnings #26088

This commit is contained in:
Arnout Engelen 2019-03-19 08:12:51 +01:00 committed by Johan Andrén
parent 4a04eddf7d
commit d7f12d3568
24 changed files with 138 additions and 72 deletions

View file

@ -17,7 +17,6 @@ import akka.cluster.ddata.Replicator._
import akka.remote.RARP
import scala.concurrent.Future
import akka.cluster.Cluster
object WriteAggregatorSpec {
@ -61,7 +60,7 @@ object WriteAggregatorSpec {
context.actorSelection(probes(address).path)
override def senderAddress(): Address =
probes.find { case (a, r) => r == sender() }.get._1
probes.find { case (_, r) => r == sender() }.get._1
}
def writeAckAdapterProps(replica: ActorRef): Props =
@ -126,7 +125,6 @@ class WriteAggregatorSpec extends AkkaSpec(s"""
* Create a tuple for each node with the WriteAckAdapter and the TestProbe
*/
def probes(): Map[Address, TestMock] = {
val probe = TestProbe()
nodes.toSeq.map(_ -> TestMock()).toMap
}
@ -160,7 +158,7 @@ class WriteAggregatorSpec extends AkkaSpec(s"""
val t = timeout / 5 - 50.milliseconds.dilated
import system.dispatcher
Future.sequence {
Seq(Future { testProbes(nodeC).expectNoMsg(t) }, Future { testProbes(nodeD).expectNoMsg(t) })
Seq(Future { testProbes(nodeC).expectNoMessage(t) }, Future { testProbes(nodeD).expectNoMessage(t) })
}.futureValue
testProbes(nodeC).expectMsgType[Write]
testProbes(nodeC).lastSender ! WriteAck
@ -210,9 +208,9 @@ class WriteAggregatorSpec extends AkkaSpec(s"""
}
"WriteAggregator with delta" must {
implicit val cluster = Cluster(system)
val fullState1 = ORSet.empty[String] + "a" + "b"
val fullState2 = fullState1.resetDelta + "c"
implicit val node = DistributedData(system).selfUniqueAddress
val fullState1 = ORSet.empty[String] :+ "a" :+ "b"
val fullState2 = fullState1.resetDelta :+ "c"
val delta = Delta(DataEnvelope(fullState2.delta.get), 2L, 2L)
"send deltas first" in {
@ -265,8 +263,8 @@ class WriteAggregatorSpec extends AkkaSpec(s"""
testProbes(nodeA).lastSender ! WriteAck
testProbes(nodeD).expectMsgType[Write]
testProbes(nodeD).lastSender ! WriteAck
testProbes(nodeB).expectNoMsg(100.millis)
testProbes(nodeC).expectNoMsg(100.millis)
testProbes(nodeB).expectNoMessage(100.millis)
testProbes(nodeC).expectNoMessage(100.millis)
expectMsg(UpdateSuccess(WriteAggregatorSpec.KeyB, None))
watch(aggr)
@ -320,7 +318,7 @@ class WriteAggregatorSpec extends AkkaSpec(s"""
probe.lastSender ! WriteAck
probe.expectMsgType[Write]
probe.lastSender ! WriteAck
expectNoMsg(200.millis)
expectNoMessage(200.millis)
// the local write
aggr ! UpdateSuccess(WriteAggregatorSpec.KeyA, None)