=pro #3759 Changed to using non-deprecated ScalaTest Matchers
This commit is contained in:
parent
b8c7d7badd
commit
003609c9c5
246 changed files with 2822 additions and 2822 deletions
|
|
@ -5,7 +5,7 @@ import scala.concurrent.duration._
|
|||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.BeforeAndAfterAll
|
||||
import org.scalatest.WordSpecLike
|
||||
import org.scalatest.matchers.MustMatchers
|
||||
import org.scalatest.Matchers
|
||||
import akka.actor.PoisonPill
|
||||
import akka.actor.Props
|
||||
import akka.actor.RootActorPath
|
||||
|
|
@ -58,7 +58,7 @@ class StatsSampleSingleMasterSpecMultiJvmNode2 extends StatsSampleSingleMasterSp
|
|||
class StatsSampleSingleMasterSpecMultiJvmNode3 extends StatsSampleSingleMasterSpec
|
||||
|
||||
abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSingleMasterSpecConfig)
|
||||
with WordSpecLike with MustMatchers with BeforeAndAfterAll with ImplicitSender {
|
||||
with WordSpecLike with Matchers with BeforeAndAfterAll with ImplicitSender {
|
||||
|
||||
import StatsSampleSingleMasterSpecConfig._
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSing
|
|||
|
||||
Cluster(system) join firstAddress
|
||||
|
||||
receiveN(3).collect { case MemberUp(m) => m.address }.toSet must be(
|
||||
receiveN(3).collect { case MemberUp(m) => m.address }.toSet should be(
|
||||
Set(firstAddress, secondAddress, thirdAddress))
|
||||
|
||||
Cluster(system).unsubscribe(testActor)
|
||||
|
|
@ -100,8 +100,8 @@ abstract class StatsSampleSingleMasterSpec extends MultiNodeSpec(StatsSampleSing
|
|||
// service and worker nodes might not be up yet
|
||||
awaitAssert {
|
||||
facade ! StatsJob("this is the text that will be analyzed")
|
||||
expectMsgType[StatsResult](1.second).meanWordLength must be(
|
||||
3.875 plusOrMinus 0.001)
|
||||
expectMsgType[StatsResult](1.second).meanWordLength should be(
|
||||
3.875 +- 0.001)
|
||||
}
|
||||
|
||||
testConductor.enter("done")
|
||||
|
|
|
|||
|
|
@ -58,12 +58,12 @@ class StatsSampleSpecMultiJvmNode3 extends StatsSampleSpec
|
|||
//#abstract-test
|
||||
import org.scalatest.BeforeAndAfterAll
|
||||
import org.scalatest.WordSpecLike
|
||||
import org.scalatest.matchers.MustMatchers
|
||||
import org.scalatest.Matchers
|
||||
import akka.remote.testkit.MultiNodeSpec
|
||||
import akka.testkit.ImplicitSender
|
||||
|
||||
abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig)
|
||||
with WordSpecLike with MustMatchers with BeforeAndAfterAll
|
||||
with WordSpecLike with Matchers with BeforeAndAfterAll
|
||||
with ImplicitSender {
|
||||
|
||||
import StatsSampleSpecConfig._
|
||||
|
|
@ -96,7 +96,7 @@ abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig)
|
|||
system.actorOf(Props[StatsWorker], "statsWorker")
|
||||
system.actorOf(Props[StatsService], "statsService")
|
||||
|
||||
receiveN(3).collect { case MemberUp(m) => m.address }.toSet must be(
|
||||
receiveN(3).collect { case MemberUp(m) => m.address }.toSet should be(
|
||||
Set(firstAddress, secondAddress, thirdAddress))
|
||||
|
||||
Cluster(system).unsubscribe(testActor)
|
||||
|
|
@ -120,8 +120,8 @@ abstract class StatsSampleSpec extends MultiNodeSpec(StatsSampleSpecConfig)
|
|||
// first attempts might fail because worker actors not started yet
|
||||
awaitAssert {
|
||||
service ! StatsJob("this is the text that will be analyzed")
|
||||
expectMsgType[StatsResult](1.second).meanWordLength must be(
|
||||
3.875 plusOrMinus 0.001)
|
||||
expectMsgType[StatsResult](1.second).meanWordLength should be(
|
||||
3.875 +- 0.001)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.typesafe.config.ConfigFactory
|
|||
|
||||
import org.scalatest.BeforeAndAfterAll
|
||||
import org.scalatest.WordSpecLike
|
||||
import org.scalatest.matchers.MustMatchers
|
||||
import org.scalatest.Matchers
|
||||
|
||||
import akka.actor.Props
|
||||
import akka.cluster.Cluster
|
||||
|
|
@ -47,7 +47,7 @@ class TransformationSampleSpecMultiJvmNode4 extends TransformationSampleSpec
|
|||
class TransformationSampleSpecMultiJvmNode5 extends TransformationSampleSpec
|
||||
|
||||
abstract class TransformationSampleSpec extends MultiNodeSpec(TransformationSampleSpecConfig)
|
||||
with WordSpecLike with MustMatchers with BeforeAndAfterAll with ImplicitSender {
|
||||
with WordSpecLike with Matchers with BeforeAndAfterAll with ImplicitSender {
|
||||
|
||||
import TransformationSampleSpecConfig._
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ abstract class TransformationSampleSpec extends MultiNodeSpec(TransformationSamp
|
|||
// backends might not have registered initially
|
||||
awaitAssert {
|
||||
transformationFrontend ! TransformationJob("hello")
|
||||
expectMsgType[TransformationResult](1.second).text must be("HELLO")
|
||||
expectMsgType[TransformationResult](1.second).text should be("HELLO")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue