Wait on shutdown of extra actor systems in tests. See #3217
This commit is contained in:
parent
3bc661bed6
commit
e00ab533bb
84 changed files with 762 additions and 845 deletions
|
|
@ -16,7 +16,9 @@ import akka.event.LoggingAdapter;
|
|||
//#imports-prio-mailbox
|
||||
import akka.dispatch.PriorityGenerator;
|
||||
import akka.dispatch.UnboundedPriorityMailbox;
|
||||
import akka.testkit.AkkaJUnitActorSystemResource;
|
||||
import akka.testkit.JavaTestKit;
|
||||
import akka.testkit.TestKit;
|
||||
import com.typesafe.config.Config;
|
||||
|
||||
//#imports-prio-mailbox
|
||||
|
|
@ -35,8 +37,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||
//#imports-required-mailbox
|
||||
|
||||
import docs.actor.MyBoundedUntypedActor;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import scala.Option;
|
||||
import scala.concurrent.ExecutionContext;
|
||||
|
|
@ -48,20 +49,13 @@ import akka.testkit.AkkaSpec;
|
|||
|
||||
public class DispatcherDocTestBase {
|
||||
|
||||
static ActorSystem system;
|
||||
@ClassRule
|
||||
public static AkkaJUnitActorSystemResource actorSystemResource =
|
||||
new AkkaJUnitActorSystemResource("DispatcherDocTest", ConfigFactory.parseString(
|
||||
DispatcherDocSpec.javaConfig()).withFallback(ConfigFactory.parseString(
|
||||
DispatcherDocSpec.config())).withFallback(AkkaSpec.testConf()));
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeAll() {
|
||||
system = ActorSystem.create("MySystem",
|
||||
ConfigFactory.parseString(DispatcherDocSpec.javaConfig()).withFallback(
|
||||
ConfigFactory.parseString(DispatcherDocSpec.config())).withFallback(AkkaSpec.testConf()));
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterAll() {
|
||||
system.shutdown();
|
||||
system = null;
|
||||
}
|
||||
private final ActorSystem system = actorSystemResource.getSystem();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue