Rename classes containing Akka to Pekko

This commit is contained in:
Matthew de Detrich 2022-12-02 14:49:16 +01:00 committed by Matthew de Detrich
parent 3d93dbcb81
commit 0cb5056ad5
584 changed files with 1950 additions and 1947 deletions

View file

@ -17,15 +17,15 @@ import org.apache.pekko.actor.Props;
import org.apache.pekko.actor.AbstractActor;
import org.apache.pekko.actor.ActorRef;
import org.apache.pekko.actor.ActorSystem;
import org.apache.pekko.testkit.AkkaSpec;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoSpec;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.junit.*;
public class SchedulerDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource("SchedulerDocTest", AkkaSpec.testConf());
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource("SchedulerDocTest", PekkoSpec.testConf());
private final ActorSystem system = actorSystemResource.getSystem();
private ActorRef testActor = system.actorOf(Props.create(MyActor.class));

View file

@ -6,7 +6,7 @@ package jdocs.dispatcher;
import org.apache.pekko.dispatch.ControlMessage;
import org.apache.pekko.dispatch.RequiresMessageQueue;
import org.apache.pekko.testkit.AkkaSpec;
import org.apache.pekko.testkit.PekkoSpec;
import org.apache.pekko.testkit.javadsl.TestKit;
import com.typesafe.config.ConfigFactory;
import docs.dispatcher.DispatcherDocSpec;
@ -29,7 +29,7 @@ import org.apache.pekko.event.LoggingAdapter;
// #imports-prio-mailbox
import org.apache.pekko.dispatch.PriorityGenerator;
import org.apache.pekko.dispatch.UnboundedStablePriorityMailbox;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import com.typesafe.config.Config;
// #imports-prio-mailbox
@ -41,12 +41,12 @@ import com.typesafe.config.Config;
public class DispatcherDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource(
"DispatcherDocTest",
ConfigFactory.parseString(DispatcherDocSpec.javaConfig())
.withFallback(ConfigFactory.parseString(DispatcherDocSpec.config()))
.withFallback(AkkaSpec.testConf()));
.withFallback(PekkoSpec.testConf()));
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -15,7 +15,7 @@ import org.junit.Test;
import org.apache.pekko.actor.ActorSystem;
import org.apache.pekko.actor.ActorRef;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.util.Subclassification;
// #lookup-bus
@ -260,8 +260,8 @@ public class EventBusDocTest extends AbstractJavaTest {
// #actor-bus
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource("EventBusDocTest");
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource("EventBusDocTest");
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -7,8 +7,8 @@ package jdocs.future;
import org.apache.pekko.actor.typed.ActorSystem;
import org.apache.pekko.dispatch.Futures;
import org.apache.pekko.pattern.Patterns;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.AkkaSpec;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoSpec;
import org.apache.pekko.util.Timeout;
import jdocs.AbstractJavaTest;
import org.junit.ClassRule;
@ -27,7 +27,6 @@ import java.util.concurrent.CompletionStage;
import static org.apache.pekko.actor.typed.javadsl.Adapter.toTyped;
import static org.apache.pekko.dispatch.Futures.future;
// #imports
import org.apache.pekko.pattern.Patterns;
// #imports
import static java.util.concurrent.TimeUnit.SECONDS;
@ -35,8 +34,8 @@ import static java.util.concurrent.TimeUnit.SECONDS;
public class FutureDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource("FutureDocTest", AkkaSpec.testConf());
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource("FutureDocTest", PekkoSpec.testConf());
private final ActorSystem<Void> system = toTyped(actorSystemResource.getSystem());

View file

@ -4,7 +4,7 @@
package jdocs.io.japi;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import jdocs.AbstractJavaTest;
import org.apache.pekko.testkit.javadsl.TestKit;
import org.junit.ClassRule;
@ -26,7 +26,7 @@ import org.apache.pekko.io.TcpMessage;
import org.apache.pekko.util.ByteString;
// #imports
import org.apache.pekko.testkit.AkkaSpec;
import org.apache.pekko.testkit.PekkoSpec;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -173,8 +173,8 @@ public class IODocTest extends AbstractJavaTest {
// #client
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource("IODocTest", AkkaSpec.testConf());
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource("IODocTest", PekkoSpec.testConf());
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -4,8 +4,8 @@
package jdocs.remoting;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.AkkaSpec;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoSpec;
import jdocs.AbstractJavaTest;
import org.junit.ClassRule;
import org.junit.Test;
@ -36,15 +36,15 @@ public class RemoteDeploymentDocTest extends AbstractJavaTest {
}
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource(
"RemoteDeploymentDocTest",
ConfigFactory.parseString(
" pekko.actor.provider = remote\n"
+ " pekko.remote.classic.netty.tcp.port = 0\n"
+ " pekko.remote.artery.canonical.port = 0\n"
+ " pekko.remote.use-unsafe-remote-features-outside-cluster = on")
.withFallback(AkkaSpec.testConf()));
.withFallback(PekkoSpec.testConf()));
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -4,7 +4,7 @@
package jdocs.routing;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import jdocs.AbstractJavaTest;
import org.apache.pekko.testkit.javadsl.TestKit;
@ -33,8 +33,8 @@ import org.apache.pekko.routing.ConsistentHashingRouter.ConsistentHashableEnvelo
public class ConsistentHashingRouterDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource("ConsistentHashingRouterDocTest");
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource("ConsistentHashingRouterDocTest");
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -9,7 +9,7 @@ import org.apache.pekko.routing.RoundRobinRoutingLogic;
import org.apache.pekko.routing.Routee;
import org.apache.pekko.routing.RoutingLogic;
import org.apache.pekko.routing.SeveralRoutees;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import jdocs.AbstractJavaTest;
import org.apache.pekko.testkit.javadsl.TestKit;
@ -38,8 +38,8 @@ import java.util.List;
public class CustomRouterDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource(
"CustomRouterDocTest", ConfigFactory.parseString(CustomRouterDocSpec.jconfig()));
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -4,7 +4,7 @@
package jdocs.routing;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import jdocs.AbstractJavaTest;
import org.apache.pekko.testkit.javadsl.TestKit;
@ -67,8 +67,8 @@ import org.apache.pekko.routing.TailChoppingPool;
public class RouterDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource(
"RouterDocTest", ConfigFactory.parseString(docs.routing.RouterDocSpec.config()));
private final ActorSystem system = actorSystemResource.getSystem();

View file

@ -7,7 +7,7 @@ package jdocs.testkit;
import org.apache.pekko.actor.*;
import org.apache.pekko.japi.Creator;
import org.apache.pekko.japi.Function;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.TestProbe;
import org.apache.pekko.testkit.javadsl.TestKit;
import com.typesafe.config.ConfigFactory;
@ -18,8 +18,8 @@ import org.junit.Test;
public class ParentChildTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource(
"TestKitDocTest",
ConfigFactory.parseString(
"pekko.loggers = [org.apache.pekko.testkit.TestEventListener]"));

View file

@ -10,7 +10,7 @@ import org.apache.pekko.pattern.Patterns;
import jdocs.AbstractJavaTest;
import org.junit.Assert;
import org.apache.pekko.japi.JavaPartialFunction;
import org.apache.pekko.testkit.AkkaJUnitActorSystemResource;
import org.apache.pekko.testkit.PekkoJUnitActorSystemResource;
import org.apache.pekko.testkit.CallingThreadDispatcher;
import org.apache.pekko.testkit.TestActor;
import org.apache.pekko.testkit.TestActorRef;
@ -41,8 +41,8 @@ import java.time.Duration;
public class TestKitDocTest extends AbstractJavaTest {
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource =
new AkkaJUnitActorSystemResource(
public static PekkoJUnitActorSystemResource actorSystemResource =
new PekkoJUnitActorSystemResource(
"TestKitDocTest",
ConfigFactory.parseString(
"pekko.loggers = [org.apache.pekko.testkit.TestEventListener]"));