diff --git a/akka-actor-tests/src/test/scala/akka/actor/ActorFireForgetRequestReplySpec.scala b/akka-actor-tests/src/test/scala/akka/actor/ActorFireForgetRequestReplySpec.scala index 277b844319..97d6daebde 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/ActorFireForgetRequestReplySpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/ActorFireForgetRequestReplySpec.scala @@ -79,7 +79,7 @@ class ActorFireForgetRequestReplySpec extends AkkaSpec with BeforeAndAfterEach w state.s must be("ReplyImplicit") } - "should shutdown crashed temporary actor" in { + "shutdown crashed temporary actor" in { filterEvents(EventFilter[Exception]("Expected exception")) { val supervisor = system.actorOf(Props(new Supervisor( OneForOneStrategy(maxNrOfRetries = 0)(List(classOf[Exception]))))) diff --git a/akka-actor-tests/src/test/scala/akka/actor/ActorRefSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/ActorRefSpec.scala index 0de13e7239..8ec2e1a999 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/ActorRefSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/ActorRefSpec.scala @@ -307,7 +307,7 @@ class ActorRefSpec extends AkkaSpec with DefaultTimeout { " Use 'akka.serialization.Serialization.currentSystem.withValue(system) { ... }'" } - "must return EmptyLocalActorRef on deserialize if not present in actor hierarchy (and remoting is not enabled)" in { + "return EmptyLocalActorRef on deserialize if not present in actor hierarchy (and remoting is not enabled)" in { import java.io._ val baos = new ByteArrayOutputStream(8192 * 32) diff --git a/akka-actor-tests/src/test/scala/akka/actor/SupervisorSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/SupervisorSpec.scala index cf576bea63..2be02f1478 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/SupervisorSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/SupervisorSpec.scala @@ -335,7 +335,7 @@ class SupervisorSpec extends AkkaSpec with BeforeAndAfterEach with ImplicitSende ping(actor3) } - "must attempt restart when exception during restart" in { + "attempt restart when exception during restart" in { val inits = new AtomicInteger(0) val supervisor = system.actorOf(Props(new Supervisor( OneForOneStrategy(maxNrOfRetries = 3, withinTimeRange = 10 seconds)(classOf[Exception] :: Nil)))) @@ -376,7 +376,7 @@ class SupervisorSpec extends AkkaSpec with BeforeAndAfterEach with ImplicitSende system.stop(supervisor) } - "must not lose system messages when a NonFatal exception occurs when processing a system message" in { + "not lose system messages when a NonFatal exception occurs when processing a system message" in { val parent = system.actorOf(Props(new Actor { override val supervisorStrategy = OneForOneStrategy()({ case e: IllegalStateException if e.getMessage == "OHNOES" ⇒ throw e diff --git a/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala index 47a6d15f15..4bdceed888 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala @@ -261,7 +261,7 @@ abstract class ActorModelSpec(config: String) extends AkkaSpec(config) with Defa "A " + dispatcherType must { - "must dynamically handle its own life cycle" in { + "dynamically handle its own life cycle" in { implicit val dispatcher = interceptedDispatcher() assertDispatcher(dispatcher)(stops = 0) val a = newTestActor(dispatcher.id) diff --git a/akka-actor-tests/src/test/scala/akka/dispatch/ExecutionContextSpec.scala b/akka-actor-tests/src/test/scala/akka/dispatch/ExecutionContextSpec.scala index 026e6c178c..e4713adfe0 100644 --- a/akka-actor-tests/src/test/scala/akka/dispatch/ExecutionContextSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/dispatch/ExecutionContextSpec.scala @@ -136,7 +136,7 @@ class ExecutionContextSpec extends AkkaSpec with DefaultTimeout { sec.isEmpty must be === true } - "should relinquish thread when suspended" in { + "relinquish thread when suspended" in { val submissions = new AtomicInteger(0) val counter = new AtomicInteger(0) val underlying = new ExecutionContext { diff --git a/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala b/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala index 196468d263..90bab3547f 100644 --- a/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala @@ -41,7 +41,8 @@ object FutureSpec { class TestDelayActor(await: TestLatch) extends Actor { def receive = { - case "Hello" ⇒ FutureSpec.ready(await, TestLatch.DefaultTimeout); sender ! "World" + case "Hello" ⇒ + FutureSpec.ready(await, TestLatch.DefaultTimeout); sender ! "World" case "NoReply" ⇒ FutureSpec.ready(await, TestLatch.DefaultTimeout) case "Failure" ⇒ FutureSpec.ready(await, TestLatch.DefaultTimeout) @@ -439,12 +440,12 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa Await.result(Future.fold(List[Future[Int]]())(0)(_ + _), timeout.duration) must be(0) } - "shouldReduceResults" in { + "reduce results" in { val futures = (1 to 10).toList map { i ⇒ Future(i) } assert(Await.result(Future.reduce(futures)(_ + _), remaining) === 55) } - "shouldReduceResultsWithException" in { + "reduce results with Exception" in { filterException[IllegalArgumentException] { val futures = (1 to 10).toList map { case 6 ⇒ Future(throw new IllegalArgumentException("shouldReduceResultsWithException: expected")) @@ -454,13 +455,13 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } } - "shouldReduceThrowIAEOnEmptyInput" in { + "throw IllegalArgumentException on empty input to reduce" in { filterException[IllegalArgumentException] { intercept[java.util.NoSuchElementException] { Await.result(Future.reduce(List[Future[Int]]())(_ + _), timeout.duration) } } } - "receiveShouldExecuteOnComplete" in { + "execute onSuccess when received ask reply" in { val latch = new TestLatch val actor = system.actorOf(Props[TestActor]) actor ? "Hello" onSuccess { case "World" ⇒ latch.open() } @@ -468,7 +469,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa system.stop(actor) } - "shouldTraverseFutures" in { + "traverse Futures" in { val oddActor = system.actorOf(Props(new Actor { var counter = 1 def receive = { @@ -487,7 +488,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa assert(Await.result(Future.traverse(list)(x ⇒ Future(x * 2 - 1)), timeout.duration).sum === 10000) } - "shouldHandleThrowables" in { + "handle Throwables" in { class ThrowableTest(m: String) extends Throwable(m) EventFilter[ThrowableTest](occurrences = 4) intercept { @@ -507,7 +508,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } } - "shouldBlockUntilResult" in { + "block until result" in { val latch = new TestLatch val f = Future { FutureSpec.ready(latch, 5 seconds); 5 } @@ -572,7 +573,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa FutureSpec.ready(f4, timeout.duration) must be('completed) } - "should not deadlock with nested await (ticket 1313)" in { + "not deadlock with nested await (ticket 1313)" in { val simple = Future(()) map (_ ⇒ Await.result((Future(()) map (_ ⇒ ())), timeout.duration)) FutureSpec.ready(simple, timeout.duration) must be('completed) diff --git a/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala b/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala index e61b66a7fa..8387cfc2c3 100644 --- a/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala @@ -233,7 +233,7 @@ class RoutingSpec extends AkkaSpec(RoutingSpec.config) with DefaultTimeout with expectMsg("restarted") } - "must start in-line for context.actorOf()" in { + "start in-line for context.actorOf()" in { system.actorOf(Props(new Actor { def receive = { case "start" ⇒ diff --git a/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala b/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala index 0d4a72d8c0..bc1530746b 100644 --- a/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala +++ b/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala @@ -37,7 +37,7 @@ class TimerBasedThrottlerSpec extends TestKit(ActorSystem("TimerBasedThrottlerSp "A throttler" must { def println(a: Any) = () - "must pass the ScalaDoc class documentation example program" in { + "pass the ScalaDoc class documentation example program" in { //#demo-code // A simple actor that prints whatever it receives val printer = system.actorOf(Props(new Actor { diff --git a/akka-remote/src/test/scala/akka/remote/transport/ThrottlerTransportAdapterSpec.scala b/akka-remote/src/test/scala/akka/remote/transport/ThrottlerTransportAdapterSpec.scala index 600000cd8a..43322e0eb5 100644 --- a/akka-remote/src/test/scala/akka/remote/transport/ThrottlerTransportAdapterSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/transport/ThrottlerTransportAdapterSpec.scala @@ -92,7 +92,7 @@ class ThrottlerTransportAdapterSpec extends AkkaSpec(configA) with ImplicitSende throttle(Direction.Send, Unthrottled) must be(true) } - "must survive blackholing" taggedAs TimingTest in { + "survive blackholing" taggedAs TimingTest in { here ! "Blackhole 1" expectMsg("Blackhole 1") diff --git a/akka-testkit/src/test/scala/akka/testkit/AkkaSpecSpec.scala b/akka-testkit/src/test/scala/akka/testkit/AkkaSpecSpec.scala index db932d05e3..df7d280676 100644 --- a/akka-testkit/src/test/scala/akka/testkit/AkkaSpecSpec.scala +++ b/akka-testkit/src/test/scala/akka/testkit/AkkaSpecSpec.scala @@ -47,7 +47,7 @@ class AkkaSpecSpec extends WordSpec with MustMatchers { spec.awaitCond(spec.ref forall (_.isTerminated), 2 seconds) } - "must stop correctly when sending PoisonPill to rootGuardian" in { + "stop correctly when sending PoisonPill to rootGuardian" in { val system = ActorSystem("AkkaSpec2", AkkaSpec.testConf) val spec = new AkkaSpec(system) {} val latch = new TestLatch(1)(system) @@ -58,7 +58,7 @@ class AkkaSpecSpec extends WordSpec with MustMatchers { Await.ready(latch, 2 seconds) } - "must enqueue unread messages from testActor to deadLetters" in { + "enqueue unread messages from testActor to deadLetters" in { val system, otherSystem = ActorSystem("AkkaSpec3", AkkaSpec.testConf) try {