mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-04 04:30:21 +00:00
changes to quiet the warnings since the 2.13.2 update
This commit is contained in:
parent
222697aee8
commit
6f4eac9e43
56 changed files with 366 additions and 346 deletions
|
|
@ -4,21 +4,23 @@ package base
|
|||
import akka.actor.{Actor, ActorRef, ActorSystem, Props}
|
||||
import akka.testkit.{ImplicitSender, TestKit}
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}
|
||||
import org.scalatest.BeforeAndAfterAll
|
||||
import org.scalatest.matchers.should.Matchers
|
||||
import org.scalatest.wordspec.AnyWordSpecLike
|
||||
import org.specs2.specification.Scope
|
||||
|
||||
import scala.collection.mutable
|
||||
import scala.concurrent.duration.FiniteDuration
|
||||
|
||||
abstract class ActorTest(sys : ActorSystem = ActorSystem("system", ConfigFactory.parseMap(ActorTest.LoggingConfig)))
|
||||
extends TestKit(sys) with Scope with ImplicitSender with WordSpecLike with Matchers with BeforeAndAfterAll {
|
||||
override def afterAll {
|
||||
extends TestKit(sys) with Scope with ImplicitSender with AnyWordSpecLike with Matchers with BeforeAndAfterAll {
|
||||
override def afterAll : Unit = {
|
||||
TestKit.shutdownActorSystem(system)
|
||||
}
|
||||
}
|
||||
|
||||
object ActorTest {
|
||||
import scala.collection.JavaConverters._
|
||||
import scala.jdk.CollectionConverters._
|
||||
private val LoggingConfig = Map(
|
||||
"akka.loggers" -> List("akka.testkit.TestEventListener").asJava,
|
||||
"akka.loglevel" -> "OFF",
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class BuildingControl2Test extends ActorTest {
|
|||
|
||||
"Building Control" should {
|
||||
"convert and assert faction affinity on convert request" in {
|
||||
expectNoMsg(500 milliseconds)
|
||||
expectNoMessage(500 milliseconds)
|
||||
|
||||
assert(bldg.Faction == PlanetSideEmpire.TR)
|
||||
bldg.Actor ! FactionAffinity.ConvertFactionAffinity(PlanetSideEmpire.VS)
|
||||
|
|
@ -164,7 +164,7 @@ class BuildingControl3Test extends ActorTest {
|
|||
|
||||
"Building Control" should {
|
||||
"convert and assert faction affinity on convert request, and for each of its amenities" in {
|
||||
expectNoMsg(500 milliseconds)
|
||||
expectNoMessage(500 milliseconds)
|
||||
|
||||
assert(bldg.Faction == PlanetSideEmpire.TR)
|
||||
assert(bldg.Amenities.length == 2)
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ class DamageableEntityDamageTest extends ActorTest {
|
|||
Vector3(1,0,0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"DamageableEntity" should {
|
||||
"handle taking damage" in {
|
||||
|
|
@ -323,7 +323,7 @@ class DamageableEntityDestroyedTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableEntity" should {
|
||||
|
|
@ -387,7 +387,7 @@ class DamageableEntityNotDestroyTwice extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableEntity" should {
|
||||
|
|
@ -402,7 +402,7 @@ class DamageableEntityNotDestroyTwice extends ActorTest {
|
|||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
avatarProbe.receiveOne(500 milliseconds) //only one message
|
||||
avatarProbe.expectNoMsg(500 milliseconds) //only one message
|
||||
avatarProbe.expectNoMessage(500 milliseconds) //only one message
|
||||
activityProbe.receiveOne(500 milliseconds) //triggers activity hotspot, like it's not a killing blow
|
||||
assert(gen.Health < originalHealth)
|
||||
assert(gen.Destroyed)
|
||||
|
|
@ -448,7 +448,7 @@ class DamageableAmenityTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableAmenity" should {
|
||||
|
|
@ -532,7 +532,7 @@ class DamageableMountableDamageTest extends ActorTest {
|
|||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
mech.Seats(0).Occupant = player2 //seat the player
|
||||
player2.VehicleSeated = Some(mech.GUID) //seat the player
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableMountable" should {
|
||||
|
|
@ -612,7 +612,7 @@ class DamageableMountableDestroyTest extends ActorTest {
|
|||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
mech.Seats(0).Occupant = player2 //seat the player
|
||||
player2.VehicleSeated = Some(mech.GUID) //seat the player
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableMountable" should {
|
||||
|
|
@ -623,7 +623,7 @@ class DamageableMountableDestroyTest extends ActorTest {
|
|||
|
||||
mech.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg12 = avatarProbe.receiveN(2, 500 milliseconds)
|
||||
player1Probe.expectNoMsg(500 milliseconds)
|
||||
player1Probe.expectNoMessage(500 milliseconds)
|
||||
val msg3 = player2Probe.receiveOne(200 milliseconds)
|
||||
assert(
|
||||
msg12.head match {
|
||||
|
|
@ -689,7 +689,7 @@ class DamageableWeaponTurretDamageTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableWeaponTurret" should {
|
||||
|
|
@ -773,7 +773,7 @@ class DamageableWeaponTurretJammerTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableWeaponTurret" should {
|
||||
|
|
@ -867,7 +867,7 @@ class DamageableWeaponTurretDestructionTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageToB = resolvedB.damage_model.Calculate(resolvedB)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableWeaponTurret" should {
|
||||
|
|
@ -886,7 +886,7 @@ class DamageableWeaponTurretDestructionTest extends ActorTest {
|
|||
|
||||
turret.Actor ! Vitality.Damage(applyDamageToB) //destroy
|
||||
val msg12_4 = avatarProbe.receiveN(3, 500 milliseconds)
|
||||
player1Probe.expectNoMsg(500 milliseconds)
|
||||
player1Probe.expectNoMessage(500 milliseconds)
|
||||
val msg3 = player2Probe.receiveOne(200 milliseconds)
|
||||
val msg56 = vehicleProbe.receiveN(2, 200 milliseconds)
|
||||
assert(
|
||||
|
|
@ -977,7 +977,7 @@ class DamageableVehicleDamageTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableVehicle" should {
|
||||
|
|
@ -1091,7 +1091,7 @@ class DamageableVehicleDamageMountedTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"handle damage with mounted vehicles" in {
|
||||
|
|
@ -1217,7 +1217,7 @@ class DamageableVehicleJammeringMountedTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"handle jammering with mounted vehicles" in {
|
||||
|
|
@ -1228,10 +1228,10 @@ class DamageableVehicleJammeringMountedTest extends ActorTest {
|
|||
|
||||
lodestar.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg12 = vehicleProbe.receiveOne(500 milliseconds)
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
player2Probe.expectNoMsg(200 milliseconds)
|
||||
player3Probe.expectNoMsg(200 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
player2Probe.expectNoMessage(200 milliseconds)
|
||||
player3Probe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg12 match {
|
||||
case VehicleServiceMessage("test", VehicleAction.PlanetsideAttribute(Service.defaultPlayerGUID, PlanetSideGUID(4), 27, 1))=> true
|
||||
|
|
@ -1293,7 +1293,7 @@ class DamageableVehicleDestroyTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"DamageableVehicle" should {
|
||||
|
|
@ -1419,7 +1419,7 @@ class DamageableVehicleDestroyMountedTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageToB = resolvedB.damage_model.Calculate(resolvedB)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"handle jammering with mounted vehicles" in {
|
||||
|
|
@ -1435,10 +1435,10 @@ class DamageableVehicleDestroyMountedTest extends ActorTest {
|
|||
|
||||
lodestar.Actor ! Vitality.Damage(applyDamageToA)
|
||||
vehicleProbe.receiveOne(500 milliseconds) //flush jammered message
|
||||
avatarProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
player2Probe.expectNoMsg(200 milliseconds)
|
||||
player3Probe.expectNoMsg(200 milliseconds)
|
||||
avatarProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
player2Probe.expectNoMessage(200 milliseconds)
|
||||
player3Probe.expectNoMessage(200 milliseconds)
|
||||
assert(lodestar.Health > lodestar.Definition.DamageDestroysAt)
|
||||
assert(lodestar.Jammed)
|
||||
assert(!lodestar.Destroyed)
|
||||
|
|
@ -1449,13 +1449,13 @@ class DamageableVehicleDestroyMountedTest extends ActorTest {
|
|||
|
||||
lodestar.Actor ! Vitality.Damage(applyDamageToB)
|
||||
val msg_avatar = avatarProbe.receiveN(5, 500 milliseconds)
|
||||
avatarProbe.expectNoMsg(10 milliseconds)
|
||||
avatarProbe.expectNoMessage(10 milliseconds)
|
||||
val msg_player2 = player2Probe.receiveOne(200 milliseconds)
|
||||
player2Probe.expectNoMsg(10 milliseconds)
|
||||
player2Probe.expectNoMessage(10 milliseconds)
|
||||
val msg_player3 = player3Probe.receiveOne(200 milliseconds)
|
||||
player3Probe.expectNoMsg(10 milliseconds)
|
||||
player3Probe.expectNoMessage(10 milliseconds)
|
||||
val msg_vehicle = vehicleProbe.receiveN(2, 200 milliseconds)
|
||||
vehicleProbe.expectNoMsg(10 milliseconds)
|
||||
vehicleProbe.expectNoMessage(10 milliseconds)
|
||||
assert(
|
||||
msg_avatar.exists( {
|
||||
case AvatarServiceMessage("test", AvatarAction.PlanetsideAttributeToAll(PlanetSideGUID(4), 0, _)) => true
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ class ExplosiveDeployableJammerTest extends ActorTest {
|
|||
j_mine.Actor ! Vitality.Damage(applyDamageToJ)
|
||||
val msg_local = localProbe.receiveN(4, 200 milliseconds)
|
||||
val msg_avatar = avatarProbe.receiveOne(200 milliseconds)
|
||||
activityProbe.expectNoMsg(200 milliseconds)
|
||||
activityProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_local.head match {
|
||||
case LocalServiceMessage("TestCharacter2", LocalAction.AlertDestroyDeployable(PlanetSideGUID(0), target)) => target eq j_mine
|
||||
|
|
@ -532,7 +532,7 @@ class ExplosiveDeployableDestructionTest extends ActorTest {
|
|||
h_mine.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_local = localProbe.receiveN(5, 200 milliseconds)
|
||||
val msg_avatar = avatarProbe.receiveOne(200 milliseconds)
|
||||
activityProbe.expectNoMsg(200 milliseconds)
|
||||
activityProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_local.head match {
|
||||
case LocalServiceMessage("TestCharacter2", LocalAction.AlertDestroyDeployable(PlanetSideGUID(0), target)) => target eq h_mine
|
||||
|
|
@ -595,7 +595,7 @@ class TurretControlInitializeTest extends ActorTest {
|
|||
assert(obj.Actor == ActorRef.noSender)
|
||||
val init = system.actorOf(Props(classOf[DeployableTest.TurretInitializer], obj), "init_turret_test")
|
||||
init ! "initialize"
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
assert(obj.Actor != ActorRef.noSender)
|
||||
}
|
||||
}
|
||||
|
|
@ -608,11 +608,11 @@ class TurretControlUninitializeTest extends ActorTest {
|
|||
val init = system.actorOf(Props(classOf[DeployableTest.TurretInitializer], obj), "init_turret_test")
|
||||
obj.GUID = PlanetSideGUID(1)
|
||||
init ! "initialize"
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
assert(obj.Actor != ActorRef.noSender)
|
||||
|
||||
init ! "uninitialize"
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
assert(obj.Actor == ActorRef.noSender)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class GeneratorControlDamageTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -96,7 +96,7 @@ class GeneratorControlDamageTest extends ActorTest {
|
|||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar = avatarProbe.receiveN(2, 500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar.head match {
|
||||
case AvatarServiceMessage("test", AvatarAction.PlanetsideAttributeToAll(PlanetSideGUID(2), 0, _)) => true
|
||||
|
|
@ -158,7 +158,7 @@ class GeneratorControlCriticalTest extends ActorTest {
|
|||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
val halfHealth = gen.Definition.MaxHealth / 2
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -238,7 +238,7 @@ class GeneratorControlDestroyedTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -250,7 +250,7 @@ class GeneratorControlDestroyedTest extends ActorTest {
|
|||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar1 = avatarProbe.receiveOne(500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar1 match {
|
||||
case AvatarServiceMessage("TestCharacter1", AvatarAction.GenericObjectAction(_, PlanetSideGUID(1), 16)) => true
|
||||
|
|
@ -261,8 +261,8 @@ class GeneratorControlDestroyedTest extends ActorTest {
|
|||
assert(!gen.Destroyed)
|
||||
assert(gen.Condition == PlanetSideGeneratorState.Normal)
|
||||
|
||||
avatarProbe.expectNoMsg(9 seconds)
|
||||
buildingProbe.expectNoMsg(50 milliseconds) //no prior messages
|
||||
avatarProbe.expectNoMessage(9 seconds)
|
||||
buildingProbe.expectNoMessage(50 milliseconds) //no prior messages
|
||||
val msg_avatar2 = avatarProbe.receiveN(3, 1000 milliseconds) //see DamageableEntity test file
|
||||
val msg_building = buildingProbe.receiveOne(200 milliseconds)
|
||||
assert(
|
||||
|
|
@ -356,7 +356,7 @@ class GeneratorControlKillsTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -368,9 +368,9 @@ class GeneratorControlKillsTest extends ActorTest {
|
|||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar1 = avatarProbe.receiveN(2, 500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
player2Probe.expectNoMsg(200 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
player2Probe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar1.head match {
|
||||
case AvatarServiceMessage("TestCharacter1", AvatarAction.GenericObjectAction(_, PlanetSideGUID(1), 16)) => true
|
||||
|
|
@ -390,7 +390,7 @@ class GeneratorControlKillsTest extends ActorTest {
|
|||
val msg_building = buildingProbe.receiveOne(10500 milliseconds)
|
||||
val msg_avatar2 = avatarProbe.receiveN(3, 200 milliseconds)
|
||||
val msg_player1 = player1Probe.receiveOne(100 milliseconds)
|
||||
player2Probe.expectNoMsg(200 milliseconds)
|
||||
player2Probe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_building match {
|
||||
case Building.AmenityStateChange(o) => o eq gen
|
||||
|
|
@ -465,7 +465,7 @@ class GeneratorControlNotDestroyTwice extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -480,9 +480,9 @@ class GeneratorControlNotDestroyTwice extends ActorTest {
|
|||
assert(originalHealth > gen.Definition.DamageDestroysAt)
|
||||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
activityProbe.receiveOne(500 milliseconds)
|
||||
buildingProbe.expectNoMsg(1000 milliseconds)
|
||||
buildingProbe.expectNoMessage(1000 milliseconds)
|
||||
assert(gen.Health < originalHealth)
|
||||
assert(gen.Destroyed)
|
||||
assert(originalHealth < gen.Definition.DefaultHealth)
|
||||
|
|
@ -494,9 +494,9 @@ class GeneratorControlNotDestroyTwice extends ActorTest {
|
|||
assert(gen.Health == 1)
|
||||
assert(gen.Destroyed)
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
activityProbe.receiveOne(500 milliseconds) //activity alert occurs because this was not a kill shot
|
||||
buildingProbe.expectNoMsg(1000 milliseconds)
|
||||
buildingProbe.expectNoMessage(1000 milliseconds)
|
||||
assert(gen.Health == 0)
|
||||
assert(gen.Destroyed)
|
||||
}
|
||||
|
|
@ -546,7 +546,7 @@ class GeneratorControlNotDamageIfExplodingTest extends ActorTest {
|
|||
Vector3(1, 0, 0)
|
||||
)
|
||||
val applyDamageTo = resolved.damage_model.Calculate(resolved)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -558,8 +558,8 @@ class GeneratorControlNotDamageIfExplodingTest extends ActorTest {
|
|||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar = avatarProbe.receiveOne(500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar match {
|
||||
case AvatarServiceMessage("TestCharacter1", AvatarAction.GenericObjectAction(_, PlanetSideGUID(1), 16)) => true
|
||||
|
|
@ -573,15 +573,15 @@ class GeneratorControlNotDamageIfExplodingTest extends ActorTest {
|
|||
|
||||
//once
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
assert(gen.Health == 1)
|
||||
//twice
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
assert(gen.Health == 1)
|
||||
}
|
||||
}
|
||||
|
|
@ -634,7 +634,7 @@ class GeneratorControlNotRepairIfExplodingTest extends ActorTest {
|
|||
val tool = Tool(GlobalDefinitions.nano_dispenser) //4 & 5
|
||||
guid.register(tool, 4)
|
||||
guid.register(tool.AmmoSlot.Box, 5)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
@ -646,8 +646,8 @@ class GeneratorControlNotRepairIfExplodingTest extends ActorTest {
|
|||
|
||||
gen.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar1 = avatarProbe.receiveOne(500 milliseconds)
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar1 match {
|
||||
case AvatarServiceMessage("TestCharacter1", AvatarAction.GenericObjectAction(_, PlanetSideGUID(1), 16)) => true
|
||||
|
|
@ -661,15 +661,15 @@ class GeneratorControlNotRepairIfExplodingTest extends ActorTest {
|
|||
|
||||
//once
|
||||
gen.Actor ! CommonMessages.Use(player1, Some(tool)) //repair?
|
||||
avatarProbe.expectNoMsg(1000 milliseconds) //no messages
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
avatarProbe.expectNoMessage(1000 milliseconds) //no messages
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
assert(gen.Health == 1)
|
||||
//twice
|
||||
gen.Actor ! CommonMessages.Use(player1, Some(tool)) //repair?
|
||||
avatarProbe.expectNoMsg(1000 milliseconds) //no messages
|
||||
buildingProbe.expectNoMsg(200 milliseconds)
|
||||
player1Probe.expectNoMsg(200 milliseconds)
|
||||
avatarProbe.expectNoMessage(1000 milliseconds) //no messages
|
||||
buildingProbe.expectNoMessage(200 milliseconds)
|
||||
player1Probe.expectNoMessage(200 milliseconds)
|
||||
assert(gen.Health == 1)
|
||||
}
|
||||
}
|
||||
|
|
@ -711,7 +711,7 @@ class GeneratorControlRepairPastRestorePoint extends ActorTest {
|
|||
guid.register(player1, 3)
|
||||
guid.register(tool, 4)
|
||||
guid.register(tool.AmmoSlot.Box, 5)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"GeneratorControl" should {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class PlayerControlHealTest extends ActorTest {
|
|||
|
||||
player1.Position = Vector3(10,0,0) //moved more than 5m away
|
||||
player2.Actor ! CommonMessages.Use(player1, Some(tool))
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
assert(raisedHealth == player2.Health)
|
||||
}
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ class PlayerControlRepairTest extends ActorTest {
|
|||
val fixedArmor = player2.Armor
|
||||
player1.Position = Vector3(10,0,0) //moved more than 5m away
|
||||
player2.Actor ! CommonMessages.Use(player1, Some(tool))
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
assert(fixedArmor == player2.Armor)
|
||||
}
|
||||
}
|
||||
|
|
@ -329,7 +329,7 @@ class PlayerControlDamageTest extends ActorTest {
|
|||
guid.register(player2, 2)
|
||||
guid.register(tool, 3)
|
||||
guid.register(tool.AmmoSlot.Box, 4)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
"PlayerControl" should {
|
||||
"handle damage" in {
|
||||
assert(player2.Health == player2.Definition.DefaultHealth)
|
||||
|
|
@ -406,7 +406,7 @@ class PlayerControlDeathStandingTest extends ActorTest {
|
|||
guid.register(player2, 2)
|
||||
guid.register(tool, 3)
|
||||
guid.register(tool.AmmoSlot.Box, 4)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"PlayerControl" should {
|
||||
"handle death" in {
|
||||
|
|
@ -421,7 +421,7 @@ class PlayerControlDeathStandingTest extends ActorTest {
|
|||
|
||||
player2.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar = avatarProbe.receiveN(8, 500 milliseconds)
|
||||
activityProbe.expectNoMsg(200 milliseconds)
|
||||
activityProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar.head match {
|
||||
case AvatarServiceMessage("test", AvatarAction.PlanetsideAttributeToAll(PlanetSideGUID(2), 4, _)) => true
|
||||
|
|
@ -518,7 +518,7 @@ class PlayerControlDeathSeatedTest extends ActorTest {
|
|||
guid.register(tool, 3)
|
||||
guid.register(tool.AmmoSlot.Box, 4)
|
||||
guid.register(vehicle, 5)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"PlayerControl" should {
|
||||
"handle death when seated (in something)" in {
|
||||
|
|
@ -531,7 +531,7 @@ class PlayerControlDeathSeatedTest extends ActorTest {
|
|||
|
||||
player2.Actor ! Vitality.Damage(applyDamageTo)
|
||||
val msg_avatar = avatarProbe.receiveN(9, 500 milliseconds)
|
||||
activityProbe.expectNoMsg(200 milliseconds)
|
||||
activityProbe.expectNoMessage(200 milliseconds)
|
||||
assert(
|
||||
msg_avatar.head match {
|
||||
case AvatarServiceMessage("TestCharacter2", AvatarAction.Killed(PlanetSideGUID(2))) => true
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class RepairableEntityRepairTest extends ActorTest {
|
|||
val tool = Tool(GlobalDefinitions.nano_dispenser) //4 & 5
|
||||
guid.register(tool, 4)
|
||||
guid.register(tool.AmmoSlot.Box, 5)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"RepairableEntity" should {
|
||||
|
|
@ -115,14 +115,14 @@ class RepairableEntityNotRepairTest extends ActorTest {
|
|||
val tool = Tool(GlobalDefinitions.nano_dispenser) //4 & 5
|
||||
guid.register(tool, 4)
|
||||
guid.register(tool.AmmoSlot.Box, 5)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"RepairableEntity" should {
|
||||
"not repair if health is already full" in {
|
||||
assert(gen.Health == gen.Definition.DefaultHealth) //ideal
|
||||
gen.Actor ! CommonMessages.Use(player1, Some(tool)) //repair?
|
||||
avatarProbe.expectNoMsg(1000 milliseconds) //no messages
|
||||
avatarProbe.expectNoMessage(1000 milliseconds) //no messages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ class RepairableAmenityTest extends ActorTest {
|
|||
val tool = Tool(GlobalDefinitions.nano_dispenser) //4 & 5
|
||||
guid.register(tool, 4)
|
||||
guid.register(tool.AmmoSlot.Box, 5)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
//we're not testing that the math is correct
|
||||
|
||||
"RepairableAmenity" should {
|
||||
|
|
@ -390,7 +390,7 @@ class RepairableVehicleRestoration extends ActorTest {
|
|||
assert(atv.Destroyed)
|
||||
|
||||
atv.Actor ! CommonMessages.Use(player1, Some(tool))
|
||||
avatarProbe.expectNoMsg(500 milliseconds)
|
||||
avatarProbe.expectNoMessage(500 milliseconds)
|
||||
assert(atv.Health == 0) //set to zero explicitly
|
||||
assert(atv.Destroyed)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ class ResourceSiloControlStartupTest extends ActorTest {
|
|||
|
||||
"Resource silo" should {
|
||||
"startup properly" in {
|
||||
expectNoMsg(500 milliseconds)
|
||||
expectNoMessage(500 milliseconds)
|
||||
system.actorOf(Props(classOf[ResourceSiloControl], obj), "test-silo")
|
||||
expectNoMsg(1 seconds)
|
||||
expectNoMessage(1 seconds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -99,16 +99,16 @@ class ResourceSiloControlUseTest extends ActorTest {
|
|||
guid.register(obj, 2)
|
||||
guid.register(player, 3)
|
||||
guid.register(vehicle, 4)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Transport ! Zone.Vehicle.Spawn(vehicle)
|
||||
vehicle.Seats(0).Occupant = player
|
||||
player.VehicleSeated = vehicle.GUID
|
||||
val msg = UseItemMessage(PlanetSideGUID(1), PlanetSideGUID(0), PlanetSideGUID(2), 0L, false, Vector3.Zero,Vector3.Zero,0,0,0,0L) //faked
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"Resource silo" should {
|
||||
"respond when being used" in {
|
||||
expectNoMsg(1 seconds)
|
||||
expectNoMessage(1 seconds)
|
||||
obj.Actor ! ResourceSilo.Use(ResourceSiloTest.player, msg)
|
||||
|
||||
val reply = receiveOne(500 milliseconds)
|
||||
|
|
@ -299,9 +299,9 @@ class ResourceSiloControlNoUpdateTest extends ActorTest {
|
|||
assert(!obj.LowNtuWarningOn)
|
||||
obj.Actor ! ResourceSilo.UpdateChargeLevel(50)
|
||||
|
||||
expectNoMsg(500 milliseconds)
|
||||
zoneEvents.expectNoMsg(500 milliseconds)
|
||||
buildingEvents.expectNoMsg(500 milliseconds)
|
||||
expectNoMessage(500 milliseconds)
|
||||
zoneEvents.expectNoMessage(500 milliseconds)
|
||||
buildingEvents.expectNoMessage(500 milliseconds)
|
||||
assert(obj.ChargeLevel == 299 || obj.ChargeLevel == 300) // Just in case the capacitor level drops while waiting for the message check 299 & 300
|
||||
assert(obj.CapacitorDisplay == 3)
|
||||
assert(!obj.LowNtuWarningOn)
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ class VehicleControlPrepareForDeletionTest extends ActorTest {
|
|||
}
|
||||
|
||||
vehicle.GUID = PlanetSideGUID(1)
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"VehicleControl" should {
|
||||
"submit for unregistering when marked for deconstruction" in {
|
||||
|
|
@ -369,7 +369,7 @@ class VehicleControlPrepareForDeletionPassengerTest extends ActorTest {
|
|||
player1.GUID = PlanetSideGUID(2)
|
||||
vehicle.Seats(1).Occupant = player1 //passenger seat
|
||||
player1.VehicleSeated = vehicle.GUID
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"VehicleControl" should {
|
||||
"kick all players when marked for deconstruction" in {
|
||||
|
|
@ -431,7 +431,7 @@ class VehicleControlPrepareForDeletionMountedInTest extends FreedContextActorTes
|
|||
val vehicleProbe = new TestProbe(system)
|
||||
zone.VehicleEvents = vehicleProbe.ref
|
||||
zone.Transport ! Zone.Vehicle.Spawn(lodestar) //can not fake this
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"VehicleControl" should {
|
||||
"if mounted as cargo, self-eject when marked for deconstruction" in {
|
||||
|
|
@ -534,7 +534,7 @@ class VehicleControlPrepareForDeletionMountedCargoTest extends FreedContextActor
|
|||
val vehicleProbe = new TestProbe(system)
|
||||
zone.VehicleEvents = vehicleProbe.ref
|
||||
zone.Transport ! Zone.Vehicle.Spawn(lodestar) //can not fake this
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"VehicleControl" should {
|
||||
"if with mounted cargo, eject it when marked for deconstruction" in {
|
||||
|
|
@ -865,7 +865,7 @@ class VehicleControlShieldsNotChargingVehicleDeadTest extends ActorTest {
|
|||
assert(!vehicle.History.exists({p => p.isInstanceOf[VehicleShieldCharge]}))
|
||||
vehicle.Actor.tell(Vehicle.ChargeShields(15), probe.ref)
|
||||
|
||||
probe.expectNoMsg(1 seconds)
|
||||
probe.expectNoMessage(1 seconds)
|
||||
assert(vehicle.Shields == 0)
|
||||
assert(!vehicle.History.exists({p => p.isInstanceOf[VehicleShieldCharge]}))
|
||||
}
|
||||
|
|
@ -887,7 +887,7 @@ class VehicleControlShieldsNotChargingVehicleShieldsFullTest extends ActorTest {
|
|||
assert(!vehicle.History.exists({p => p.isInstanceOf[VehicleShieldCharge]}))
|
||||
vehicle.Actor ! Vehicle.ChargeShields(15)
|
||||
|
||||
probe.expectNoMsg(1 seconds)
|
||||
probe.expectNoMessage(1 seconds)
|
||||
assert(!vehicle.History.exists({p => p.isInstanceOf[VehicleShieldCharge]}))
|
||||
}
|
||||
}
|
||||
|
|
@ -914,7 +914,7 @@ class VehicleControlShieldsNotChargingTooEarlyTest extends ActorTest {
|
|||
assert(vehicle.Shields == 15)
|
||||
|
||||
vehicle.Actor ! Vehicle.ChargeShields(15)
|
||||
probe.expectNoMsg(200 milliseconds)
|
||||
probe.expectNoMessage(200 milliseconds)
|
||||
assert(vehicle.Shields == 15)
|
||||
}
|
||||
}
|
||||
|
|
@ -944,7 +944,7 @@ class VehicleControlShieldsNotChargingTooEarlyTest extends ActorTest {
|
|||
// assert(vehicle.Shields == 0)
|
||||
// vehicle.Actor.tell(Vehicle.ChargeShields(15), probe.ref)
|
||||
//
|
||||
// probe.expectNoMsg(200 milliseconds)
|
||||
// probe.expectNoMessage(200 milliseconds)
|
||||
// assert(vehicle.Shields == 0)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class ZoneActorTest extends ActorTest {
|
|||
"have an Actor" in {
|
||||
val zone = new Zone("test", new ZoneMap("map6"), 1) { override def SetupNumberPools() = { } }
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), "test-actor")
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Actor != ActorRef.noSender)
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ class ZoneActorTest extends ActorTest {
|
|||
zone.GUID(new NumberPoolHub(new LimitedNumberSource(40150)))
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), "test-add-pool-actor-init")
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(Duration.create(500, "ms"))
|
||||
expectNoMessage(Duration.create(500, "ms"))
|
||||
|
||||
assert( !zone.AddPool("test1", 1 to 2) )
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ class ZoneActorTest extends ActorTest {
|
|||
zone.AddPool("test", 1 to 2)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), "test-remove-pool-actor-init")
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(Duration.create(300, "ms"))
|
||||
expectNoMessage(Duration.create(300, "ms"))
|
||||
|
||||
assert( !zone.RemovePool("test") )
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ class ZoneActorTest extends ActorTest {
|
|||
val zone = new Zone("test", map6, 1) { override def SetupNumberPools() = { } }
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), "test-init")
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(Duration.create(1, "seconds"))
|
||||
expectNoMessage(Duration.create(1, "seconds"))
|
||||
|
||||
val groups = zone.SpawnGroups()
|
||||
assert(groups.size == 2)
|
||||
|
|
@ -232,7 +232,7 @@ class ZoneActorTest extends ActorTest {
|
|||
val zone = new Zone("test", map6, 1) { override def SetupNumberPools() = { } }
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), "test-spawn")
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(Duration.create(1, "seconds"))
|
||||
expectNoMessage(Duration.create(1, "seconds"))
|
||||
val player = Player(Avatar("Chord", PlanetSideEmpire.NEUTRAL, CharacterGender.Male, 0, CharacterVoice.Voice5))
|
||||
|
||||
val bldg1 = zone.Building(1).get
|
||||
|
|
@ -263,7 +263,7 @@ class ZoneActorTest extends ActorTest {
|
|||
val zone = new Zone("test", map6, 1) { override def SetupNumberPools() = { } }
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), "test-no-spawn")
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(Duration.create(300, "ms"))
|
||||
expectNoMessage(Duration.create(300, "ms"))
|
||||
val player = Player(Avatar("Chord", PlanetSideEmpire.NEUTRAL, CharacterGender.Male, 0, CharacterVoice.Voice5))
|
||||
|
||||
zone.Actor ! Zone.Lattice.RequestSpawnPoint(1, player, 7)
|
||||
|
|
@ -282,12 +282,12 @@ class ZonePopulationTest extends ActorTest {
|
|||
val avatar = Avatar("Chord", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Voice5)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
assert(zone.Players.isEmpty)
|
||||
assert(zone.LivePlayers.isEmpty)
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
assert(zone.LivePlayers.isEmpty)
|
||||
|
|
@ -300,12 +300,12 @@ class ZonePopulationTest extends ActorTest {
|
|||
zone.Actor ! Zone.Init()
|
||||
receiveOne(Duration.create(200, "ms")) //consume
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
zone.Population ! Zone.Population.Leave(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Players.isEmpty)
|
||||
}
|
||||
|
||||
|
|
@ -315,15 +315,15 @@ class ZonePopulationTest extends ActorTest {
|
|||
val player = Player(avatar)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
assert(zone.LivePlayers.isEmpty)
|
||||
zone.Population ! Zone.Population.Spawn(avatar, player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
assert(zone.LivePlayers.size == 1)
|
||||
|
|
@ -336,18 +336,18 @@ class ZonePopulationTest extends ActorTest {
|
|||
val player = Player(avatar)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
zone.Population ! Zone.Population.Spawn(avatar, player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
assert(zone.LivePlayers.size == 1)
|
||||
assert(zone.LivePlayers.head == player)
|
||||
zone.Population ! Zone.Population.Release(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
assert(zone.LivePlayers.isEmpty)
|
||||
|
|
@ -360,11 +360,11 @@ class ZonePopulationTest extends ActorTest {
|
|||
player.GUID = PlanetSideGUID(1)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
zone.Population ! Zone.Population.Spawn(avatar, player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
|
|
@ -386,11 +386,11 @@ class ZonePopulationTest extends ActorTest {
|
|||
val player2 = Player(avatar)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
zone.Population ! Zone.Population.Spawn(avatar, player1)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
|
|
@ -412,7 +412,7 @@ class ZonePopulationTest extends ActorTest {
|
|||
val player = Player(avatar)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
assert(zone.Players.isEmpty)
|
||||
assert(zone.LivePlayers.isEmpty)
|
||||
|
|
@ -430,9 +430,9 @@ class ZonePopulationTest extends ActorTest {
|
|||
val avatar = Avatar("Chord", PlanetSideEmpire.TR, CharacterGender.Male, 0, CharacterVoice.Voice5)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Population.Join(avatar)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Players.size == 1)
|
||||
assert(zone.Players.head == avatar)
|
||||
|
|
@ -453,11 +453,11 @@ class ZonePopulationTest extends ActorTest {
|
|||
player.Release
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
assert(zone.Corpses.isEmpty)
|
||||
zone.Population ! Zone.Corpse.Add(player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Corpses.size == 1)
|
||||
assert(zone.Corpses.head == player)
|
||||
}
|
||||
|
|
@ -468,14 +468,14 @@ class ZonePopulationTest extends ActorTest {
|
|||
player.Release
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Corpse.Add(player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Corpses.size == 1)
|
||||
assert(zone.Corpses.head == player)
|
||||
zone.Population ! Zone.Corpse.Remove(player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Corpses.isEmpty)
|
||||
}
|
||||
|
||||
|
|
@ -489,18 +489,18 @@ class ZonePopulationTest extends ActorTest {
|
|||
player3.Release
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
zone.Population ! Zone.Corpse.Add(player1)
|
||||
zone.Population ! Zone.Corpse.Add(player2)
|
||||
zone.Population ! Zone.Corpse.Add(player3)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
|
||||
assert(zone.Corpses.size == 3)
|
||||
assert(zone.Corpses.head == player1)
|
||||
assert(zone.Corpses(1) == player2)
|
||||
assert(zone.Corpses(2) == player3)
|
||||
zone.Population ! Zone.Corpse.Remove(player2)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Corpses.size == 2)
|
||||
assert(zone.Corpses.head == player1)
|
||||
assert(zone.Corpses(1) == player3)
|
||||
|
|
@ -512,11 +512,11 @@ class ZonePopulationTest extends ActorTest {
|
|||
//player.Release !!important
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
assert(zone.Corpses.isEmpty)
|
||||
zone.Population ! Zone.Corpse.Add(player)
|
||||
expectNoMsg(Duration.create(100, "ms"))
|
||||
expectNoMessage(Duration.create(100, "ms"))
|
||||
assert(zone.Corpses.isEmpty)
|
||||
}
|
||||
}
|
||||
|
|
@ -530,7 +530,7 @@ class ZoneGroundDropItemTest extends ActorTest {
|
|||
zone.GUID(hub)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"DropItem" should {
|
||||
"drop item on ground" in {
|
||||
|
|
@ -556,7 +556,7 @@ class ZoneGroundCanNotDropItem1Test extends ActorTest {
|
|||
zone.GUID(hub)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"DropItem" should {
|
||||
"not drop an item that is not registered" in {
|
||||
|
|
@ -582,7 +582,7 @@ class ZoneGroundCanNotDropItem2Test extends ActorTest {
|
|||
//zone.GUID(hub) //!important
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"DropItem" should {
|
||||
"not drop an item that is not registered to the zone" in {
|
||||
|
|
@ -608,7 +608,7 @@ class ZoneGroundCanNotDropItem3Test extends ActorTest {
|
|||
zone.GUID(hub) //!important
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"DropItem" should {
|
||||
"not drop an item that has already been dropped" in {
|
||||
|
|
@ -642,7 +642,7 @@ class ZoneGroundPickupItemTest extends ActorTest {
|
|||
zone.GUID(hub)
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"PickupItem" should {
|
||||
"pickup an item from ground" in {
|
||||
|
|
@ -671,7 +671,7 @@ class ZoneGroundCanNotPickupItemTest extends ActorTest {
|
|||
zone.GUID(hub) //still registered to this zone
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"PickupItem" should {
|
||||
"not pickup an item if it can not be found" in {
|
||||
|
|
@ -696,7 +696,7 @@ class ZoneGroundRemoveItemTest extends ActorTest {
|
|||
zone.GUID(hub) //still registered to this zone
|
||||
zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), ZoneTest.TestName)
|
||||
zone.Actor ! Zone.Init()
|
||||
expectNoMsg(200 milliseconds)
|
||||
expectNoMessage(200 milliseconds)
|
||||
|
||||
"RemoveItem" should {
|
||||
"remove an item from the ground without callback (even if the item is not found)" in {
|
||||
|
|
@ -707,11 +707,11 @@ class ZoneGroundRemoveItemTest extends ActorTest {
|
|||
assert(zone.EquipmentOnGround.contains(item)) //dropped
|
||||
|
||||
zone.Ground ! Zone.Ground.RemoveItem(item.GUID)
|
||||
expectNoMsg(500 milliseconds)
|
||||
expectNoMessage(500 milliseconds)
|
||||
assert(!zone.EquipmentOnGround.contains(item))
|
||||
|
||||
zone.Ground ! Zone.Ground.RemoveItem(item.GUID) //repeat
|
||||
expectNoMsg(500 milliseconds)
|
||||
expectNoMessage(500 milliseconds)
|
||||
assert(!zone.EquipmentOnGround.contains(item))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class UniqueNumberSystemTest9 extends ActorTest() {
|
|||
guid.AddPool("pool3", (5001 to 6000).toList).Selector = new RandomSelector
|
||||
val uns = system.actorOf(Props(classOf[UniqueNumberSystem], guid, UniqueNumberSystemTest.AllocateNumberPoolActors(guid)), "uns")
|
||||
val excp = new Exception("EXCEPTION MESSAGE")
|
||||
expectNoMsg(Duration.create(200, "ms"))
|
||||
expectNoMessage(Duration.create(200, "ms"))
|
||||
|
||||
//GiveNumber
|
||||
uns ! NumberPoolActor.GiveNumber(1001, Some("test")) //no task associated with id="test"
|
||||
|
|
@ -319,7 +319,7 @@ class UniqueNumberSystemTestA extends ActorTest {
|
|||
val guid : NumberPoolHub = new NumberPoolHub(src)
|
||||
guid.AddPool("pool1", (0 until 10).toList).Selector = new RandomSelector
|
||||
val uns = system.actorOf(Props(classOf[UniqueNumberSystem], guid, UniqueNumberSystemTest.AllocateNumberPoolActors(guid)), "uns")
|
||||
expectNoMsg(Duration.create(200, "ms"))
|
||||
expectNoMessage(Duration.create(200, "ms"))
|
||||
|
||||
assert(src.CountUsed == 0)
|
||||
(0 to 4).foreach(i => { assert(guid.register(new EntityTestClass(), i).isSuccess) })
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class ProximityTerminalControlStartTest extends ActorTest {
|
|||
avatar.GUID = PlanetSideGUID(1)
|
||||
terminal.GUID = PlanetSideGUID(2)
|
||||
terminal.Actor ! Service.Startup()
|
||||
expectNoMsg(500 milliseconds) //spacer
|
||||
expectNoMessage(500 milliseconds) //spacer
|
||||
val probe1 = new TestProbe(system, "local-events")
|
||||
val probe2 = new TestProbe(system, "target-callback")
|
||||
zone.LocalEvents = probe1.ref
|
||||
|
|
@ -160,7 +160,7 @@ class ProximityTerminalControlTwoUsersTest extends ActorTest {
|
|||
avatar2.GUID = PlanetSideGUID(2)
|
||||
terminal.GUID = PlanetSideGUID(3)
|
||||
terminal.Actor ! Service.Startup()
|
||||
expectNoMsg(500 milliseconds) //spacer
|
||||
expectNoMessage(500 milliseconds) //spacer
|
||||
val probe1 = new TestProbe(system, "local-events")
|
||||
val probe2 = new TestProbe(system, "target-callback-1")
|
||||
val probe3 = new TestProbe(system, "target-callback-2")
|
||||
|
|
@ -175,7 +175,7 @@ class ProximityTerminalControlTwoUsersTest extends ActorTest {
|
|||
probe2.expectMsgClass(1 second, classOf[ProximityUnit.Action])
|
||||
|
||||
terminal.Actor.tell(CommonMessages.Use(avatar2, Some(avatar2)), probe3.ref)
|
||||
probe1.expectNoMsg(1 second)
|
||||
probe1.expectNoMessage(1 second)
|
||||
probe2.expectMsgClass(1 second, classOf[ProximityUnit.Action])
|
||||
probe3.expectMsgClass(1 second, classOf[ProximityUnit.Action])
|
||||
assert(terminal.NumberUsers == 2)
|
||||
|
|
@ -206,7 +206,7 @@ class ProximityTerminalControlStopTest extends ActorTest {
|
|||
avatar.GUID = PlanetSideGUID(1)
|
||||
terminal.GUID = PlanetSideGUID(2)
|
||||
terminal.Actor ! Service.Startup()
|
||||
expectNoMsg(500 milliseconds) //spacer
|
||||
expectNoMessage(500 milliseconds) //spacer
|
||||
val probe1 = new TestProbe(system, "local-events")
|
||||
val probe2 = new TestProbe(system, "target-callback-1")
|
||||
zone.LocalEvents = probe1.ref
|
||||
|
|
@ -255,7 +255,7 @@ class ProximityTerminalControlNotStopTest extends ActorTest {
|
|||
avatar2.GUID = PlanetSideGUID(2)
|
||||
terminal.GUID = PlanetSideGUID(3)
|
||||
terminal.Actor ! Service.Startup()
|
||||
expectNoMsg(500 milliseconds) //spacer
|
||||
expectNoMessage(500 milliseconds) //spacer
|
||||
val probe1 = new TestProbe(system, "local-events")
|
||||
val probe2 = new TestProbe(system, "target-callback-1")
|
||||
val probe3 = new TestProbe(system, "target-callback-2")
|
||||
|
|
@ -270,11 +270,11 @@ class ProximityTerminalControlNotStopTest extends ActorTest {
|
|||
assert(terminal.NumberUsers == 1)
|
||||
|
||||
terminal.Actor.tell(CommonMessages.Use(avatar2, Some(avatar2)), probe3.ref)
|
||||
probe1.expectNoMsg(100 millisecond)
|
||||
probe1.expectNoMessage(100 millisecond)
|
||||
assert(terminal.NumberUsers == 2)
|
||||
|
||||
terminal.Actor ! CommonMessages.Unuse(avatar, Some(avatar))
|
||||
probe1.expectNoMsg(100 millisecond)
|
||||
probe1.expectNoMessage(100 millisecond)
|
||||
assert(terminal.NumberUsers == 1)
|
||||
|
||||
terminal.Actor ! CommonMessages.Unuse(avatar2, Some(avatar2))
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class TerminalControl2Test extends ActorTest {
|
|||
val (_, terminal) = TerminalControlTest.SetUpAgents(GlobalDefinitions.cert_terminal, PlanetSideEmpire.TR)
|
||||
|
||||
terminal.Actor !"hello"
|
||||
expectNoMsg(Duration.create(500, "ms"))
|
||||
expectNoMessage(Duration.create(500, "ms"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class LocalService5Test extends ActorTest {
|
|||
val service = system.actorOf(Props(classOf[LocalService], Zone.Nowhere), "l_service")
|
||||
service ! Service.Join("test")
|
||||
service ! "hello"
|
||||
expectNoMsg()
|
||||
expectNoMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "handle a simple task" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val remover = system.actorOf(
|
||||
// Props(classOf[ActorTest.SupportActorInterface], Props[RemoverActorTest.TestRemover], self),
|
||||
// "test-remover"
|
||||
|
|
@ -31,7 +31,7 @@ import scala.concurrent.duration._
|
|||
// assert(reply1.isInstanceOf[RemoverActorTest.InclusionTestAlert])
|
||||
// val reply2 = receiveOne(500 milliseconds)
|
||||
// assert(reply2.isInstanceOf[RemoverActorTest.InitialJobAlert])
|
||||
// expectNoMsg(1 seconds) //delay
|
||||
// expectNoMessage(1 seconds) //delay
|
||||
// val reply3 = receiveOne(500 milliseconds)
|
||||
// assert(reply3.isInstanceOf[RemoverActorTest.FirstJobAlert])
|
||||
// val reply4 = receiveOne(500 milliseconds)
|
||||
|
|
@ -51,7 +51,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "handle a simple task (timed)" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val remover = system.actorOf(
|
||||
// Props(classOf[ActorTest.SupportActorInterface], Props[RemoverActorTest.TestRemover], self),
|
||||
// "test-remover"
|
||||
|
|
@ -83,7 +83,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "allow only specific objects" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(
|
||||
// Props(classOf[ActorTest.SupportActorInterface], Props[RemoverActorTest.TestRemover], self),
|
||||
|
|
@ -93,7 +93,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// val reply1 = probe.receiveOne(200 milliseconds)
|
||||
// assert(reply1.isInstanceOf[RemoverActorTest.InclusionTestAlert])
|
||||
// expectNoMsg(2 seconds)
|
||||
// expectNoMessage(2 seconds)
|
||||
// //RemoverActor is stalled because it received an object that it was not allowed to act upon
|
||||
// }
|
||||
// }
|
||||
|
|
@ -105,7 +105,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "work on parallel tasks" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere)
|
||||
|
|
@ -139,7 +139,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to hurry certain tasks" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(10 minutes)) //TEN MINUTE WAIT
|
||||
|
|
@ -148,7 +148,7 @@ import scala.concurrent.duration._
|
|||
// assert(reply1.isInstanceOf[RemoverActorTest.InclusionTestAlert])
|
||||
// val reply2 = probe.receiveOne(200 milliseconds)
|
||||
// assert(reply2.isInstanceOf[RemoverActorTest.InitialJobAlert])
|
||||
// probe.expectNoMsg(3 seconds) //long delay, longer than standard but not yet 10 minutes
|
||||
// probe.expectNoMessage(3 seconds) //long delay, longer than standard but not yet 10 minutes
|
||||
// remover ! RemoverActor.HurrySpecific(List(RemoverActorTest.TestObject), Zone.Nowhere) //hurried
|
||||
// val reply3 = probe.receiveOne(300 milliseconds)
|
||||
// assert(reply3.isInstanceOf[RemoverActorTest.FirstJobAlert])
|
||||
|
|
@ -170,7 +170,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to hurry certain tasks, but let others finish normally" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(5 seconds))
|
||||
|
|
@ -185,7 +185,7 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 2 && ija == 2)
|
||||
// probe.expectNoMsg(3 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// probe.expectNoMessage(3 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// remover ! RemoverActor.HurrySpecific(List(RemoverActorTest.TestObject), Zone.Nowhere) //hurried
|
||||
// //first
|
||||
// val reply3a = probe.receiveOne(300 milliseconds)
|
||||
|
|
@ -221,7 +221,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to hurry certain tasks, but only valid ones" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(5 seconds))
|
||||
|
|
@ -236,7 +236,7 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 2 && ija == 2)
|
||||
// probe.expectNoMsg(3 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// probe.expectNoMessage(3 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// remover ! RemoverActor.HurrySpecific(List(RemoverActorTest.TestObject, TestObject3), Zone.Nowhere) //multiple hurried, only one valid
|
||||
// //first
|
||||
// val reply3a = probe.receiveOne(300 milliseconds)
|
||||
|
|
@ -273,7 +273,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to hurry certain tasks by their zone" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(5 seconds))
|
||||
|
|
@ -289,7 +289,7 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 3 && ija == 3)
|
||||
// probe.expectNoMsg(3 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// probe.expectNoMessage(3 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// remover ! RemoverActor.HurrySpecific(List(), Zone.Nowhere) //multiple hurried, only the two entries with Zone.Nowhere
|
||||
// //
|
||||
// val replies2 = probe.receiveN(10, 5 seconds)
|
||||
|
|
@ -332,7 +332,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to hurry all tasks to completion" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(20 seconds))
|
||||
|
|
@ -348,7 +348,7 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 3 && ija == 3)
|
||||
// probe.expectNoMsg(3 seconds) //long delay, longer than standard but not yet longer than any of the tasks
|
||||
// probe.expectNoMessage(3 seconds) //long delay, longer than standard but not yet longer than any of the tasks
|
||||
// remover ! RemoverActor.HurryAll() //all hurried
|
||||
// //
|
||||
// val replies2 = probe.receiveN(15, 5 seconds)
|
||||
|
|
@ -378,7 +378,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to clear certain tasks" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(5 seconds))
|
||||
|
|
@ -393,7 +393,7 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 2 && ija == 2)
|
||||
// probe.expectNoMsg(4 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// probe.expectNoMessage(4 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// remover ! RemoverActor.ClearSpecific(List(RemoverActorTest.TestObject), Zone.Nowhere) //cleared
|
||||
// //
|
||||
// val reply3 = probe.receiveOne(2 seconds)
|
||||
|
|
@ -407,7 +407,7 @@ import scala.concurrent.duration._
|
|||
// val reply7 = probe.receiveOne(500 milliseconds)
|
||||
// assert(reply7.isInstanceOf[RemoverActorTest.DeletionTaskRunAlert])
|
||||
// //wait
|
||||
// probe.expectNoMsg(2 seconds) //nothing more to do
|
||||
// probe.expectNoMessage(2 seconds) //nothing more to do
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
@ -418,7 +418,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to clear all tasks, with no more work on them" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(5 seconds))
|
||||
|
|
@ -433,10 +433,10 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 2 && ija == 2)
|
||||
// probe.expectNoMsg(4 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// probe.expectNoMessage(4 seconds) //long delay, longer than standard but not yet 5 seconds
|
||||
// remover ! RemoverActor.ClearAll() //cleared
|
||||
// //wait
|
||||
// probe.expectNoMsg(3 seconds) //nothing more to do
|
||||
// probe.expectNoMessage(3 seconds) //nothing more to do
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
@ -447,7 +447,7 @@ import scala.concurrent.duration._
|
|||
//
|
||||
// "RemoverActor" should {
|
||||
// "be able to hurry certain tasks" in {
|
||||
// expectNoMsg(500 milliseconds)
|
||||
// expectNoMessage(500 milliseconds)
|
||||
// val probe = TestProbe()
|
||||
// val remover = system.actorOf(Props(classOf[RemoverActorTest.TestRemover], probe), "test-remover")
|
||||
// remover ! RemoverActor.AddTask(RemoverActorTest.TestObject, Zone.Nowhere, Some(5 seconds))
|
||||
|
|
@ -462,7 +462,7 @@ import scala.concurrent.duration._
|
|||
// case msg => assert(false, s"$msg")
|
||||
// }
|
||||
// assert(ita == 2 && ija == 2)
|
||||
// probe.expectNoMsg(2 seconds)
|
||||
// probe.expectNoMessage(2 seconds)
|
||||
// remover ! akka.actor.PoisonPill
|
||||
// //
|
||||
// val replies2 = probe.receiveN(8, 5 seconds)
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class RouterTelepadActivationClearAllTest extends ActorTest {
|
|||
obj ! RouterTelepadActivation.AddTask(telepad2, Zone.Nowhere, Some(2 seconds))
|
||||
obj ! RouterTelepadActivation.AddTask(telepad3, Zone.Nowhere, Some(2 seconds))
|
||||
obj ! SupportActor.ClearAll()
|
||||
expectNoMsg(4 seconds)
|
||||
expectNoMessage(4 seconds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class VehicleService5Test extends ActorTest {
|
|||
val service = system.actorOf(Props(classOf[VehicleService], Zone.Nowhere), "v-service")
|
||||
service ! Service.Join("test")
|
||||
service ! "hello"
|
||||
expectNoMsg()
|
||||
expectNoMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue