This is an automated email from the ASF dual-hosted git repository.

hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new e8b99aa04a Use American English spelling of "behavior" everywhere 
(#2820)
e8b99aa04a is described below

commit e8b99aa04a1eb4c9a5b4a709109525a71afe9389
Author: Philippus Baalman <[email protected]>
AuthorDate: Sat Mar 28 12:26:27 2026 +0100

    Use American English spelling of "behavior" everywhere (#2820)
    
    * Use American English spelling of "behavior" everywhere
    
    * Fix typo intecept -> intercept
    
    * Exclude renamed inteceptBehaviour method
---
 .../renamed-methods.excludes                         |  19 +++++++++++++++++++
 .../testkit/typed/internal/BehaviorTestKitImpl.scala |   4 ++--
 ...-code.png => dispatcher-behavior-on-bad-code.png} | Bin
 ...code.png => dispatcher-behavior-on-good-code.png} | Bin
 docs/src/main/paradox/typed/dispatchers.md           |   4 ++--
 .../testkit/query/CurrentEventsBySlicesSpec.scala    |   8 ++++----
 .../testkit/query/CurrentEventsByTagSpec.scala       |   4 ++--
 .../testkit/query/EventsByPersistenceIdSpec.scala    |   4 ++--
 .../testkit/query/EventsBySliceSpec.scala            |   4 ++--
 .../persistence/testkit/query/EventsByTagSpec.scala  |   4 ++--
 10 files changed, 35 insertions(+), 16 deletions(-)

diff --git 
a/actor-testkit-typed/src/main/mima-filters/2.0.x.backwards.excludes/renamed-methods.excludes
 
b/actor-testkit-typed/src/main/mima-filters/2.0.x.backwards.excludes/renamed-methods.excludes
new file mode 100644
index 0000000000..c9a5eb2b66
--- /dev/null
+++ 
b/actor-testkit-typed/src/main/mima-filters/2.0.x.backwards.excludes/renamed-methods.excludes
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# method was renamed to interceptBehavior
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.actor.testkit.typed.internal.BehaviorTestKitImpl#Interceptor.inteceptBehaviour")
diff --git 
a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
 
b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
index 941b14ecf4..624e47351b 100644
--- 
a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
+++ 
b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
@@ -173,7 +173,7 @@ private[pekko] final class BehaviorTestKitImpl[T](
       context.setCurrentActorThread()
       try {
         // we need this to handle message adapters related messages
-        val intercepted = 
BehaviorTestKitImpl.Interceptor.inteceptBehaviour(current, context)
+        val intercepted = 
BehaviorTestKitImpl.Interceptor.interceptBehavior(current, context)
         currentUncanonical = Behavior.interpretMessage(intercepted, context, 
message)
         // notice we pass current and not intercepted, this way Behaviors.same 
will be resolved to current which will be intercepted again on the next message
         // otherwise we would have risked intercepting an already intercepted 
behavior (or would have had to explicitly check if the current behavior is 
already intercepted by us)
@@ -238,7 +238,7 @@ private[pekko] object BehaviorTestKitImpl {
       }
     }
 
-    def inteceptBehaviour[T](behavior: Behavior[T], ctx: 
TypedActorContext[T]): Behavior[T] =
+    def interceptBehavior[T](behavior: Behavior[T], ctx: 
TypedActorContext[T]): Behavior[T] =
       Behavior
         .start(Behaviors.intercept { () =>
             this.asInstanceOf[BehaviorInterceptor[Any, T]]
diff --git a/docs/src/main/paradox/images/dispatcher-behaviour-on-bad-code.png 
b/docs/src/main/paradox/images/dispatcher-behavior-on-bad-code.png
similarity index 100%
rename from docs/src/main/paradox/images/dispatcher-behaviour-on-bad-code.png
rename to docs/src/main/paradox/images/dispatcher-behavior-on-bad-code.png
diff --git a/docs/src/main/paradox/images/dispatcher-behaviour-on-good-code.png 
b/docs/src/main/paradox/images/dispatcher-behavior-on-good-code.png
similarity index 100%
rename from docs/src/main/paradox/images/dispatcher-behaviour-on-good-code.png
rename to docs/src/main/paradox/images/dispatcher-behavior-on-good-code.png
diff --git a/docs/src/main/paradox/typed/dispatchers.md 
b/docs/src/main/paradox/typed/dispatchers.md
index 8f811ec81f..c1506af836 100644
--- a/docs/src/main/paradox/typed/dispatchers.md
+++ b/docs/src/main/paradox/typed/dispatchers.md
@@ -244,7 +244,7 @@ The orange portion of the thread shows that it is idle. 
Idle threads are fine -
 they're ready to accept new work. However, a large number of turquoise 
(blocked, or sleeping as in our example) threads
 leads to thread starvation.
 
-![dispatcher-behaviour-on-bad-code.png](../images/dispatcher-behaviour-on-bad-code.png)
+![dispatcher-behavior-on-bad-code.png](../images/dispatcher-behavior-on-bad-code.png)
 
 In the above example we put the code under load by sending hundreds of 
messages to blocking actors
 which causes threads of the default dispatcher to be blocked.
@@ -316,7 +316,7 @@ Java
 
 The thread pool behavior is shown in the below diagram.
 
-![dispatcher-behaviour-on-good-code.png](../images/dispatcher-behaviour-on-good-code.png)
+![dispatcher-behavior-on-good-code.png](../images/dispatcher-behavior-on-good-code.png)
 
 Messages sent to 
@scala[`SeparateDispatcherFutureActor`]@java[`SeparateDispatcherCompletionStageActor`]
 and `PrintActor` are handled by the default dispatcher - the
 green lines, which represent the actual execution.
diff --git 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala
 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala
index ab40bf9412..ad4482667f 100644
--- 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala
+++ 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala
@@ -22,7 +22,7 @@ import pekko.persistence.Persistence
 import pekko.persistence.query.NoOffset
 import pekko.persistence.query.PersistenceQuery
 import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.Command
-import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.testBehaviour
+import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.testBehavior
 import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal
 import pekko.stream.scaladsl.Sink
 
@@ -40,7 +40,7 @@ class CurrentEventsBySlicesSpec
 
   def setup(persistenceId: String): ActorRef[Command] = {
     val probe = createTestProbe[Done]()
-    val ref = spawn(testBehaviour(persistenceId))
+    val ref = spawn(testBehavior(persistenceId))
     ref ! Command(s"$persistenceId-1", probe.ref)
     ref ! Command(s"$persistenceId-2", probe.ref)
     ref ! Command(s"$persistenceId-3", probe.ref)
@@ -54,8 +54,8 @@ class CurrentEventsBySlicesSpec
 
     "find eventsBySlices ordered by insert time" in {
       val probe = createTestProbe[Done]()
-      val ref1 = spawn(testBehaviour("Test|pid-1"))
-      val ref2 = spawn(testBehaviour("Test|pid-2"))
+      val ref1 = spawn(testBehavior("Test|pid-1"))
+      val ref2 = spawn(testBehavior("Test|pid-2"))
       ref1 ! Command("evt-1", probe.ref)
       ref1 ! Command("evt-2", probe.ref)
       ref1 ! Command("evt-3", probe.ref)
diff --git 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala
 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala
index 26ab4c83f9..120d534acf 100644
--- 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala
+++ 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala
@@ -21,7 +21,7 @@ import pekko.actor.typed.ActorRef
 import pekko.persistence.query.NoOffset
 import pekko.persistence.query.PersistenceQuery
 import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.Command
-import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.testBehaviour
+import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.testBehavior
 import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal
 import pekko.stream.scaladsl.Sink
 
@@ -39,7 +39,7 @@ class CurrentEventsByTagSpec
 
   def setupEmpty(persistenceId: String): ActorRef[Command] = {
     spawn(
-      testBehaviour(persistenceId).withTagger(evt =>
+      testBehavior(persistenceId).withTagger(evt =>
         if (evt.indexOf('-') > 0) Set(evt.split('-')(1), "all")
         else Set("all")))
   }
diff --git 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala
 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala
index 644de4f053..2865c65385 100644
--- 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala
+++ 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala
@@ -41,7 +41,7 @@ object EventsByPersistenceIdSpec {
   case class Command(evt: String, ack: ActorRef[Done])
   case class State()
 
-  def testBehaviour(persistenceId: String) = {
+  def testBehavior(persistenceId: String) = {
     EventSourcedBehavior[Command, String, State](
       PersistenceId.ofUniqueId(persistenceId),
       State(),
@@ -78,7 +78,7 @@ class EventsByPersistenceIdSpec
   }
 
   def setupEmpty(persistenceId: String): ActorRef[Command] = {
-    spawn(testBehaviour(persistenceId))
+    spawn(testBehavior(persistenceId))
   }
 
   "Persistent test kit live query EventsByPersistenceId" must {
diff --git 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala
 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala
index f3363b3c49..625d10254a 100644
--- 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala
+++ 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala
@@ -59,7 +59,7 @@ object EventsBySliceSpec {
   }
   case class State()
 
-  def testBehaviour(persistenceId: String) = {
+  def testBehavior(persistenceId: String) = {
     EventSourcedBehavior[Command, String, State](
       PersistenceId.ofUniqueId(makeFullPersistenceId(persistenceId)),
       State(),
@@ -117,7 +117,7 @@ class EventsBySliceSpec
   }
 
   def setupEmpty(persistenceId: String): ActorRef[Command] = {
-    spawn(testBehaviour(persistenceId))
+    spawn(testBehavior(persistenceId))
   }
 
   private lazy val persistence = Persistence(system)
diff --git 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala
 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala
index 99f610f7e6..5e5959bd80 100644
--- 
a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala
+++ 
b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala
@@ -57,7 +57,7 @@ object EventsByTagSpec {
   }
   case class State()
 
-  def testBehaviour(persistenceId: String, tags: Set[String]) = {
+  def testBehavior(persistenceId: String, tags: Set[String]) = {
     EventSourcedBehavior[Command, String, State](
       PersistenceId.ofUniqueId(persistenceId),
       State(),
@@ -111,7 +111,7 @@ class EventsByTagSpec
   }
 
   def setupEmpty(persistenceId: String, tags: Set[String]): ActorRef[Command] 
= {
-    spawn(testBehaviour(persistenceId, tags))
+    spawn(testBehavior(persistenceId, tags))
   }
 
   "Persistent test kit live query EventsByTag" must {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to