- apply EventFilters so that at least on my machine no expected messages
are printed
- add new test config settings to akka-reference.conf
- set default for loglevel to WARNING
- print out timeout values in case of various timeouts if they occur
- introduce Duration.Undefined and use that to initialize TestKit.end
(also use in places which abused Duration.MinusInf for similar
purposes)
- TestKit.remaining now returns AkkaConfig.SingleExpectDefaultTimeout if
end == Duration.Undefined
This will hopefully catch most of the cases where Jenkins previously
aborted the build after 60min.
BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
- fix memory visibility issue with occurrences counter
- add non-throwing awaitCond and use that for better error reporting
- move occurrence book-keeping (side-effect) out of PF guard, was
evaluated multiple times (of course!)
- apply in cases where EventFilter.custom was used (one legitimate use
case remains)
- make normal filters available for all four log levels
- allow filtering for
+ exact and complete message
+ start of message
+ regular expression
- keep count of occurrences if requested and verify correct count at end
of filterEvents/filterExceptions block
- remove akka.testkit.Testing (sleepFor replaced by Duration.dilated.sleep)
- remove Duration.timeFactor (needs config -> AkkaApplication)
- TestLatch needs config -> AkkaApplication (was forgotten because used
directly System.getProperty)
- lots of scaladoc for TestEventListener infrastructure
- revise timings to make them more robust (granularity changed in
general from 100ms to 500ms)
- make one test more deterministic by awaiting context.hasMessages,
which has been added for this purpose; is the same kind of “non-racy”
as isShutdown
- add static version of TestKit.awaitCond (checked that it does not
conflict, even when “import TestKit._” is used; seems like imports are
not even searched if the symbol is found locally)
most tests passing, everything compiling, but docs not updated and nasty
thread-leak preventing me from running the whole test-suite (which is
the reason for this commit: I want to chase down that one first).
- the app.mainbus is classified by Class[_] (currently lookup, will
possibly change to sub-class-aware) and accepts AnyRef messages
- LoggingBus handles akka.event-handlers from config specially:
+ start them as system services, supervised by SystemGuardian
+ keep their subscriptions in sync when logLevel_= is called
+ send them InitializeLogger(bus) message before subscribing them (so
they can register for extras like Mute/UnMute)
- two-phased start-up: first phase with actor-less stdout logging, then
subscription of config loggers, then remove stdout logger (logLevels
configurable separately)
- MainBusReaper watches registered receivers and unsubscribes them upon
death (started in phase 2)
- logger factory on Logging object, needs app/bus and log source;
default instance in app.log
- every actor is now supervised, where the root of the tree is
app.guardian, which has its supervisor field set to a special ActorRef
obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name
is meant to indicate that this ref is outside of the universe, cf.
Michio Kaku)
- changed all tests to obtain specially supervised children (i.e. not
top-level) via (supervisor ? Props).as[ActorRef].get
- add private[akka] ScalaActorRef.sendSystemMessage for sending
Supervise()
- everything routing or remote is broken wrt. supervision, as that was
not “properly” implemented to begin with, will be tackled after
app/supervision/eventbus/AkkaSpec are stabilized enough
- add Logging trait for nicer interface
- add EventHandlerLogging class for offering the nice interface from
app.log
- add eventHandler instance to app and use that for all internal logging
(this means that some places (dispatchers, remoting) were infiltrated
by app just to do logging, but I think we'll need app in there soon
enough for other reasons)
- remove global Config
- pull everything which depended on it into new AkkaApplication
- leave EventHandler alone for the moment: that evil sucker gets his
very own AkkaApplication("akka-reference.conf") until we have settled
on an acceptable logging API without globals
- make akka-actor and akka-testkit compile
- TestKit uses implicit AkkaApplication passing for maximum convenience
- Actor object nearly completely removed, actor creation possible via
ActorRefFactory interface which is implemented by AkkaApplication and
ActorContext
- serialization of ActorRef is probably broken, and so is the reflective
RemoteSupport (now needs AkkaApplication constructor arg)
- everything else is still broken, including akka-actor-tests, so this
is of course all not runtime-tested
- removed SelfActorRef
- added an ActorContext interface that provides a view into ActorInstance
- the ActorInstance (as ActorContext) gets injected into the Actor
- moved self methods like sender and reply directly to the Actor
background: PartialFunction literals don't work if they encounter
overload resolution, because scalac then complains about not fully
defined argument types.
- move akka.testing from akka-actor-tests to akka-testkit/akka.testkit
- move timeFactor from Testing to Duration and add .dilated method
- add Duration.{min, max}
- add TestKit.awaitCond
- use Duration.dilated on all max Durations in TestKit
- fix up loose ends
Conflicts:
akka-actor-tests/src/main/scala/akka/testing/Testing.scala
akka-actor-tests/src/test/scala/akka/actor/actor/ActorRefSpec.scala
akka-actor-tests/src/test/scala/akka/actor/supervisor/SupervisorSpec.scala
akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala
akka-actor/src/main/scala/akka/util/Duration.scala
akka-remote/src/test/scala/remote/RemoteTypedActorSpec.scala
akka-testkit/src/main/scala/akka/testkit/TestBarrier.scala
akka-testkit/src/main/scala/akka/testkit/TestKit.scala
akka-typed-actor/src/test/scala/actor/typed-actor/TypedActorLifecycleSpec.scala