Merge pull request #1304 from akka/wip-2839-dispatcher-deploy-config-patriknw

Add dispatcherId to deployment config, see #2839
This commit is contained in:
Patrik Nordwall 2013-04-08 12:03:43 -07:00
commit 9f45dd90b7
18 changed files with 293 additions and 76 deletions

View file

@ -30,8 +30,8 @@ import java.util.concurrent.ConcurrentLinkedQueue;
//#imports-custom
import org.junit.After;
import org.junit.Before;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import scala.Option;
import scala.concurrent.ExecutionContext;
@ -43,27 +43,37 @@ import akka.testkit.AkkaSpec;
public class DispatcherDocTestBase {
ActorSystem system;
static ActorSystem system;
@Before
public void setUp() {
@BeforeClass
public static void beforeAll() {
system = ActorSystem.create("MySystem",
ConfigFactory.parseString(
DispatcherDocSpec.config()).withFallback(AkkaSpec.testConf()));
}
@After
public void tearDown() {
@AfterClass
public static void afterAll() {
system.shutdown();
system = null;
}
@Test
public void defineDispatcher() {
//#defining-dispatcher
public void defineDispatcherInConfig() {
//#defining-dispatcher-in-config
ActorRef myActor =
system.actorOf(new Props(MyUntypedActor.class),
"myactor");
//#defining-dispatcher-in-config
}
@Test
public void defineDispatcherInCode() {
//#defining-dispatcher-in-code
ActorRef myActor =
system.actorOf(new Props(MyUntypedActor.class).withDispatcher("my-dispatcher"),
"myactor3");
//#defining-dispatcher
//#defining-dispatcher-in-code
}
@Test