Commit graph

103 commits

Author SHA1 Message Date
Roland
cd4927dd04 make TestKitBase.testActor strict, see #2514 2012-09-17 21:24:28 +02:00
Roland
79c9cdd98e unbreak the akka-actor-nightly build 2012-09-07 16:56:42 +02:00
Viktor Klang
e462784c09 #2450 - Fixing expectMsgAllConformingOf and expectMsgAllClassOf + adding more tests 2012-08-30 11:59:56 +02:00
Roland
e3ac633649 add throws clauses to Java APIs 2012-08-09 18:15:38 +02:00
Roland
bf49b75d5e switch to AbstractPartialFunction, see #2357 2012-08-09 17:10:43 +02:00
Roland
0f923c0978 (re)move akka.japi.*PartialFunction and optimize TestKit, see #2357 2012-08-08 16:05:48 +02:00
Viktor Klang
d3542f8582 #2341 - enabling -deprecation in AkkaBuild and subsequently fixing tons of deprecation warnings 2012-07-24 12:12:06 +02:00
Viktor Klang
ac5b5de90a Merging in master, huge work trying to get things to compile, tests not green at this stage 2012-07-06 17:04:04 +02:00
Roland
cde7b29a33 Merge branch 'wip-1952-testkit-java-∂π' 2012-07-04 17:38:20 +02:00
Roland
d7bed79730 add JavaTestKit, see #1952
- it’s a completely new-written thing in pure Java, so that “protected”
  modifiers actually work and no ghost errors appear wrt. inheriting
  from PartialFunction or similar
- it also features integration with the EventFilter
- all closure-based constructs are modeled as inner classes of the
  JavaTestKit, where the user needs to override a single method which
  will then be executed
2012-06-29 14:42:11 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Roland
be74eb835b stashin commit so Iulian can play with it 2012-06-25 19:30:13 +02:00
Viktor Klang
7f429ed63e Merge with master 2012-06-25 12:55:25 +02:00
Roland
3c15dcdfb8 Merge branch 'wip-2031-sync-actorOf-3.0-∂π'
Some tests fail ATM, but I prefer not to hide semantic fixes within
merge commits.
2012-06-25 11:12:08 +02:00
Viktor Klang
543737a933 Updating to scalatest 2.10.0-M4-x-B2 and adding feature imports 2012-06-21 16:09:14 +02:00
Björn Antonsson
4a56f195fc Merge branch 'master' into wip-2218-test-conductor-barrier-timeouts 2012-06-19 15:11:50 +02:00
Roland
b60210362e make system.actorOf() non-blocking (and working), see #2031
- introducing RepointableActorRef, which starts out with an
  UnstartedActorCell which can cheaply be created; the Supervise()
  message will trigger child.activate() in the supervisor, which means
  that the actual creation (now with normal ActorCell) happens exactly
  in the right place and with the right semantics. Messages which were
  enqueued to the dummy cell are transferred atomically into the
  ActorCell (using normal .tell()), so message sends keep working
  exactly as they used to
- this enables getting rid of the brittle synchronization around
  RoutedActorRef by replacing that one with a RepointableActorRef
  subclass which creates RoutedActorCells upon activate(), with the nice
  benefit that there is no hurry then to get it right because the new
  cell is constructed “on the side”

misc fixes:

- InvalidMessageException is now actually enforced when trying to send
  “null”
- Mailboxes may be created without having an ActorCell, which can come
  in handy later, because the cell is only needed when this mailbox is
  going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
  which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
2012-06-13 17:57:56 +02:00
Björn Antonsson
463e62926e Make test conductor barriers fail for all on timeouts and care about within() blocks. See #2218 2012-06-13 13:52:58 +02:00
Viktor Klang
d3e2f529f3 Removing a pointless import and the only Scala return statement in our codebase 2012-06-13 11:53:27 +02:00
Roland
14769828d9 Merge branch 'wip-2122-actorsystem-in-test-∂π' 2012-06-04 21:21:36 +02:00
Roland
b840624b78 warn against using TestKitBase trait 2012-06-04 19:28:58 +02:00
Roland
df479a0bf0 add back TestProbe.reply, see #2172 2012-06-04 11:29:56 +02:00
Roland
de59444795 offer TestKitBase trait, see #2174 2012-06-04 10:03:41 +02:00
Roland
9105720809 properly take boxing into account when expecting messages by type or class 2012-05-15 21:12:46 +02:00
Roland
57b1a8fc08 rewrite ZeroMQ poll loop
- do not use futures, do not use different executors
- only use Poll token; schedule OR poller.poll in case of no message
  available, depending on the sign of the poll timeout
- restructure receive method to avoid PartialFunction.orElse overhead
2012-04-02 18:09:09 +02:00
Roland
84e475c1e0 fix TestKit class scaladoc 2012-03-26 12:12:29 +02:00
Roland
ec15fd6cfd add TestKit.setAutoPilot, see #1807 2012-02-19 00:09:04 +01:00
Patrik Nordwall
e017aeef08 Replace akka.actor.timeout with specfic settings. See #1808
* ActorTimeout (akka.actor.timeout) was used to all sorts of things.
* TestKit default-timeout
* TypedActor timeout for non void methods
* Transactor coordinated-timeout
* ZeroMQ new-socket-timeout
* And in various tests
2012-02-10 16:07:17 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Viktor Klang
1756b6aa54 FIXMEs, young grasshopper 2012-01-16 20:18:08 +01:00
Patrik Nordwall
df260f8939 Improvements based on feedback. See #1458 2011-12-21 19:02:06 +01:00
Patrik Nordwall
f772b0183e Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
2011-12-21 13:27:50 +01:00
Viktor Klang
47c1be6b42 Adding FIXME comments to unprotected casts to ActorSystemImpl (4 places) 2011-12-19 14:04:32 +01:00
Viktor Klang
e959493e12 Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens 2011-12-14 17:36:39 +01:00
Roland
92e7693203 Merge remote-tracking branch 'origin/master' into wip-remote-supervision-rk 2011-12-13 16:59:43 +01:00
Roland
040f3076bc add watch/unwatch for testActor to TestKit 2011-12-13 15:41:00 +01:00
Jonas Bonér
c9b787f029 Removed all 'actorOf' methods that does not take a 'Props', and changed all callers to use 'actorOf(Props(..))'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-13 14:09:40 +01:00
Viktor Klang
b32cbbc764 Renaming Block to Await, renaming sync to result, renaming on to ready, Await.ready and Await.result looks and reads well 2011-12-12 22:50:08 +01:00
Patrik Nordwall
bfa14a692c Merge branch 'master' into wip-1377-context-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorCell.scala
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-actor/src/main/scala/akka/event/EventStream.scala
	akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java
	akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala
2011-12-07 07:49:34 +01:00
Patrik Nordwall
3204269f6a Cleanup of methods in Actor and ActorContext trait. See #1377
* Added JavaActorContext, UntypedActor.getContext
* implicit val context in Actor needs to be implicit to support forward,
it would be nice if it wasn't implicit because now I can't override context
in UntypedActor
* Removed implicit def system in Actor
* Removed implicit def defaultTimeout in Actor
* Removed receiveTimeout, children, dispatcher, become, unbecome, watch,
unwatch in Actor
* Removed corresponding as above from UntypedActor
* Removed implicit from dispatcher in ActorSystem
* Removed implicit def timeout in TypedActor
* Changed receiveTimeout to use Duration (in api)
* Changed many tests and samples to match new api
2011-12-06 09:50:16 +01:00
Roland
c0c9487451 make testActor spew out uncollected messages after test end
(so you don’t need expectNoMsg after tests)
2011-12-05 19:03:01 +01:00
Patrik Nordwall
b488d70f54 Fixed several memory and thread leaks. See #1404
* Dispatchers need Scheduler to be able to shutdown themselves. Stop Scheduler after dispatchers.
* Changed CallingThreadDispatcher global object to Extension, since it holds map of references to mailboxes. Will be GC:ed when system is GC:ed.
* Made testActor lazy, since it is not used in all tests, and it creates CallingThreadDispatcher.
* Activated some java tests that were not running
* Many tests were not stopping created ActorSystems. VERY IMPORTANT TO STOP ActorSystem in tests. Use AkkaSpec as much as possible.
* Used profiler to verify (and find) dangling ActorSystemImpl and threads from dispatchers.
* FutureSpec creates ForkJoinPool threads that are not cleared, but number of threads don't grow so it's not a problem.
2011-12-02 09:48:21 +01:00
Viktor Klang
bf20f3fa44 Reinterpretation of Extensions 2011-11-24 18:53:18 +01:00
Patrik Nordwall
179399296e Modularize configuration. See #1361
* Split config reference to one for each module/extension.
* Adjusted signature of registerExtension to avoid race of extension init
* Moved Duration.dilated to testkit
* TestKitExtension
* RemoteExtension
* SerializationExtension
* Durable mailboxes extensions
* Fixed broken serialization bindings and added test
* Updated configuration documentation
* System properties akka.remote.hostname akka.remote.port replaced with akka.remote.server.hostname and akka.remote.server.port
* Adjustments of ActorSystem initialization. Still don't like the two-phase constructor/init flow. Very fragile for changes.

Review fixes. SerializationExtension
2011-11-23 20:31:58 +01:00
Roland
6a8e516b6c change source tag in log events from AnyRef to String
- ensure that no “complex” things are attached to a LogEvent (think
  serialization)
- ensure no escaping the “this” reference via LoggingBus during
  constructors (e.g. ActorSystem)
- change it so that
    + Actor/ActorRef are represented by their address
    + Class[_] by simpleName
    + String by itself
- this means that people need to think a little more while deciding how
  “this” should look like in logging (which I think is a good thing)
2011-11-18 12:24:04 +01:00
Viktor Klang
80d766b07b Adding DispatcherPrerequisites to hold the common dependencies that a dispatcher needs to be created 2011-11-17 16:09:18 +01:00
Roland
d381b72061 rename app: ActorSystem to system everywhere 2011-11-17 12:36:35 +01:00
Roland
c31695bef4 rename AkkaConfig to Settings 2011-11-17 12:11:55 +01:00
Roland
648661c548 clean up initialization of ActorSystem, fixes #1050
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
  and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
  actorOf() and friends need such an argument, which must be provided to
  the ActorRefProvider by the ActorRefFactory implementation
2011-11-16 17:18:36 +01:00
Roland
f2bf27b4de remove app argument from Dispatchers
(cascading into all dispatchers, mailboxes, other stuff; had to move
deadLetter stuff to ActorSystem again and split its initialization due
to cyclic dependency)
2011-11-14 16:03:26 +01:00