Skip to content

Commit

Permalink
Remove unused imports in tests (#30265)
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain1653 committed Jun 1, 2021
1 parent a887c63 commit 258bac4
Show file tree
Hide file tree
Showing 42 changed files with 0 additions and 66 deletions.
Expand Up @@ -5,7 +5,6 @@
package akka.event;

import akka.actor.AbstractActor;
import akka.japi.pf.ReceiveBuilder;

import java.util.Collections;
import java.util.LinkedHashMap;
Expand Down
Expand Up @@ -6,7 +6,6 @@

import org.junit.Assert;
import org.junit.Test;
import scala.util.control.ControlThrowable;

public class ThrowablesTest {
@Test
Expand Down
Expand Up @@ -11,7 +11,6 @@
import org.scalatestplus.junit.JUnitSuite;

import akka.actor.AbstractActor.Receive;
import org.scalatestplus.junit.JUnitSuite;

import static org.junit.Assert.*;

Expand Down
Expand Up @@ -21,7 +21,6 @@
import java.util.Arrays;
import java.util.concurrent.*;
import java.time.Duration;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

import static akka.pattern.Patterns.ask;
Expand Down
Expand Up @@ -11,7 +11,6 @@
import akka.actor.typed.ActorRef;
import akka.actor.typed.Behavior;
import akka.actor.typed.Props;
import akka.actor.typed.Signal;
import com.typesafe.config.ConfigFactory;
import org.junit.ClassRule;
import org.junit.Rule;
Expand Down
Expand Up @@ -17,7 +17,6 @@
import akka.actor.typed.Behavior;

import static akka.actor.typed.javadsl.Behaviors.same;
import static org.junit.Assert.assertEquals;

/** Test creating [[MutableActor]]s using [[ReceiveBuilder]] */
public class ReceiveBuilderTest extends JUnitSuite {
Expand Down
Expand Up @@ -16,8 +16,6 @@
import org.junit.Test;
import org.scalatestplus.junit.JUnitSuite;

import java.util.List;

import static org.junit.Assert.assertEquals;

public class RoutersTest extends JUnitSuite {
Expand Down
Expand Up @@ -6,8 +6,6 @@

import akka.util.Unsafe;

import java.util.concurrent.atomic.AtomicReference;

/**
* Lock-free bounded non-blocking multiple-producer single-consumer queue based on the works of:
*
Expand Down
Expand Up @@ -4,7 +4,6 @@

package akka.dispatch.affinity;

import akka.util.Unsafe;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import akka.annotation.InternalApi;
Expand Down
Expand Up @@ -4,8 +4,6 @@

package akka.serialization.jackson;

import com.fasterxml.jackson.annotation.JsonCreator;

import java.time.Duration;
import java.time.Instant;
import java.time.LocalDateTime;
Expand Down
Expand Up @@ -6,9 +6,6 @@

import akka.actor.ActorSystem;

import java.util.HashMap;
import java.util.Map;

import akka.actor.ActorRef;
import akka.actor.Props;

Expand Down
Expand Up @@ -10,7 +10,6 @@
import akka.actor.typed.javadsl.Adapter;
import akka.serialization.SerializerWithStringManifest;

import java.io.NotSerializableException;
import java.nio.charset.StandardCharsets;

public class PingSerializerExampleTest {
Expand Down
Expand Up @@ -6,8 +6,6 @@

import java.util.Optional;

import akka.cluster.UniqueAddress;

// different delta type
public class JavaImplOfDeltaReplicatedData2
extends AbstractDeltaReplicatedData<
Expand Down
2 changes: 0 additions & 2 deletions akka-docs/src/test/java/jdocs/actor/ActorDocTest.java
Expand Up @@ -13,8 +13,6 @@
import static jdocs.actor.Messages.*;
import akka.actor.CoordinatedShutdown;

import akka.Done;

import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.time.Duration;
Expand Down
Expand Up @@ -4,8 +4,6 @@

package jdocs.actor.typed;

import java.util.concurrent.Executor;

import scala.concurrent.ExecutionContextExecutor;

import akka.actor.typed.*;
Expand Down
Expand Up @@ -5,8 +5,6 @@
package jdocs.cluster;

import java.util.concurrent.TimeUnit;
import scala.concurrent.Await;
import scala.concurrent.duration.Duration;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

Expand Down
Expand Up @@ -23,7 +23,6 @@
import org.junit.AfterClass;
import org.junit.BeforeClass;

import akka.cluster.Cluster;
import akka.cluster.ddata.*;
import akka.japi.pf.ReceiveBuilder;

Expand Down
Expand Up @@ -15,7 +15,6 @@
import jdocs.actor.MyActor;
import org.junit.ClassRule;
import org.junit.Test;
import scala.concurrent.ExecutionContext;
import scala.concurrent.ExecutionContextExecutor;

// #imports
Expand Down
Expand Up @@ -5,7 +5,6 @@
package jdocs.pattern;

import akka.actor.*;
import akka.pattern.Backoff;
import akka.pattern.BackoffOpts;
import akka.pattern.BackoffSupervisor;
import akka.testkit.TestActors.EchoActor;
Expand Down
2 changes: 0 additions & 2 deletions akka-docs/src/test/java/jdocs/pattern/SupervisedAskSpec.java
Expand Up @@ -8,8 +8,6 @@
import akka.actor.ActorRefFactory;
import akka.actor.Props;
import akka.actor.AbstractActor;
import akka.util.Timeout;
import scala.concurrent.duration.FiniteDuration;

import java.time.Duration;
import java.util.concurrent.CompletionStage;
Expand Down
Expand Up @@ -10,7 +10,6 @@
import java.util.Set;

import akka.NotUsed;
import akka.actor.typed.javadsl.AbstractBehavior;
import akka.persistence.query.Sequence;
import akka.persistence.query.Offset;
import com.typesafe.config.Config;
Expand Down
Expand Up @@ -5,8 +5,6 @@
package jdocs.persistence.query;

import akka.actor.ActorSystem;
import akka.japi.Pair;
import akka.persistence.PersistentRepr;
import akka.persistence.query.EventEnvelope;
import akka.persistence.query.Offset;
import akka.serialization.Serialization;
Expand All @@ -22,8 +20,6 @@
import java.util.LinkedList;
import java.util.List;

import static java.util.stream.Collectors.toList;

// #events-by-tag-publisher
public class MyEventsByTagSource extends GraphStage<SourceShape<EventEnvelope>> {
public Outlet<EventEnvelope> out = Outlet.create("MyEventByTagSource.out");
Expand Down
1 change: 0 additions & 1 deletion akka-docs/src/test/java/jdocs/stream/FlowErrorDocTest.java
Expand Up @@ -21,7 +21,6 @@
import org.junit.Test;

import akka.actor.ActorSystem;
import akka.stream.Materializer;
import akka.stream.Supervision;
import akka.stream.ActorAttributes;
import akka.japi.function.Function;
Expand Down
Expand Up @@ -4,8 +4,6 @@

package jdocs.stream;

import static org.junit.Assert.assertEquals;

import akka.NotUsed;
import jdocs.AbstractJavaTest;
import akka.testkit.javadsl.TestKit;
Expand Down
Expand Up @@ -9,7 +9,6 @@
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.pattern.Patterns;
import akka.stream.*;
import akka.stream.javadsl.*;
import akka.testkit.javadsl.TestKit;
Expand All @@ -18,7 +17,6 @@
import scala.concurrent.duration.FiniteDuration;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.CompletionStage;

public class FlowStreamRefsDocTest extends AbstractJavaTest {

Expand Down
Expand Up @@ -8,7 +8,6 @@
import akka.actor.ActorSystem;

import akka.stream.javadsl.AsPublisher;
import akka.stream.javadsl.Flow;
import akka.stream.javadsl.Sink;
import akka.stream.javadsl.Source;
// #takeLast-operator-example
Expand All @@ -18,8 +17,6 @@
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

public class SinkDocExamples {

Expand Down
Expand Up @@ -8,7 +8,6 @@
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.japi.pf.PFBuilder;
import akka.stream.Materializer;
import akka.stream.javadsl.Flow;

import akka.NotUsed;
Expand Down Expand Up @@ -50,10 +49,8 @@
// #log

import java.time.Duration;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.function.IntSupplier;

class SourceOrFlow {
private static ActorSystem system = null;
Expand Down
Expand Up @@ -12,8 +12,6 @@
import akka.stream.testkit.TestPublisher;
import akka.stream.testkit.TestSubscriber;
import akka.util.ByteString;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;

import java.time.Duration;
import java.util.concurrent.CompletionStage;
Expand Down
Expand Up @@ -4,7 +4,6 @@

package jdocs.stream.operators.source;

import akka.Done;
import akka.NotUsed;
import akka.actor.ActorSystem;
import akka.japi.Pair;
Expand Down
Expand Up @@ -10,7 +10,6 @@
import akka.japi.Pair;
import akka.stream.javadsl.Source;
import akka.util.ByteString;
import akka.util.Timeout;
import akka.actor.typed.javadsl.AskPattern;

import java.time.Duration;
Expand Down
Expand Up @@ -5,7 +5,6 @@
package jdocs.stream.operators.sourceorflow;

import akka.Done;
import akka.NotUsed;
import akka.actor.ActorSystem;
import akka.japi.Pair;
import akka.stream.FlowMonitor;
Expand All @@ -18,7 +17,6 @@
import java.util.Arrays;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/** */
Expand Down
Expand Up @@ -9,7 +9,6 @@
import akka.stream.javadsl.Source;

import java.util.Arrays;
import java.util.stream.Collectors;

public class Sliding {

Expand Down
Expand Up @@ -6,7 +6,6 @@

import akka.actor.ActorSystem;
import akka.japi.Pair;
import akka.japi.function.Creator;
import akka.japi.function.Function;
import akka.stream.javadsl.Sink;
import akka.stream.javadsl.Source;
Expand Down
Expand Up @@ -14,7 +14,6 @@
import java.util.Optional;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

public class DeviceTest extends JUnitSuite {

Expand Down
Expand Up @@ -7,7 +7,6 @@
import akka.NotUsed;
import akka.actor.ActorSystem;
import akka.testkit.AkkaJUnitActorSystemResource;
import com.typesafe.config.ConfigFactory;
import org.junit.ClassRule;

public class PersistenceQueryTest {
Expand Down
Expand Up @@ -26,7 +26,6 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
Expand Down
Expand Up @@ -4,25 +4,21 @@

package akka.stream.io;

import akka.japi.Pair;
import akka.stream.StreamTest;
import akka.testkit.AkkaJUnitActorSystemResource;
import akka.stream.javadsl.Sink;
import akka.stream.javadsl.Source;
import akka.stream.javadsl.StreamConverters;
import akka.testkit.AkkaSpec;
import akka.stream.testkit.Utils;
import akka.util.ByteString;
import org.junit.ClassRule;
import org.junit.Test;
import scala.concurrent.Future;

import java.io.InputStream;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertTrue;

Expand Down
Expand Up @@ -24,7 +24,6 @@
import org.junit.Test;
import org.reactivestreams.Publisher;
import akka.testkit.AkkaJUnitActorSystemResource;
import scala.Tuple2;

import java.util.*;
import java.util.function.Supplier;
Expand Down
Expand Up @@ -4,7 +4,6 @@

package akka.stream.javadsl;

import akka.NotUsed;
import akka.stream.StreamTest;
import akka.testkit.AkkaJUnitActorSystemResource;
import akka.testkit.AkkaSpec;
Expand Down
Expand Up @@ -22,7 +22,6 @@
import java.time.Duration;
import java.util.Optional;

import static akka.NotUsed.notUsed;
import static org.junit.Assert.assertEquals;

public class RetryFlowTest extends StreamTest {
Expand Down

0 comments on commit 258bac4

Please sign in to comment.