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
|
|
@ -3,14 +3,10 @@
|
|||
*/
|
||||
package akka.actor;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import akka.testkit.AkkaJUnitActorSystemResource;
|
||||
import org.junit.*;
|
||||
import akka.testkit.AkkaSpec;
|
||||
|
||||
import com.typesafe.config.ConfigFactory;
|
||||
import com.typesafe.config.Config;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
|
@ -47,20 +43,13 @@ public class JavaExtension {
|
|||
}
|
||||
}
|
||||
|
||||
private static ActorSystem system;
|
||||
@ClassRule
|
||||
public static AkkaJUnitActorSystemResource actorSystemResource =
|
||||
new AkkaJUnitActorSystemResource("JavaExtension",
|
||||
ConfigFactory.parseString("akka.extensions = [ \"akka.actor.JavaExtension$TestExtensionId\" ]")
|
||||
.withFallback(AkkaSpec.testConf()));
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeAll() {
|
||||
Config c = ConfigFactory.parseString("akka.extensions = [ \"akka.actor.JavaExtension$TestExtensionId\" ]")
|
||||
.withFallback(AkkaSpec.testConf());
|
||||
system = ActorSystem.create("JavaExtension", c);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterAll() {
|
||||
system.shutdown();
|
||||
system = null;
|
||||
}
|
||||
private final ActorSystem system = actorSystemResource.getSystem();
|
||||
|
||||
@Test
|
||||
public void mustBeAccessible() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue