From 23fa8b08108b95b878d7bb6cc61781b41fee9b97 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 31 Jan 2018 16:25:31 +0100 Subject: [PATCH] change spelling of behaviour to behavior, #24457 --- CONTRIBUTING.md | 2 +- .../scala/akka/actor/ActorWithBoundedStashSpec.scala | 4 ++-- .../typed/testing/sync/BasicSyncTestingTest.java | 12 ++++++------ .../test/scala/akka/actor/typed/DeferredSpec.scala | 2 +- .../actor/typed/scaladsl/adapter/AdapterSpec.scala | 12 ++++++------ .../typed/testing/sync/BasicSyncTestingSpec.scala | 12 ++++++------ .../src/main/scala/akka/actor/ActorSystem.scala | 4 ++-- .../src/main/scala/akka/dispatch/Mailboxes.scala | 2 +- akka-actor/src/main/scala/akka/util/ByteString.scala | 4 ++-- .../singleton/ClusterSingletonManagerSpec.scala | 4 ++-- akka-cluster/src/main/resources/reference.conf | 2 +- akka-docs/src/main/paradox/common/circuitbreaker.md | 2 +- akka-docs/src/main/paradox/dispatchers.md | 6 +++--- akka-docs/src/main/paradox/distributed-data.md | 2 +- akka-docs/src/main/paradox/futures.md | 2 +- akka-docs/src/main/paradox/persistence.md | 4 ++-- .../src/main/paradox/stream/stream-customize.md | 2 +- .../main/paradox/stream/stream-flows-and-basics.md | 2 +- akka-docs/src/main/paradox/stream/stream-graphs.md | 2 +- akka-docs/src/main/paradox/stream/stream-testkit.md | 4 ++-- akka-docs/src/main/paradox/testing.md | 6 +++--- akka-docs/src/main/paradox/typed/testing.md | 6 +++--- .../src/test/scala/docs/actor/UnnestedReceives.scala | 2 +- .../src/main/scala/akka/osgi/DefaultOSGiLogger.scala | 4 ++-- ...ldbJournalNoAtomicPersistMultipleEventsSpec.scala | 2 +- .../remote/transport/netty/NettyTransportSpec.scala | 4 ++-- .../akka/stream/scaladsl/StageActorRefSpec.scala | 6 +++--- .../src/main/scala/akka/stream/StreamRefs.scala | 2 +- .../src/main/scala/akka/stream/javadsl/Flow.scala | 4 ++-- .../src/main/scala/akka/stream/javadsl/Framing.scala | 2 +- .../src/main/scala/akka/stream/javadsl/Source.scala | 4 ++-- .../src/main/scala/akka/stream/javadsl/SubFlow.scala | 4 ++-- .../main/scala/akka/stream/javadsl/SubSource.scala | 4 ++-- .../src/main/scala/akka/stream/scaladsl/Flow.scala | 4 ++-- .../main/scala/akka/stream/stage/GraphStage.scala | 12 ++++++------ ...{BehaviourTestkit.scala => BehaviorTestkit.scala} | 2 +- .../src/main/scala/akka/testkit/typed/TestKit.scala | 8 ++++---- 37 files changed, 81 insertions(+), 81 deletions(-) rename akka-testkit-typed/src/main/scala/akka/testkit/typed/{BehaviourTestkit.scala => BehaviorTestkit.scala} (99%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f241d52f9..1703e6abe2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ The steps are exactly the same for everyone involved in the project (be it core - Please make sure to follow the general quality guidelines (specified below) when developing your patch. - Please write additional tests covering your feature and adjust existing ones if needed before submitting your pull request. The `validatePullRequest` sbt task ([explained below](#the-validatepullrequest-task)) may come in handy to verify your changes are correct. 1. Once your feature is complete, prepare the commit following our [Creating Commits And Writing Commit Messages](#creating-commits-and-writing-commit-messages). For example, a good commit message would be: `Adding compression support for Manifests #22222` (note the reference to the ticket it aimed to resolve). -1. If it's a new feature, or a change of behaviour, document it on the [akka-docs](https://github.com/akka/akka/tree/master/akka-docs), remember, an undocumented feature is not a feature. If the feature was touching Scala or Java DSL, make sure to document both the Scala and Java APIs. +1. If it's a new feature, or a change of behavior, document it on the [akka-docs](https://github.com/akka/akka/tree/master/akka-docs), remember, an undocumented feature is not a feature. If the feature was touching Scala or Java DSL, make sure to document both the Scala and Java APIs. 1. Now it's finally time to [submit the pull request](https://help.github.com/articles/using-pull-requests)! - Please make sure to include a reference to the issue you're solving *in the comment* for the Pull Request, this will cause the PR to be linked properly with the Issue. Examples of good phrases for this are: "Resolves #1234" or "Refs #1234". 1. If you have not already done so, you will be asked by our CLA bot to [sign the Lightbend CLA](http://www.lightbend.com/contribute/cla) online. CLA stands for Contributor License Agreement and is a way of protecting intellectual property disputes from harming the project. diff --git a/akka-actor-tests/src/test/scala/akka/actor/ActorWithBoundedStashSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/ActorWithBoundedStashSpec.scala index be50faf246..46f908cfab 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/ActorWithBoundedStashSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/ActorWithBoundedStashSpec.scala @@ -23,12 +23,12 @@ object ActorWithBoundedStashSpec { sender() ! "ok" case "world" ⇒ - context.become(afterWorldBehaviour) + context.become(afterWorldBehavior) unstashAll() } - def afterWorldBehaviour: Receive = { + def afterWorldBehavior: Receive = { case _ ⇒ stash() } } diff --git a/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/testing/sync/BasicSyncTestingTest.java b/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/testing/sync/BasicSyncTestingTest.java index 56eeabacc6..da9998c868 100644 --- a/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/testing/sync/BasicSyncTestingTest.java +++ b/akka-actor-typed-tests/src/test/java/jdocs/akka/typed/testing/sync/BasicSyncTestingTest.java @@ -38,7 +38,7 @@ public class BasicSyncTestingTest extends JUnitSuite { } } - public static Behavior myBehaviour = Behaviors.immutable(Command.class) + public static Behavior myBehavior = Behaviors.immutable(Command.class) .onMessage(CreateAChild.class, (ctx, msg) -> { ctx.spawn(childActor, msg.childName); return Behaviors.same(); @@ -66,7 +66,7 @@ public class BasicSyncTestingTest extends JUnitSuite { @Test public void testSpawning() { //#test-child - BehaviorTestkit test = BehaviorTestkit.create(myBehaviour); + BehaviorTestkit test = BehaviorTestkit.create(myBehavior); test.run(new CreateAChild("child")); test.expectEffect(new Effect.Spawned(childActor, "child", Props.empty())); //#test-child @@ -75,7 +75,7 @@ public class BasicSyncTestingTest extends JUnitSuite { @Test public void testSpawningAnonymous() { //#test-anonymous-child - BehaviorTestkit test = BehaviorTestkit.create(myBehaviour); + BehaviorTestkit test = BehaviorTestkit.create(myBehavior); test.run(new CreateAnAnonymousChild()); test.expectEffect(new Effect.SpawnedAnonymous(childActor, Props.empty())); //#test-anonymous-child @@ -84,7 +84,7 @@ public class BasicSyncTestingTest extends JUnitSuite { @Test public void testRecodingMessageSend() { //#test-message - BehaviorTestkit test = BehaviorTestkit.create(myBehaviour); + BehaviorTestkit test = BehaviorTestkit.create(myBehavior); TestInbox inbox = new TestInbox(); test.run(new SayHello(inbox.ref())); inbox.expectMsg("hello"); @@ -94,7 +94,7 @@ public class BasicSyncTestingTest extends JUnitSuite { @Test public void testMessageToChild() { //#test-child-message - BehaviorTestkit testKit = BehaviorTestkit.create(myBehaviour); + BehaviorTestkit testKit = BehaviorTestkit.create(myBehavior); testKit.run(new SayHelloToChild("child")); TestInbox childInbox = testKit.childInbox("child"); childInbox.expectMsg("hello"); @@ -104,7 +104,7 @@ public class BasicSyncTestingTest extends JUnitSuite { @Test public void testMessageToAnonymousChild() { //#test-child-message-anonymous - BehaviorTestkit testKit = BehaviorTestkit.create(myBehaviour); + BehaviorTestkit testKit = BehaviorTestkit.create(myBehavior); testKit.run(new SayHelloToAnonymousChild()); // Anonymous actors are created as: $a $b etc TestInbox childInbox = testKit.childInbox("$a"); diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala index b0e9270fe0..00e495b117 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/DeferredSpec.scala @@ -31,7 +31,7 @@ class DeferredSpec extends TestKit with TypedAkkaSpec { import DeferredSpec._ implicit val testSettings = TestKitSettings(system) - "Deferred behaviour" must { + "Deferred behavior" must { "must create underlying" in { val probe = TestProbe[Event]("evt") val behv = Behaviors.deferred[Command] { _ ⇒ diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala index 2fbe77da4f..d52aa7b912 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/scaladsl/adapter/AdapterSpec.scala @@ -274,22 +274,22 @@ class AdapterSpec extends AkkaSpec { probe.expectMsg("terminated") } - "spawn untyped behaviour anonymously" in { + "spawn untyped behavior anonymously" in { val probe = TestProbe() - val untypedBehaviour: Behavior[String] = new UntypedBehavior[String] { + val untypedBehavior: Behavior[String] = new UntypedBehavior[String] { override private[akka] def untypedProps: Props = untypedForwarder(probe.ref) } - val ref = system.spawnAnonymous(untypedBehaviour) + val ref = system.spawnAnonymous(untypedBehavior) ref ! "hello" probe.expectMsg("hello") } - "spawn untyped behaviour" in { + "spawn untyped behavior" in { val probe = TestProbe() - val untypedBehaviour: Behavior[String] = new UntypedBehavior[String] { + val untypedBehavior: Behavior[String] = new UntypedBehavior[String] { override private[akka] def untypedProps: Props = untypedForwarder(probe.ref) } - val ref = system.spawn(untypedBehaviour, "test") + val ref = system.spawn(untypedBehavior, "test") ref ! "hello" probe.expectMsg("hello") } diff --git a/akka-actor-typed-tests/src/test/scala/docs/akka/typed/testing/sync/BasicSyncTestingSpec.scala b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/testing/sync/BasicSyncTestingSpec.scala index bc213c300c..fb91db1492 100644 --- a/akka-actor-typed-tests/src/test/scala/docs/akka/typed/testing/sync/BasicSyncTestingSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/testing/sync/BasicSyncTestingSpec.scala @@ -23,7 +23,7 @@ object BasicSyncTestingSpec { case object SayHelloToAnonymousChild extends Cmd case class SayHello(who: ActorRef[String]) extends Cmd - val myBehaviour = Behaviors.immutablePartial[Cmd] { + val myBehavior = Behaviors.immutablePartial[Cmd] { case (ctx, CreateChild(name)) ⇒ ctx.spawn(childActor, name) Behaviors.same @@ -54,7 +54,7 @@ class BasicSyncTestingSpec extends WordSpec with Matchers { "record spawning" in { //#test-child - val testKit = BehaviorTestkit(myBehaviour) + val testKit = BehaviorTestkit(myBehavior) testKit.run(CreateChild("child")) testKit.expectEffect(Spawned(childActor, "child")) //#test-child @@ -62,7 +62,7 @@ class BasicSyncTestingSpec extends WordSpec with Matchers { "record spawning anonymous" in { //#test-anonymous-child - val testKit = BehaviorTestkit(myBehaviour) + val testKit = BehaviorTestkit(myBehavior) testKit.run(CreateAnonymousChild) testKit.expectEffect(SpawnedAnonymous(childActor)) //#test-anonymous-child @@ -70,7 +70,7 @@ class BasicSyncTestingSpec extends WordSpec with Matchers { "record message sends" in { //#test-message - val testKit = BehaviorTestkit(myBehaviour) + val testKit = BehaviorTestkit(myBehavior) val inbox = TestInbox[String]() testKit.run(SayHello(inbox.ref)) inbox.expectMsg("hello") @@ -79,7 +79,7 @@ class BasicSyncTestingSpec extends WordSpec with Matchers { "send a message to a spawned child" in { //#test-child-message - val testKit = BehaviorTestkit(myBehaviour) + val testKit = BehaviorTestkit(myBehavior) testKit.run(SayHelloToChild("child")) val childInbox = testKit.childInbox[String]("child") childInbox.expectMsg("hello") @@ -88,7 +88,7 @@ class BasicSyncTestingSpec extends WordSpec with Matchers { "send a message to an anonymous spawned child" in { //#test-child-message-anonymous - val testKit = BehaviorTestkit(myBehaviour) + val testKit = BehaviorTestkit(myBehavior) testKit.run(SayHelloToAnonymousChild) // Anonymous actors are created as: $a $b etc val childInbox = testKit.childInbox[String](s"$$a") diff --git a/akka-actor/src/main/scala/akka/actor/ActorSystem.scala b/akka-actor/src/main/scala/akka/actor/ActorSystem.scala index 998dec3041..aebb849de1 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorSystem.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorSystem.scala @@ -175,7 +175,7 @@ object ActorSystem { /** * Java API: Shortcut for creating an actor system with custom bootstrap settings. - * Same behaviour as calling `ActorSystem.create(name, ActorSystemSetup.create(bootstrapSettings))` + * Same behavior as calling `ActorSystem.create(name, ActorSystemSetup.create(bootstrapSettings))` */ def create(name: String, bootstrapSetup: BootstrapSetup): ActorSystem = create(name, ActorSystemSetup.create(bootstrapSetup)) @@ -247,7 +247,7 @@ object ActorSystem { /** * Scala API: Shortcut for creating an actor system with custom bootstrap settings. - * Same behaviour as calling `ActorSystem(name, ActorSystemSetup(bootstrapSetup))` + * Same behavior as calling `ActorSystem(name, ActorSystemSetup(bootstrapSetup))` */ def apply(name: String, bootstrapSetup: BootstrapSetup): ActorSystem = create(name, ActorSystemSetup.create(bootstrapSetup)) diff --git a/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala b/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala index a702ce46db..ccefde7455 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala @@ -201,7 +201,7 @@ private[akka] class Mailboxes( mailboxType match { case m: ProducesPushTimeoutSemanticsMailbox if m.pushTimeOut.toNanos > 0L ⇒ warn(s"Configured potentially-blocking mailbox [$id] configured with non-zero pushTimeOut (${m.pushTimeOut}), " + - s"which can lead to blocking behaviour when sending messages to this mailbox. " + + s"which can lead to blocking behavior when sending messages to this mailbox. " + s"Avoid this by setting `$id.mailbox-push-timeout-time` to `0`.") mailboxNonZeroPushTimeoutWarningIssued = true case _ ⇒ // good; nothing to see here, move along, sir. diff --git a/akka-actor/src/main/scala/akka/util/ByteString.scala b/akka-actor/src/main/scala/akka/util/ByteString.scala index 819ba2bf29..fb00bdf9cc 100644 --- a/akka-actor/src/main/scala/akka/util/ByteString.scala +++ b/akka-actor/src/main/scala/akka/util/ByteString.scala @@ -68,7 +68,7 @@ object ByteString { * methods defined on ByteString. This method of creating a ByteString saves one array * copy and allocation and therefore can lead to better performance, however it also means * that one MUST NOT modify the passed in array, or unexpected immutable data structure - * contract-breaking behaviour will manifest itself. + * contract-breaking behavior will manifest itself. * * This API is intended for users who have obtained an byte array from some other API, and * want wrap it into an ByteArray, and from there on only use that reference (the ByteString) @@ -93,7 +93,7 @@ object ByteString { * methods defined on ByteString. This method of creating a ByteString saves one array * copy and allocation and therefore can lead to better performance, however it also means * that one MUST NOT modify the passed in array, or unexpected immutable data structure - * contract-breaking behaviour will manifest itself. + * contract-breaking behavior will manifest itself. * * This API is intended for users who have obtained an byte array from some other API, and * want wrap it into an ByteArray, and from there on only use that reference (the ByteString) diff --git a/akka-cluster-tools/src/multi-jvm/scala/akka/cluster/singleton/ClusterSingletonManagerSpec.scala b/akka-cluster-tools/src/multi-jvm/scala/akka/cluster/singleton/ClusterSingletonManagerSpec.scala index 4b44da9c50..b4ddd84f91 100644 --- a/akka-cluster-tools/src/multi-jvm/scala/akka/cluster/singleton/ClusterSingletonManagerSpec.scala +++ b/akka-cluster-tools/src/multi-jvm/scala/akka/cluster/singleton/ClusterSingletonManagerSpec.scala @@ -67,7 +67,7 @@ object ClusterSingletonManagerSpec extends MultiNodeConfig { /** * This channel is extremely strict with regards to * registration and unregistration of consumer to - * be able to detect misbehaviour (e.g. two active + * be able to detect misbehavior (e.g. two active * singleton instances). */ class PointToPointChannel extends Actor with ActorLogging { @@ -334,7 +334,7 @@ class ClusterSingletonManagerSpec extends MultiNodeSpec(ClusterSingletonManagerS memberProbe.expectMsgClass(classOf[CurrentClusterState]) runOn(controller) { - // watch that it is not terminated, which would indicate misbehaviour + // watch that it is not terminated, which would indicate misbehavior watch(system.actorOf(Props[PointToPointChannel], "queue")) } enterBarrier("queue-started") diff --git a/akka-cluster/src/main/resources/reference.conf b/akka-cluster/src/main/resources/reference.conf index 5752c296ac..a6d3b85f20 100644 --- a/akka-cluster/src/main/resources/reference.conf +++ b/akka-cluster/src/main/resources/reference.conf @@ -59,7 +59,7 @@ akka { down-removal-margin = off # Pluggable support for downing of nodes in the cluster. - # If this setting is left empty behaviour will depend on 'auto-down-unreachable' in the following ways: + # If this setting is left empty behavior will depend on 'auto-down-unreachable' in the following ways: # * if it is 'off' the `NoDowning` provider is used and no automatic downing will be performed # * if it is set to a duration the `AutoDowning` provider is with the configured downing duration # diff --git a/akka-docs/src/main/paradox/common/circuitbreaker.md b/akka-docs/src/main/paradox/common/circuitbreaker.md index cbe85b4429..f52c1aa948 100644 --- a/akka-docs/src/main/paradox/common/circuitbreaker.md +++ b/akka-docs/src/main/paradox/common/circuitbreaker.md @@ -138,7 +138,7 @@ Ie. this function should return `true` if the call should increase failure count ### Low level API -The low-level API allows you to describe the behaviour of the CircuitBreaker in detail, including deciding what to return to the calling `Actor` in case of success or failure. This is especially useful when expecting the remote call to send a reply. CircuitBreaker doesn't support `Tell Protection` (protecting against calls that expect a reply) natively at the moment, so you need to use the low-level power-user APIs, `succeed` and `fail` methods, as well as `isClose`, `isOpen`, `isHalfOpen` to implement it. +The low-level API allows you to describe the behavior of the CircuitBreaker in detail, including deciding what to return to the calling `Actor` in case of success or failure. This is especially useful when expecting the remote call to send a reply. CircuitBreaker doesn't support `Tell Protection` (protecting against calls that expect a reply) natively at the moment, so you need to use the low-level power-user APIs, `succeed` and `fail` methods, as well as `isClose`, `isOpen`, `isHalfOpen` to implement it. As can be seen in the examples below, a `Tell Protection` pattern could be implemented by using the `succeed` and `fail` methods, which would count towards the `CircuitBreaker` counts. In the example, a call is made to the remote service if the `breaker.isClosed`, and once a response is received, the `succeed` method is invoked, which tells the `CircuitBreaker` to keep the breaker closed. If on the other hand an error or timeout is received, we trigger a `fail` and the breaker accrues this failure towards its count for opening the breaker. diff --git a/akka-docs/src/main/paradox/dispatchers.md b/akka-docs/src/main/paradox/dispatchers.md index 0ae8d4f48a..ae163389be 100644 --- a/akka-docs/src/main/paradox/dispatchers.md +++ b/akka-docs/src/main/paradox/dispatchers.md @@ -306,11 +306,11 @@ that you have not configured an explicit dispatcher for). ### Solution: Dedicated dispatcher for blocking operations -One of the most efficient methods of isolating the blocking behaviour such that it does not impact the rest of the system +One of the most efficient methods of isolating the blocking behavior such that it does not impact the rest of the system is to prepare and use a dedicated dispatcher for all those blocking operations. This technique is often referred to as as "bulk-heading" or simply "isolating blocking". -In `application.conf`, the dispatcher dedicated to blocking behaviour should +In `application.conf`, the dispatcher dedicated to blocking behavior should be configured as follows: @@ -332,7 +332,7 @@ Scala Java : @@snip [BlockingDispatcherSample.java]($akka$/akka-docs/src/test/java/jdocs/actor/SeparateDispatcherFutureActor.java) { #separate-dispatcher } -The thread pool behaviour is shown in the below diagram. +The thread pool behavior is shown in the below diagram. ![dispatcher-behaviour-on-good-code.png](./images/dispatcher-behaviour-on-good-code.png) diff --git a/akka-docs/src/main/paradox/distributed-data.md b/akka-docs/src/main/paradox/distributed-data.md index 24a8453c1b..27f063389e 100644 --- a/akka-docs/src/main/paradox/distributed-data.md +++ b/akka-docs/src/main/paradox/distributed-data.md @@ -498,7 +498,7 @@ There is a special version of `ORMultiMap`, created by using separate constructo This means that the `ORMultiMap` initiated with `ORMultiMap.emptyWithValueDeltas` propagates its updates as pairs consisting of delta of the key and delta of the value. It is much more efficient in terms of network bandwith consumed. -However, this behaviour has not been made default for `ORMultiMap` and if you wish to use it in your code, you +However, this behavior has not been made default for `ORMultiMap` and if you wish to use it in your code, you need to replace invocations of `ORMultiMap.empty[A, B]` (or `ORMultiMap()`) with `ORMultiMap.emptyWithValueDeltas[A, B]` where `A` and `B` are types respectively of keys and values in the map. diff --git a/akka-docs/src/main/paradox/futures.md b/akka-docs/src/main/paradox/futures.md index 7f499d4b61..254d687df9 100644 --- a/akka-docs/src/main/paradox/futures.md +++ b/akka-docs/src/main/paradox/futures.md @@ -409,7 +409,7 @@ which means `scala-java8-compat` implementation is not used after the first mapp @@@ note { .group-java } After adding any additional computation stage to `CompletionStage` returned by `scala-java8-compat` -(e.g. `CompletionStage` instances returned by Akka) it falls back to standard behaviour of Java `CompletableFuture`. +(e.g. `CompletionStage` instances returned by Akka) it falls back to standard behavior of Java `CompletableFuture`. @@@ diff --git a/akka-docs/src/main/paradox/persistence.md b/akka-docs/src/main/paradox/persistence.md index 9bf7fdad99..27f6e898b9 100644 --- a/akka-docs/src/main/paradox/persistence.md +++ b/akka-docs/src/main/paradox/persistence.md @@ -373,7 +373,7 @@ retain both the thread safety (including the right value of @scala[`sender()`]@j In general it is encouraged to create command handlers which do not need to resort to nested event persisting, however there are situations where it may be useful. It is important to understand the ordering of callback execution in -those situations, as well as their implication on the stashing behaviour (that `persist()` enforces). In the following +those situations, as well as their implication on the stashing behavior (that `persist()` enforces). In the following example two persist calls are issued, and each of them issues another persist inside its callback: Scala @@ -554,7 +554,7 @@ Consider using explicit shut-down messages instead of `PoisonPill` when working @@@ The example below highlights how messages arrive in the Actor's mailbox and how they interact with its internal stashing -mechanism when `persist()` is used. Notice the early stop behaviour that occurs when `PoisonPill` is used: +mechanism when `persist()` is used. Notice the early stop behavior that occurs when `PoisonPill` is used: Scala : @@snip [PersistenceDocSpec.scala]($code$/scala/docs/persistence/PersistenceDocSpec.scala) { #safe-shutdown } diff --git a/akka-docs/src/main/paradox/stream/stream-customize.md b/akka-docs/src/main/paradox/stream/stream-customize.md index 18da37cbc8..f950d36f8b 100644 --- a/akka-docs/src/main/paradox/stream/stream-customize.md +++ b/akka-docs/src/main/paradox/stream/stream-customize.md @@ -70,7 +70,7 @@ Java Similarly, to create a custom `Sink` one can register a subclass `InHandler` with the stage `Inlet`. The `onPush()` callback is used to signal the handler a new element has been pushed to the stage, -and can hence be grabbed and used. `onPush()` can be overridden to provide custom behaviour. +and can hence be grabbed and used. `onPush()` can be overridden to provide custom behavior. Please note, most Sinks would need to request upstream elements as soon as they are created: this can be done by calling `pull(inlet)` in the `preStart()` callback. diff --git a/akka-docs/src/main/paradox/stream/stream-flows-and-basics.md b/akka-docs/src/main/paradox/stream/stream-flows-and-basics.md index 067e203540..9605b3f7c9 100644 --- a/akka-docs/src/main/paradox/stream/stream-flows-and-basics.md +++ b/akka-docs/src/main/paradox/stream/stream-flows-and-basics.md @@ -185,7 +185,7 @@ specification, which Akka is a founding member of. The user of the library does not have to write any explicit back-pressure handling code — it is built in and dealt with automatically by all of the provided Akka Streams processing stages. It is possible however to add -explicit buffer stages with overflow strategies that can influence the behaviour of the stream. This is especially important +explicit buffer stages with overflow strategies that can influence the behavior of the stream. This is especially important in complex processing graphs which may even contain loops (which *must* be treated with very special care, as explained in @ref:[Graph cycles, liveness and deadlocks](stream-graphs.md#graph-cycles)). diff --git a/akka-docs/src/main/paradox/stream/stream-graphs.md b/akka-docs/src/main/paradox/stream/stream-graphs.md index 2f6a548b17..2927f54cb8 100644 --- a/akka-docs/src/main/paradox/stream/stream-graphs.md +++ b/akka-docs/src/main/paradox/stream/stream-graphs.md @@ -15,7 +15,7 @@ streams, such that the second one is consumed after the first one has completed) ## Constructing Graphs Graphs are built from simple Flows which serve as the linear connections within the graphs as well as junctions -which serve as fan-in and fan-out points for Flows. Thanks to the junctions having meaningful types based on their behaviour +which serve as fan-in and fan-out points for Flows. Thanks to the junctions having meaningful types based on their behavior and making them explicit elements these elements should be rather straightforward to use. Akka Streams currently provide these junctions (for a detailed list see @ref[stages overview](stages-overview.md)): diff --git a/akka-docs/src/main/paradox/stream/stream-testkit.md b/akka-docs/src/main/paradox/stream/stream-testkit.md index b32090cf7b..015af89fca 100644 --- a/akka-docs/src/main/paradox/stream/stream-testkit.md +++ b/akka-docs/src/main/paradox/stream/stream-testkit.md @@ -1,6 +1,6 @@ # Testing streams -Verifying behaviour of Akka Stream sources, flows and sinks can be done using +Verifying behavior of Akka Stream sources, flows and sinks can be done using various code patterns and libraries. Here we will discuss testing these elements using: @@ -124,7 +124,7 @@ Scala Java : @@snip [StreamTestKitDocTest.java]($code$/java/jdocs/stream/StreamTestKitDocTest.java) { #test-source-probe } -You can also inject exceptions and test sink behaviour on error conditions. +You can also inject exceptions and test sink behavior on error conditions. Scala : @@snip [StreamTestKitDocSpec.scala]($code$/scala/docs/stream/StreamTestKitDocSpec.scala) { #injecting-failure } diff --git a/akka-docs/src/main/paradox/testing.md b/akka-docs/src/main/paradox/testing.md index 6a1706903a..6cbf49e4f0 100644 --- a/akka-docs/src/main/paradox/testing.md +++ b/akka-docs/src/main/paradox/testing.md @@ -819,12 +819,12 @@ restriction is an impediment to unit testing, which led to the inception of the `TestActorRef`. This special type of reference is designed specifically for test purposes and allows access to the actor in two ways: either by obtaining a reference to the underlying actor instance, or by invoking or -querying the actor's behaviour (`receive`). Each one warrants its own +querying the actor's behavior (`receive`). Each one warrants its own section below. @@@ note -It is highly recommended to stick to traditional behavioural testing (using messaging +It is highly recommended to stick to traditional behavioral testing (using messaging to ask the Actor to reply with the state you want to run assertions against), instead of using `TestActorRef` whenever possible. @@ -833,7 +833,7 @@ instead of using `TestActorRef` whenever possible. @@@ warning Due to the synchronous nature of `TestActorRef` it will **not** work with some support -traits that Akka provides as they require asynchronous behaviours to function properly. +traits that Akka provides as they require asynchronous behaviors to function properly. Examples of traits that do not mix well with test actor refs are @ref:[PersistentActor](persistence.md#event-sourcing) and @ref:[AtLeastOnceDelivery](persistence.md#at-least-once-delivery) provided by @ref:[Akka Persistence](persistence.md). diff --git a/akka-docs/src/main/paradox/typed/testing.md b/akka-docs/src/main/paradox/typed/testing.md index e5de540c2a..04af55d358 100644 --- a/akka-docs/src/main/paradox/typed/testing.md +++ b/akka-docs/src/main/paradox/typed/testing.md @@ -1,6 +1,6 @@ # Testing -Testing can either be done asynchronously using a real `ActorSystem` or synchronously on the testing thread using the `BehaviousTestKit`. +Testing can either be done asynchronously using a real `ActorSystem` or synchronously on the testing thread using the `BehaviousTestKit`. For testing logic in a `Behavior` in isolation synchronous testing is preferred. For testing interactions between multiple actors a more realistic asynchronous test is preferred. @@ -29,7 +29,7 @@ To use Akka TestKit Type, add the module to your project: scope=test } -## Synchronous behaviour testing +## Synchronous behavior testing The following demonstrates how to test: @@ -196,4 +196,4 @@ Scala : @@snip [ManualTimerSpec.scala]($akka$/akka-actor-typed-tests/src/test/scala/akka/actor/typed/ManualTimerSpec.scala) { #manual-scheduling-simple } Java -: @@snip [ManualTimerTest.scala]($akka$/akka-actor-typed-tests/src/test/java/akka/actor/typed/ManualTimerTest.java) { #manual-scheduling-simple } \ No newline at end of file +: @@snip [ManualTimerTest.scala]($akka$/akka-actor-typed-tests/src/test/java/akka/actor/typed/ManualTimerTest.java) { #manual-scheduling-simple } diff --git a/akka-docs/src/test/scala/docs/actor/UnnestedReceives.scala b/akka-docs/src/test/scala/docs/actor/UnnestedReceives.scala index 36970cf81e..94eb5d6e2b 100644 --- a/akka-docs/src/test/scala/docs/actor/UnnestedReceives.scala +++ b/akka-docs/src/test/scala/docs/actor/UnnestedReceives.scala @@ -40,7 +40,7 @@ class UnnestedReceives extends Actor { case 'GoAhead ⇒ //When we get the GoAhead signal we process all our buffered messages/events queue foreach process queue.clear - become { //Then we change behaviour to process incoming messages/events as they arrive + become { //Then we change behavior to process incoming messages/events as they arrive case msg ⇒ process(msg) } case msg ⇒ //While we haven't gotten the GoAhead signal, buffer all incoming messages diff --git a/akka-osgi/src/main/scala/akka/osgi/DefaultOSGiLogger.scala b/akka-osgi/src/main/scala/akka/osgi/DefaultOSGiLogger.scala index d9e2572f7c..af3cb93720 100644 --- a/akka-osgi/src/main/scala/akka/osgi/DefaultOSGiLogger.scala +++ b/akka-osgi/src/main/scala/akka/osgi/DefaultOSGiLogger.scala @@ -20,7 +20,7 @@ class DefaultOSGiLogger extends DefaultLogger { override def receive: Receive = uninitialisedReceive.orElse[Any, Unit](super.receive) /** - * Behaviour of the logger that waits for its LogService + * Behavior of the logger that waits for its LogService * @return Receive: Store LogEvent or become initialised */ def uninitialisedReceive: Receive = { @@ -47,7 +47,7 @@ class DefaultOSGiLogger extends DefaultLogger { } /** - * Behaviour of the Event handler that is setup (has received a LogService) + * Behavior of the Event handler that is setup (has received a LogService) * @param logService registered OSGi LogService * @return Receive : Logs LogEvent or go back to the uninitialised state */ diff --git a/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala b/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala index 2a570d2516..f041c26745 100644 --- a/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala +++ b/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala @@ -11,7 +11,7 @@ class LeveldbJournalNoAtomicPersistMultipleEventsSpec extends JournalSpec( with PluginCleanup { /** - * Setting to false to test the single message atomic write behaviour of JournalSpec + * Setting to false to test the single message atomic write behavior of JournalSpec */ override def supportsAtomicPersistAllOfSeveralEvents = false diff --git a/akka-remote/src/test/scala/akka/remote/transport/netty/NettyTransportSpec.scala b/akka-remote/src/test/scala/akka/remote/transport/netty/NettyTransportSpec.scala index 8f1c182211..2a3e942bc7 100644 --- a/akka-remote/src/test/scala/akka/remote/transport/netty/NettyTransportSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/transport/netty/NettyTransportSpec.scala @@ -33,7 +33,7 @@ object NettyTransportSpec { } } -class NettyTransportSpec extends WordSpec with Matchers with BindBehaviour { +class NettyTransportSpec extends WordSpec with Matchers with BindBehavior { import akka.remote.transport.netty.NettyTransportSpec._ "NettyTransport" should { @@ -119,7 +119,7 @@ class NettyTransportSpec extends WordSpec with Matchers with BindBehaviour { } } -trait BindBehaviour { this: WordSpec with Matchers ⇒ +trait BindBehavior { this: WordSpec with Matchers ⇒ import akka.remote.transport.netty.NettyTransportSpec._ def theOneWhoKnowsTheDifferenceBetweenBoundAndRemotingAddress(proto: String) = { diff --git a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/StageActorRefSpec.scala b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/StageActorRefSpec.scala index 0ffb728306..adad43c16c 100644 --- a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/StageActorRefSpec.scala +++ b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/StageActorRefSpec.scala @@ -191,14 +191,14 @@ object StageActorRefSpec { override def preStart(): Unit = { pull(in) - probe ! getStageActor(behaviour).ref + probe ! getStageActor(behavior).ref } - def behaviour(m: (ActorRef, Any)): Unit = { + def behavior(m: (ActorRef, Any)): Unit = { m match { case (sender, Add(n)) ⇒ sum += n case (sender, PullNow) ⇒ pull(in) - case (sender, CallInitStageActorRef) ⇒ sender ! getStageActor(behaviour).ref + case (sender, CallInitStageActorRef) ⇒ sender ! getStageActor(behavior).ref case (sender, BecomeStringEcho) ⇒ getStageActor { case (theSender, msg) ⇒ theSender ! msg.toString diff --git a/akka-stream/src/main/scala/akka/stream/StreamRefs.scala b/akka-stream/src/main/scala/akka/stream/StreamRefs.scala index 39656b5484..a321785371 100644 --- a/akka-stream/src/main/scala/akka/stream/StreamRefs.scala +++ b/akka-stream/src/main/scala/akka/stream/StreamRefs.scala @@ -86,7 +86,7 @@ final case class InvalidSequenceNumberException(expectedSeqNr: Long, gotSeqNr: L * the initial partner can send demand/messages to the other side accidentally. * * This exception is thrown when a message is recived from a non-partner actor, - * which could mean a bug or some actively malicient behaviour from the other side. + * which could mean a bug or some actively malicient behavior from the other side. * * This is not meant as a security feature, but rather as plain sanity-check. */ diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala index 14d1f009bb..2e9c17157f 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala @@ -2079,7 +2079,7 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate * @@ -2121,7 +2121,7 @@ final class Flow[-In, +Out, +Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate. Enforcing * cannot emit elements that cost more than the maximumBurst diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Framing.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Framing.scala index f0a2edb5fd..385fab5b6e 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Framing.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Framing.scala @@ -20,7 +20,7 @@ object Framing { * If there are buffered bytes (an incomplete frame) when the input stream finishes and ''allowTruncation'' is set to * false then this Flow will fail the stream reporting a truncated frame. * - * Default truncation behaviour is: when the last frame being decoded contains no valid delimiter this Flow + * Default truncation behavior is: when the last frame being decoded contains no valid delimiter this Flow * fails the stream instead of returning a truncated frame. * * @param delimiter The byte sequence to be treated as the end of the frame. diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala index a5251d7cc7..320440a400 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala @@ -2144,7 +2144,7 @@ final class Source[+Out, +Mat](delegate: scaladsl.Source[Out, Mat]) extends Grap * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate * @@ -2186,7 +2186,7 @@ final class Source[+Out, +Mat](delegate: scaladsl.Source[Out, Mat]) extends Grap * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate. Enforcing * cannot emit elements that cost more than the maximumBurst diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala index fe8a0909a2..cfc6559cfb 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala @@ -1363,7 +1363,7 @@ class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flo * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate * @@ -1405,7 +1405,7 @@ class SubFlow[-In, +Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flo * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate. Enforcing * cannot emit elements that cost more than the maximumBurst diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala index 196c25d737..a13e258ced 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala @@ -1356,7 +1356,7 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate * @@ -1398,7 +1398,7 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate. Enforcing * cannot emit elements that cost more than the maximumBurst diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala index 2eff5dcb0d..32102a952d 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala @@ -1835,7 +1835,7 @@ trait FlowOps[+Out, +Mat] { * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate. Enforcing * cannot emit elements that cost more than the maximumBurst @@ -1877,7 +1877,7 @@ trait FlowOps[+Out, +Mat] { * bucket accumulates enough tokens. Elements that costs more than the allowed burst will be delayed proportionally * to their cost minus available tokens, meeting the target rate. Bucket is full when stream just materialized and started. * - * Parameter `mode` manages behaviour when upstream is faster than throttle rate: + * Parameter `mode` manages behavior when upstream is faster than throttle rate: * - [[akka.stream.ThrottleMode.Shaping]] makes pauses before emitting messages to meet throttle rate * - [[akka.stream.ThrottleMode.Enforcing]] fails with exception when upstream is faster than throttle rate. Enforcing * cannot emit elements that cost more than the maximumBurst diff --git a/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala b/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala index 3fa1b8ee32..505b57aa1c 100644 --- a/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala +++ b/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala @@ -103,7 +103,7 @@ private object TimerMessages { object GraphStageLogic { final case class StageActorRefNotInitializedException() - extends RuntimeException("You must first call getStageActor, to initialize the Actors behaviour") + extends RuntimeException("You must first call getStageActor, to initialize the Actors behavior") /** * Input handler that terminates the stage upon receiving completion. @@ -219,7 +219,7 @@ object GraphStageLogic { def ref: ActorRef = functionRef @volatile - private[this] var behaviour = initialReceive + private[this] var behavior = initialReceive /** INTERNAL API */ private[akka] def internalReceive(pack: (ActorRef, Any)): Unit = { @@ -227,18 +227,18 @@ object GraphStageLogic { case Terminated(ref) ⇒ if (functionRef.isWatching(ref)) { functionRef.unwatch(ref) - behaviour(pack) + behavior(pack) } - case _ ⇒ behaviour(pack) + case _ ⇒ behavior(pack) } } /** - * Special `become` allowing to swap the behaviour of this StageActorRef. + * Special `become` allowing to swap the behavior of this StageActorRef. * Unbecome is not available. */ def become(receive: StageActorRef.Receive): Unit = { - behaviour = receive + behavior = receive } def stop(): Unit = cell.removeFunctionRef(functionRef) diff --git a/akka-testkit-typed/src/main/scala/akka/testkit/typed/BehaviourTestkit.scala b/akka-testkit-typed/src/main/scala/akka/testkit/typed/BehaviorTestkit.scala similarity index 99% rename from akka-testkit-typed/src/main/scala/akka/testkit/typed/BehaviourTestkit.scala rename to akka-testkit-typed/src/main/scala/akka/testkit/typed/BehaviorTestkit.scala index b880b33cba..2b8f9678c5 100644 --- a/akka-testkit-typed/src/main/scala/akka/testkit/typed/BehaviourTestkit.scala +++ b/akka-testkit-typed/src/main/scala/akka/testkit/typed/BehaviorTestkit.scala @@ -35,7 +35,7 @@ object Effect { abstract class SpawnedEffect extends Effect @SerialVersionUID(1L) final case class Spawned(behavior: Behavior[_], childName: String, props: Props = Props.empty) extends SpawnedEffect - @SerialVersionUID(1L) final case class SpawnedAnonymous(behaviour: Behavior[_], props: Props = Props.empty) extends SpawnedEffect + @SerialVersionUID(1L) final case class SpawnedAnonymous(behavior: Behavior[_], props: Props = Props.empty) extends SpawnedEffect @SerialVersionUID(1L) final case object SpawnedAdapter extends SpawnedEffect @SerialVersionUID(1L) final case class Stopped(childName: String) extends Effect @SerialVersionUID(1L) final case class Watched[T](other: ActorRef[T]) extends Effect diff --git a/akka-testkit-typed/src/main/scala/akka/testkit/typed/TestKit.scala b/akka-testkit-typed/src/main/scala/akka/testkit/typed/TestKit.scala index a817d63a96..1d3729cc2e 100644 --- a/akka-testkit-typed/src/main/scala/akka/testkit/typed/TestKit.scala +++ b/akka-testkit-typed/src/main/scala/akka/testkit/typed/TestKit.scala @@ -111,9 +111,9 @@ trait TestKitBase { def spawn[T](behavior: Behavior[T], name: String, props: Props): ActorRef[T] = Await.result(system ? (SpawnActor(name, behavior, _, props)), timeoutDuration) - def systemActor[T](behaviour: Behavior[T], name: String): ActorRef[T] = - Await.result(system.systemActorOf(behaviour, name), timeoutDuration) + def systemActor[T](behavior: Behavior[T], name: String): ActorRef[T] = + Await.result(system.systemActorOf(behavior, name), timeoutDuration) - def systemActor[T](behaviour: Behavior[T]): ActorRef[T] = - Await.result(system.systemActorOf(behaviour, childName.next()), timeoutDuration) + def systemActor[T](behavior: Behavior[T]): ActorRef[T] = + Await.result(system.systemActorOf(behavior, childName.next()), timeoutDuration) }