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

@ -4,6 +4,7 @@
package docs.remoting;
import akka.testkit.AkkaJUnitActorSystemResource;
import docs.AbstractJavaTest;
import org.junit.ClassRule;
import org.junit.Test;
@ -21,7 +22,7 @@ import akka.remote.RemoteScope;
import akka.actor.AbstractActor;
public class RemoteDeploymentDocTest {
public class RemoteDeploymentDocTest extends AbstractJavaTest {
public static class SampleActor extends AbstractActor {
@Override

View file

@ -20,6 +20,7 @@ import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import docs.AbstractJavaTest;
import scala.concurrent.duration.Duration;
//#other-imports
@ -29,7 +30,7 @@ import org.junit.*;
* This class is not meant to be run as a test in the test suite, but it
* is set up such that it can be run interactively from within an IDE.
*/
public class QuickStartDocTest {
public class QuickStartDocTest extends AbstractJavaTest {
static
//#create-materializer

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;