Re-enable some Java tests not actually being run #22439

This commit is contained in:
Johan Andrén 2017-03-02 11:55:03 +01:00 committed by Konrad `ktoso` Malawski
parent cdad50a034
commit 0de28daefc
5 changed files with 12 additions and 6 deletions

View file

@ -14,10 +14,11 @@ import akka.testkit.TestProbe;
import com.typesafe.config.ConfigFactory;
import docs.AbstractJavaTest;
import org.junit.ClassRule;
import org.junit.Test;
public class ParentChildTest {
public class ParentChildTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource("TestKitDocTest",

View file

@ -6,6 +6,8 @@ package docs.testkit;
import static org.junit.Assert.*;
import akka.testkit.*;
import docs.AbstractJavaTest;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Test;
@ -24,7 +26,7 @@ import scala.concurrent.Future;
import akka.testkit.TestActor.AutoPilot;
import scala.concurrent.duration.Duration;
public class TestKitDocTest {
public class TestKitDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
@ -76,7 +78,7 @@ public class TestKitDocTest {
final TestActorRef<MyActor> ref = TestActorRef.create(system, props, "myActor");
try {
ref.receive(new Exception("expected"));
fail("expected an exception to be thrown");
Assert.fail("expected an exception to be thrown");
} catch (Exception e) {
assertEquals("expected", e.getMessage());
}

View file

@ -4,6 +4,7 @@
package docs.testkit;
//#fullsample
import docs.AbstractJavaTest;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@ -16,7 +17,7 @@ import akka.actor.AbstractActor;
import akka.testkit.JavaTestKit;
import scala.concurrent.duration.Duration;
public class TestKitSampleTest {
public class TestKitSampleTest extends AbstractJavaTest {
public static class SomeActor extends AbstractActor {
ActorRef target = null;