diff --git a/.scalafix.conf b/.scalafix.conf index 5dbe0328dc7..65f62a92dc1 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -1,7 +1,7 @@ // .scalafix.conf rules = [ RemoveUnused - SortImports + OrganizeImports ExplicitResultTypes fix.scala213.DottyMigrate // fix.scala213.NullaryOverride @@ -14,7 +14,7 @@ ExplicitResultTypes { ExplicitImplicitTypes.symbolReplacements { "scala/concurrent/ExecutionContextExecutor#" = "scala/concurrent/ExecutionContext#" } -RemoveUnused.imports = true +RemoveUnused.imports = false RemoveUnused.privates = false RemoveUnused.locals = false @@ -28,7 +28,10 @@ ignored-files = [ "SourceSpec.scala", "StatsSampleSpec.scala", "ActorFlowSpec.scala", - "FSMTimingSpec.scala" + "FSMTimingSpec.scala", + "ThreadPoolVirtualThreadSpec.scala", + "ForkJoinPoolVirtualThreadSpec.scala", + "VirtualThreadPoolDispatcherSpec.scala" ] //ignored packages @@ -38,17 +41,26 @@ ignored-packages = [ "jdoc" ] -//sort imports, see https://github.com/NeQuissimus/sort-imports -SortImports.asciiSort = false -SortImports.blocks = [ - "re:javax?\\.", - "scala.", - "*", - "com.sun." - "re:^(org\\.apache\\.pekko|pekko\\.)\\w*" - "org.reactivestreams." - "io.netty." - "org.scalatest." - "org.slf4j." - "com.typesafe." -] +OrganizeImports { + blankLines = Auto + coalesceToWildcardImportThreshold = null + expandRelative = false + groupedImports = Keep + groups = [ + "re:javax?\\.", + "scala.", + "com.sun.", + "re:org\\.apache\\.pekko", + "pekko.", + "org.reactivestreams.", + "io.netty.", + "org.scalatest.", + "org.slf4j.", + "com.typesafe.", + "*" + ] + importSelectorsOrder = Ascii + importsOrder = Ascii + removeUnused = true + targetDialect = StandardLayout +} diff --git a/.scalafmt.conf b/.scalafmt.conf index 8afbc99e932..e10a7fe925b 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -7,7 +7,7 @@ docstrings.wrap = false indentOperator.preset = spray maxColumn = 120 lineEndings = preserve -rewrite.rules = [RedundantParens, SortImports, AvoidInfix] +rewrite.rules = [RedundantParens, AvoidInfix] indentOperator.exemptScope = all align.preset = some align.tokens."+" = [ diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala index 836156e042e..b958d3d3e73 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala @@ -18,12 +18,13 @@ import java.util.Optional import scala.jdk.OptionConverters._ import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.util.OptionVal import org.slf4j.Marker import org.slf4j.event.Level +import pekko.annotation.InternalApi +import pekko.util.OptionVal + /** * Representation of a Log Event issued by a [[pekko.actor.typed.Behavior]] * when testing with [[pekko.actor.testkit.typed.scaladsl.BehaviorTestKit]] diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala index 350639e4c88..23b924d29da 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala @@ -22,6 +22,7 @@ import scala.jdk.FunctionConverters._ import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor.typed.{ ActorRef, Behavior, Props, RecipientRef } import pekko.annotation.{ DoNotInherit, InternalApi } diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/FishingOutcome.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/FishingOutcome.scala index 1fff22037f3..16387e17228 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/FishingOutcome.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/FishingOutcome.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.testkit.typed import org.apache.pekko + import pekko.annotation.DoNotInherit /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala index 6c043736583..086de4ed67b 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala @@ -17,13 +17,14 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.actor.typed.Extension import pekko.actor.typed.ExtensionId import pekko.util.Timeout -import com.typesafe.config.Config - object TestKitSettings { /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala index 71882d690d6..17d78f76765 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala @@ -20,6 +20,12 @@ import scala.concurrent._ import scala.jdk.FutureConverters._ import org.apache.pekko + +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.{ actor => classic } import pekko.Done import pekko.actor.{ ActorPath, ActorRefProvider, Address, ReflectiveDynamicAccess } @@ -38,11 +44,6 @@ import pekko.actor.typed.internal.InternalRecipientRef import pekko.actor.typed.receptionist.Receptionist import pekko.annotation.InternalApi -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -import com.typesafe.config.{ Config, ConfigFactory } - /** * INTERNAL API */ diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala index 624e47351b4..1b928ec7194 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala @@ -23,6 +23,7 @@ import scala.util.control.Exception.Catcher import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ActorPath import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect } import pekko.actor.testkit.typed.Effect._ diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/CapturingAppender.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/CapturingAppender.scala index 5afa793ace6..9131f1d1e86 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/CapturingAppender.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/CapturingAppender.scala @@ -13,10 +13,11 @@ package org.apache.pekko.actor.testkit.typed.internal +import org.apache.pekko + import ch.qos.logback.classic.spi.ILoggingEvent import ch.qos.logback.core.AppenderBase -import org.apache.pekko import pekko.annotation.InternalApi /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/DebugRef.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/DebugRef.scala index 8593e4ec560..b3bdfac113f 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/DebugRef.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/DebugRef.scala @@ -18,6 +18,7 @@ import java.util.concurrent.ConcurrentLinkedQueue import scala.annotation.tailrec import org.apache.pekko + import pekko.{ actor => classic } import pekko.actor.ActorRefProvider import pekko.actor.typed.ActorRef diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala index 0c3df990081..376352f9403 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala @@ -23,6 +23,7 @@ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ ActorPath, Cancellable } import pekko.actor.testkit.typed.Effect import pekko.actor.testkit.typed.Effect._ diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala index 66a3727e99b..59ff5859fd1 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala @@ -20,6 +20,9 @@ import scala.reflect.ClassTag import scala.util.matching.Regex import org.apache.pekko + +import org.slf4j.event.Level + import pekko.actor.testkit.typed.LoggingEvent import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.javadsl @@ -28,8 +31,6 @@ import pekko.actor.typed.ActorSystem import pekko.annotation.InternalApi import pekko.testkit.TestKit -import org.slf4j.event.Level - /** * INTERNAL API */ diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala index ca892ae39d6..6016cd955d5 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala @@ -21,6 +21,10 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import org.slf4j.helpers.{ MessageFormatter, SubstituteLoggerFactory } +import org.slf4j.{ Logger, Marker } + import pekko.{ actor => classic } import pekko.actor.{ ActorPath, ActorRefProvider, InvalidMessageException } import pekko.actor.testkit.typed.CapturedLogEvent @@ -29,9 +33,6 @@ import pekko.actor.typed.internal._ import pekko.annotation.InternalApi import pekko.util.Helpers -import org.slf4j.{ Logger, Marker } -import org.slf4j.helpers.{ MessageFormatter, SubstituteLoggerFactory } - /** * INTERNAL API * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala index 917ed1119b1..f395c5175e4 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala @@ -15,16 +15,17 @@ package org.apache.pekko.actor.testkit.typed.internal import java.util.Collections +import org.apache.pekko + +import org.slf4j.{ MDC, Marker } + import ch.qos.logback.classic.spi.ILoggingEvent import ch.qos.logback.classic.spi.ThrowableProxy import ch.qos.logback.core.AppenderBase -import org.apache.pekko import pekko.actor.testkit.typed.LoggingEvent import pekko.annotation.InternalApi -import org.slf4j.{ MDC, Marker } - /** * INTERNAL API * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestInboxImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestInboxImpl.scala index 9dc91cc678c..6f9fd967c16 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestInboxImpl.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestInboxImpl.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.actor.{ ActorPath, Address, RootActorPath } import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestKitUtils.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestKitUtils.scala index 6445998cdad..7920fc9280e 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestKitUtils.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestKitUtils.scala @@ -13,12 +13,13 @@ package org.apache.pekko.actor.testkit.typed.internal -import scala.concurrent.{ Await, TimeoutException } import scala.concurrent.duration.Duration +import scala.concurrent.{ Await, TimeoutException } import scala.util.control.Exception.Catcher import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.typed.{ ActorRef, ActorSystem, Behavior, Props } import pekko.actor.typed.scaladsl.ActorContext import pekko.actor.typed.scaladsl.Behaviors diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala index 0be9c61f41c..453c0cc89eb 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala @@ -14,10 +14,10 @@ package org.apache.pekko.actor.testkit.typed.internal import java.time.{ Duration => JDuration } -import java.util.{ List => JList } import java.util.concurrent.BlockingDeque import java.util.concurrent.LinkedBlockingDeque import java.util.function.Supplier +import java.util.{ List => JList } import scala.annotation.tailrec import scala.collection.immutable @@ -28,6 +28,7 @@ import scala.reflect.ClassTag import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ActorRefProvider import pekko.actor.ExtendedActorSystem import pekko.actor.testkit.typed.FishingOutcome diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala index d6ce52aca47..0609fd52355 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala @@ -18,6 +18,9 @@ import java.time.Duration import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.DeadLetter import pekko.actor.Dropped import pekko.actor.UnhandledMessage @@ -31,8 +34,6 @@ import pekko.actor.typed.Props import pekko.actor.typed.Scheduler import pekko.util.Timeout -import com.typesafe.config.Config - object ActorTestKit { /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala index 52b3a87b668..316369a8702 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala @@ -18,6 +18,9 @@ import java.util.concurrent.ThreadLocalRandom import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect } import pekko.actor.testkit.typed.internal.{ ActorSystemStub, BehaviorTestKitImpl } import pekko.actor.typed.{ ActorRef, Behavior, Signal } @@ -26,8 +29,6 @@ import pekko.annotation.{ ApiMayChange, DoNotInherit } import pekko.japi.function.{ Function => JFunction } import pekko.pattern.StatusReply -import com.typesafe.config.Config - object BehaviorTestKit { /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala index 59800e9b8af..b88fb9d8f9c 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala @@ -18,6 +18,7 @@ import java.time.Duration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.typed.{ ActorRef, Behavior, Props, RecipientRef } /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala index d71359d099f..b34196e9b30 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala @@ -18,12 +18,13 @@ package org.apache.pekko.actor.testkit.typed.javadsl import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.testkit.typed.internal.TestKitUtils import pekko.actor.testkit.typed.scaladsl.ActorTestKit.ApplicationTestConfig import pekko.actor.typed.ActorSystem -import com.typesafe.config.Config - @deprecated("Use JUnitJupiterTestKitBuilder instead", "2.0.0") final class JUnit5TestKitBuilder() { diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnitJupiterTestKitBuilder.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnitJupiterTestKitBuilder.scala index c384620fbab..f3b4e29fb2f 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnitJupiterTestKitBuilder.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnitJupiterTestKitBuilder.scala @@ -18,12 +18,13 @@ package org.apache.pekko.actor.testkit.typed.javadsl import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.testkit.typed.internal.TestKitUtils import pekko.actor.testkit.typed.scaladsl.ActorTestKit.ApplicationTestConfig import pekko.actor.typed.ActorSystem -import com.typesafe.config.Config - final class JUnitJupiterTestKitBuilder() { var system: Option[ActorSystem[?]] = None diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala index e8b670504fa..8ab07dfcd6f 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala @@ -15,14 +15,14 @@ package org.apache.pekko.actor.testkit.typed.javadsl import scala.util.control.NonFatal -import org.junit.rules.TestRule -import org.junit.runner.Description -import org.junit.runners.model.Statement - import org.apache.pekko.actor.testkit.typed.internal.CapturingAppender import org.slf4j.LoggerFactory +import org.junit.rules.TestRule +import org.junit.runner.Description +import org.junit.runners.model.Statement + /** * JUnit `TestRule` to make log lines appear only when the test failed. * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala index 4caaa8ddb86..d0a999b9c5d 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala @@ -17,13 +17,13 @@ import java.lang.reflect.Method import scala.util.control.NonFatal -import org.junit.jupiter.api.extension.{ ExtensionContext, InvocationInterceptor, ReflectiveInvocationContext } -import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation - import org.apache.pekko.actor.testkit.typed.internal.CapturingAppender import org.slf4j.LoggerFactory +import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation +import org.junit.jupiter.api.extension.{ ExtensionContext, InvocationInterceptor, ReflectiveInvocationContext } + final class LogCapturingExtension extends InvocationInterceptor { private val capturingAppender = CapturingAppender.get("") diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala index 5323c25cd98..14393c7a444 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala @@ -16,13 +16,14 @@ package org.apache.pekko.actor.testkit.typed.javadsl import java.util.function.Supplier import org.apache.pekko + +import org.slf4j.event.Level + import pekko.actor.testkit.typed.LoggingEvent import pekko.actor.testkit.typed.internal.LoggingTestKitImpl import pekko.actor.typed.ActorSystem import pekko.annotation.DoNotInherit -import org.slf4j.event.Level - /** * Facilities for verifying logs. * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala index 9f0d7c35c54..708a9929398 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala @@ -19,11 +19,12 @@ import scala.annotation.varargs import scala.jdk.DurationConverters._ import org.apache.pekko -import pekko.actor.typed.ActorSystem -import pekko.actor.typed.internal.adapter.SchedulerAdapter import com.typesafe.config.Config +import pekko.actor.typed.ActorSystem +import pekko.actor.typed.internal.adapter.SchedulerAdapter + /** * Manual time allows you to do async tests while controlling the scheduler of the system. * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/SerializationTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/SerializationTestKit.scala index 768e5c7ab85..c5a4a0b49a8 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/SerializationTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/SerializationTestKit.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.testkit.typed.javadsl import org.apache.pekko + import pekko.actor.testkit.typed.scaladsl import pekko.actor.typed.ActorSystem diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala index 69876fc9b4e..70fe55fa67b 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala @@ -19,6 +19,7 @@ import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.testkit.typed.internal.TestInboxImpl import pekko.actor.typed.ActorRef import pekko.annotation.{ ApiMayChange, DoNotInherit } diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala index 276a0a117d8..d1e96ef03ef 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala @@ -17,11 +17,11 @@ package org.apache.pekko.actor.testkit.typed.javadsl +import org.apache.pekko.actor.testkit.typed.annotations.JUnit5TestKit + import org.junit.jupiter.api.extension.{ AfterAllCallback, BeforeTestExecutionCallback, ExtensionContext } import org.junit.platform.commons.support.AnnotationSupport -import org.apache.pekko.actor.testkit.typed.annotations.JUnit5TestKit - @deprecated("Use TestKitJUnitJupiterExtension instead", "2.0.0") final class TestKitJUnit5Extension() extends AfterAllCallback with BeforeTestExecutionCallback { diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnitJupiterExtension.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnitJupiterExtension.scala index 458239ae85b..be6b9343514 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnitJupiterExtension.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnitJupiterExtension.scala @@ -17,11 +17,11 @@ package org.apache.pekko.actor.testkit.typed.javadsl +import org.apache.pekko.actor.testkit.typed.annotations.JUnitJupiterTestKit + import org.junit.jupiter.api.extension.{ AfterAllCallback, BeforeTestExecutionCallback, ExtensionContext } import org.junit.platform.commons.support.AnnotationSupport -import org.apache.pekko.actor.testkit.typed.annotations.JUnitJupiterTestKit - final class TestKitJUnitJupiterExtension() extends AfterAllCallback with BeforeTestExecutionCallback { var testKit: Option[ActorTestKit] = None diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala index 5b85c2d386b..8719309a521 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala @@ -15,10 +15,14 @@ package org.apache.pekko.actor.testkit.typed.javadsl import java.time.Duration +import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import org.junit.Rule import org.junit.rules.ExternalResource -import org.apache.pekko import pekko.actor.DeadLetter import pekko.actor.Dropped import pekko.actor.UnhandledMessage @@ -31,9 +35,6 @@ import pekko.actor.typed.Props import pekko.actor.typed.Scheduler import pekko.util.Timeout -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * A Junit external resource for the [[ActorTestKit]], making it possible to have Junit manage the lifecycle of the testkit. * The testkit will be automatically shut down when the test completes or fails. diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala index b972630cfd0..c51bcb919c3 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala @@ -14,12 +14,13 @@ package org.apache.pekko.actor.testkit.typed.javadsl import java.time.Duration -import java.util.{ List => JList } import java.util.function.Supplier +import java.util.{ List => JList } import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.testkit.typed.FishingOutcome import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.internal.TestProbeImpl diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala index 7476271ffda..f901090587b 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala @@ -21,6 +21,12 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + +import org.slf4j.LoggerFactory + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.DeadLetter import pekko.actor.DeadLetterSuppression import pekko.actor.Dropped @@ -39,11 +45,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.annotation.InternalApi import pekko.util.Timeout -import org.slf4j.LoggerFactory - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object ActorTestKit { private val testKitGuardianCounter = new AtomicInteger(0) diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala index 357f3c5f7bc..c8942f26190 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala @@ -14,6 +14,10 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.DeadLetter import pekko.actor.Dropped import pekko.actor.UnhandledMessage @@ -25,9 +29,6 @@ import pekko.actor.typed.Behavior import pekko.actor.typed.Props import pekko.util.Timeout -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object ActorTestKitBase { @noinline def testNameFromCallStack(): String = TestKitUtils.testNameFromCallStack(classOf[ActorTestKitBase]) } diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala index ef5fd4cb0fd..86c88788048 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala @@ -19,6 +19,9 @@ import scala.collection.immutable import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect } import pekko.actor.testkit.typed.internal.{ ActorSystemStub, BehaviorTestKitImpl } import pekko.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext } @@ -26,8 +29,6 @@ import pekko.actor.typed.receptionist.Receptionist import pekko.annotation.{ ApiMayChange, DoNotInherit } import pekko.pattern.StatusReply -import com.typesafe.config.Config - @ApiMayChange object BehaviorTestKit { diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/Effects.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/Effects.scala index 9b6e80eca0c..f9af339dfda 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/Effects.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/Effects.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.typed.{ ActorRef, Behavior, Props, RecipientRef } /** diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala index c0bb5c02b0a..9c930766ca3 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala @@ -16,13 +16,14 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import scala.reflect.ClassTag import org.apache.pekko + +import org.slf4j.event.Level + import pekko.actor.testkit.typed.LoggingEvent import pekko.actor.testkit.typed.internal.LoggingTestKitImpl import pekko.actor.typed.ActorSystem import pekko.annotation.DoNotInherit -import org.slf4j.event.Level - /** * Facilities for verifying logs. * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala index c631307343a..0dd717a61bb 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala @@ -17,11 +17,12 @@ import scala.annotation.varargs import scala.concurrent.duration.FiniteDuration import org.apache.pekko -import pekko.actor.typed.ActorSystem -import pekko.actor.typed.internal.adapter.SchedulerAdapter import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.typed.ActorSystem +import pekko.actor.typed.internal.adapter.SchedulerAdapter + /** * Manual time allows you to do async tests while controlling the scheduler of the system. * diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala index a922ff7bbec..ae9f4c7094e 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala @@ -14,18 +14,19 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import org.apache.pekko -import pekko.actor.testkit.typed.TestKitSettings -import pekko.actor.typed.ActorSystem -import org.scalatest.{ BeforeAndAfterAll, TestSuite } import org.scalatest.concurrent.Eventually import org.scalatest.concurrent.ScalaFutures import org.scalatest.matchers.should.Matchers import org.scalatest.time.Span +import org.scalatest.{ BeforeAndAfterAll, TestSuite } import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import pekko.actor.testkit.typed.TestKitSettings +import pekko.actor.typed.ActorSystem + /** * A ScalaTest base class for the [[ActorTestKit]], making it possible to have ScalaTest manage the lifecycle of the testkit. * The testkit will be automatically shut down when the test completes or fails using ScalaTest's BeforeAndAfterAll trait. If diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/SerializationTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/SerializationTestKit.scala index 691291aa15d..71c6df0ddbe 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/SerializationTestKit.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/SerializationTestKit.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import org.apache.pekko + import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.adapter._ import pekko.serialization.SerializationExtension diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestInbox.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestInbox.scala index 8b9086344ec..18a1c0087a0 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestInbox.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestInbox.scala @@ -18,6 +18,7 @@ import java.util.concurrent.ThreadLocalRandom import scala.collection.immutable import org.apache.pekko + import pekko.Done import pekko.actor.{ Address, RootActorPath } import pekko.actor.testkit.typed.internal.TestInboxImpl diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbe.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbe.scala index ff215bc741b..2fea1d3d8fe 100644 --- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbe.scala +++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbe.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.testkit.typed.FishingOutcome import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.internal.TestProbeImpl diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala index 25d4edd98c2..c645c61248b 100644 --- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala +++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala @@ -16,6 +16,13 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import scala.concurrent.Promise import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.Dropped import pekko.actor.UnhandledMessage @@ -24,12 +31,6 @@ import pekko.actor.typed.ActorSystem import pekko.actor.typed.eventstream.EventStream import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.BeforeAndAfterAll -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } - -import com.typesafe.config.ConfigFactory - class ActorTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "the Scala testkit" should { diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala index dd88f16c837..83782c9a489 100644 --- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala +++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala @@ -17,6 +17,12 @@ import scala.concurrent.duration.{ FiniteDuration, _ } import scala.reflect.ClassTag import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + +import org.slf4j.event.Level + import pekko.Done import pekko.actor.Address import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect } @@ -28,11 +34,6 @@ import pekko.actor.typed.receptionist.{ Receptionist, ServiceKey } import pekko.actor.typed.scaladsl.Behaviors import pekko.util.Timeout -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - -import org.slf4j.event.Level - object BehaviorTestKitSpec { object Parent { diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/GreeterMain.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/GreeterMain.scala index e1aea1103e8..5b32a23ed8b 100644 --- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/GreeterMain.scala +++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/GreeterMain.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import org.apache.pekko + import pekko.actor.typed.{ ActorRef, Behavior } import pekko.actor.typed.scaladsl.Behaviors diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala index 5aaacd23464..85b531dfa3d 100644 --- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala +++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala @@ -21,12 +21,13 @@ import scala.annotation.nowarn import org.apache.pekko import org.apache.pekko.actor.testkit.typed.javadsl.JUnit5TestKitBuilder -import pekko.actor.typed.ActorSystem import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.typed.ActorSystem + @nowarn("msg=deprecated") class JUnit5TestKitBuilderSpec extends AnyWordSpec { diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnitJupiterTestKitBuilderSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnitJupiterTestKitBuilderSpec.scala index 9b142c54d6a..2dc22df25d8 100644 --- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnitJupiterTestKitBuilderSpec.scala +++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnitJupiterTestKitBuilderSpec.scala @@ -19,12 +19,13 @@ package org.apache.pekko.actor.testkit.typed.scaladsl import org.apache.pekko import org.apache.pekko.actor.testkit.typed.javadsl.JUnitJupiterTestKitBuilder -import pekko.actor.typed.ActorSystem import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.typed.ActorSystem + class JUnitJupiterTestKitBuilderSpec extends AnyWordSpec { "the JUnitJupiterTestKitBuilder" should { diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTimeSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTimeSpec.scala index e9e308bd0fe..3ced93e74df 100644 --- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTimeSpec.scala +++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTimeSpec.scala @@ -23,15 +23,16 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.duration._ import org.apache.pekko -import pekko.Done -import pekko.actor.testkit.typed.scaladsl.ManualTimeSpec.config -import pekko.actor.typed.DispatcherSelector -import pekko.actor.typed.scaladsl.Behaviors import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.Done +import pekko.actor.testkit.typed.scaladsl.ManualTimeSpec.config +import pekko.actor.typed.DispatcherSelector +import pekko.actor.typed.scaladsl.Behaviors + object ManualTimeSpec { val config = ConfigFactory .parseString(""" diff --git a/actor-tests/src/test/scala-2/org/apache/pekko/util/LineNumberSpec.scala b/actor-tests/src/test/scala-2/org/apache/pekko/util/LineNumberSpec.scala index f3783d831b4..89df8002112 100644 --- a/actor-tests/src/test/scala-2/org/apache/pekko/util/LineNumberSpec.scala +++ b/actor-tests/src/test/scala-2/org/apache/pekko/util/LineNumberSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.util import org.apache.pekko + import pekko.testkit.PekkoSpec import pekko.util.LineNumbers._ diff --git a/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala b/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala index 98f7f213d79..95ffab61ffe 100644 --- a/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala +++ b/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala @@ -13,11 +13,11 @@ package org.apache.pekko.util -import org.scalactic.TypeCheckedTripleEquals - import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import org.scalactic.TypeCheckedTripleEquals + object TypedMultiMapSpec { trait AbstractKey { type Type } final case class Key[T](t: T) extends AbstractKey { final override type Type = T } diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala index cf47b35b544..7e7d6f05887 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.actor import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.ConfigurationException import pekko.routing._ import pekko.testkit._ import pekko.testkit.DefaultTimeout import pekko.testkit.TestEvent._ -import org.scalatest.BeforeAndAfterEach - object ActorConfigurationVerificationSpec { class TestActor extends Actor { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala index 606e6f22f16..ce814d7f0a5 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala @@ -15,17 +15,18 @@ package org.apache.pekko.actor import scala.concurrent.duration._ -import com.codahale.metrics.Histogram - import org.apache.pekko -import pekko.testkit.{ ImplicitSender, PekkoSpec, PerformanceTest } -import pekko.testkit.metrics._ -import pekko.testkit.metrics.HeapMemoryUsage import org.scalatest.BeforeAndAfterAll import com.typesafe.config.ConfigFactory +import com.codahale.metrics.Histogram + +import pekko.testkit.{ ImplicitSender, PekkoSpec, PerformanceTest } +import pekko.testkit.metrics._ +import pekko.testkit.metrics.HeapMemoryUsage + object ActorCreationPerfSpec { val config = ConfigFactory.parseString(""" diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala index 9ae6d2480ea..cab1d1fd9d0 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala @@ -20,12 +20,13 @@ import java.util.concurrent.atomic._ import scala.concurrent.{ Await, Future } import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.actor.Actor._ import pekko.pattern.ask import pekko.testkit._ -import org.scalatest.BeforeAndAfterEach - object ActorLifeCycleSpec { class LifeCycleTestActor(testActor: ActorRef, id: String, generationProvider: AtomicInteger) extends Actor { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala index 21ad5613dcd..af365371daf 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.concurrent.duration.{ Duration, FiniteDuration } import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.ConfigurationException import pekko.dispatch._ import pekko.testkit._ import pekko.util.Helpers.ConfigOps -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object ActorMailboxSpec { val mailboxConf = ConfigFactory.parseString(s""" unbounded-dispatcher { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorRefSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorRefSpec.scala index 23f864c9d67..3da7bbf31db 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorRefSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorRefSpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.pattern.ask import pekko.serialization.JavaSerializer import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSelectionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSelectionSpec.scala index a8e9108e1d2..0f4a47b3aed 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSelectionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSelectionSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.pattern.ask import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala index 26593792f04..5c9f7ea3cb0 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala @@ -17,13 +17,14 @@ import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.ConfigurationException import pekko.actor.setup.ActorSystemSetup import pekko.dispatch.{ Dispatchers, ExecutionContexts } import pekko.testkit.{ ImplicitSender, PekkoSpec, TestActors, TestProbe } -import com.typesafe.config.ConfigFactory - object ActorSystemDispatchersSpec { class SnitchingExecutionContext(testActor: ActorRef, underlying: ExecutionContext) extends ExecutionContext { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala index ac1326debe7..b56fe52fa25 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala @@ -13,17 +13,20 @@ package org.apache.pekko.actor -import java.util.concurrent.{ ConcurrentLinkedQueue, RejectedExecutionException } import java.util.concurrent.atomic.AtomicInteger +import java.util.concurrent.{ ConcurrentLinkedQueue, RejectedExecutionException } import scala.annotation.nowarn -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import scala.util.Using +import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks -import org.apache.pekko import pekko.actor.setup.ActorSystemSetup import pekko.dispatch._ import pekko.japi.Util.immutableSeq @@ -32,8 +35,6 @@ import pekko.testkit.{ TestKit, _ } import pekko.util.{ Switch, Timeout } import pekko.util.Helpers.ConfigOps -import com.typesafe.config.{ Config, ConfigFactory } - object ActorSystemSpec { class Waves extends Actor { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorTimeoutSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorTimeoutSpec.scala index 94c2f464c81..0dcb44533e0 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorTimeoutSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorTimeoutSpec.scala @@ -17,7 +17,8 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko -import pekko.pattern.{ ask, AskTimeoutException } + +import pekko.pattern.{ AskTimeoutException, ask } import pekko.testkit._ import pekko.testkit.TestEvent._ import pekko.util.Timeout diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala index 45930934fa7..865501ab600 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala @@ -17,16 +17,17 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.ActorSystem.Settings import pekko.dispatch.BoundedDequeBasedMailbox import pekko.testkit._ import pekko.testkit.DefaultTimeout import pekko.testkit.TestEvent._ -import org.scalatest.BeforeAndAfterEach - -import com.typesafe.config.{ Config, ConfigFactory } - object ActorWithBoundedStashSpec { class StashingActor extends Actor with Stash { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala index c31c81c294a..96ae2c29791 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala @@ -18,13 +18,14 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.pattern.ask import pekko.testkit._ import pekko.testkit.DefaultTimeout import pekko.testkit.TestEvent._ -import org.scalatest.BeforeAndAfterEach - object ActorWithStashSpec { class StashingActor extends Actor with Stash { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ConsistencySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ConsistencySpec.scala index 42f67440ae0..b7a6489637c 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ConsistencySpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ConsistencySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor import scala.concurrent.duration._ import org.apache.pekko + import pekko.dispatch.ThreadPoolConfig import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala index 92616745211..91137c2255a 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala @@ -23,6 +23,10 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.ConfigurationException import pekko.Done import pekko.actor.CoordinatedShutdown.Phase @@ -32,9 +36,6 @@ import pekko.testkit.PekkoSpec import pekko.testkit.TestKit import pekko.testkit.TestProbe -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - class CoordinatedShutdownSpec extends PekkoSpec(ConfigFactory.parseString(""" pekko.loglevel=INFO diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala index 3d6b03945a5..5bcaf0b58f5 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor import scala.concurrent.duration._ import org.apache.pekko + import pekko.event.Logging import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala index a05548c8835..65116c6360d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor import org.apache.pekko + import pekko.testkit.EventFilter import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala index 60b15f3d173..92fdb4c838d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Props.EmptyActor import pekko.dispatch.sysmsg.{ DeathWatchNotification, Failed } import pekko.pattern.ask diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala index 511823bb4c5..c01edf03e70 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.actor import scala.concurrent.duration._ import org.apache.pekko -import pekko.routing._ -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigParseOptions +import pekko.routing._ +import pekko.testkit.PekkoSpec + object DeployerSpec { val deployerConf = ConfigFactory.parseString( """ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala index 43c7789082e..7981b64855d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala @@ -18,14 +18,15 @@ import java.util.concurrent.atomic.AtomicInteger import scala.util.control.NoStackTrace import org.apache.pekko -import pekko.testkit.EventFilter -import pekko.testkit.TestKit._ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.testkit.EventFilter +import pekko.testkit.TestKit._ + object TestExtension extends ExtensionId[TestExtension] with ExtensionIdProvider { def lookup = this def createExtension(s: ExtendedActorSystem) = new TestExtension(s) diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala index a4cb514570b..83c947baba7 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala @@ -18,12 +18,13 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.event._ import pekko.testkit._ import pekko.util.Timeout -import com.typesafe.config.ConfigFactory - object FSMActorSpec { class Latches(implicit system: ActorSystem) { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/FSMTransitionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/FSMTransitionSpec.scala index 65c11e4dc40..05059c45b7c 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/FSMTransitionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/FSMTransitionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor import scala.concurrent.duration._ import org.apache.pekko + import pekko.testkit._ object FSMTransitionSpec { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ForwardActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ForwardActorSpec.scala index d6f03c44e62..b111dabd48a 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ForwardActorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ForwardActorSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ import org.apache.pekko + import pekko.pattern.{ ask, pipe } import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala index c897f26df19..6150bf822b7 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor import org.apache.pekko + import pekko.actor.dungeon.SerializationCheckFailedException import pekko.testkit.EventFilter import pekko.testkit.ImplicitSender diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala index b0fe725657f..5e6e5326335 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala @@ -21,6 +21,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.testkit._ import pekko.util.Timeout diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/PropsCreationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/PropsCreationSpec.scala index 5923920544c..44f8d13f96e 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/PropsCreationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/PropsCreationSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor import scala.annotation.nowarn import org.apache.pekko + import pekko.testkit.PekkoSpec object PropsCreationSpec { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala index efc3b8d9f56..8702d7c56ab 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.actor import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem.Settings import pekko.actor.ActorSystem.findClassLoader import pekko.actor.setup.ActorSystemSetup import pekko.testkit.AbstractSpec -import com.typesafe.config.ConfigFactory - class ProviderSelectionSpec extends AbstractSpec { import ProviderSelection.{ ClusterActorRefProvider, RemoteActorRefProvider } diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala index 891a5f29959..ec006734a82 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.pattern.ask import pekko.testkit.DefaultTimeout import pekko.testkit.EventFilter diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala index cca2a2c9e4b..d3b263c0115 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala @@ -14,27 +14,27 @@ package org.apache.pekko.actor import java.io.Closeable -import java.util.concurrent._ import java.util.concurrent.ThreadLocalRandom +import java.util.concurrent._ import scala.annotation.nowarn -import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future } import scala.util.Try import scala.util.control.NoStackTrace import scala.util.control.NonFatal -import atomic.{ AtomicInteger, AtomicReference } - import org.apache.pekko -import pekko.pattern.ask -import pekko.testkit._ -import pekko.util.Helpers import org.scalatest.BeforeAndAfterEach import com.typesafe.config.{ Config, ConfigFactory } +import atomic.{ AtomicInteger, AtomicReference } +import pekko.pattern.ask +import pekko.testkit._ +import pekko.util.Helpers + object SchedulerSpec { val testConfRevolver = ConfigFactory.parseString(""" diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala index 9e46e814bdf..e801ac4496b 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala @@ -15,9 +15,9 @@ package org.apache.pekko.actor import java.lang.System.identityHashCode import java.lang.ref.WeakReference -import java.util.concurrent.{ CountDownLatch, TimeUnit } import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicInteger +import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.annotation.nowarn import scala.concurrent.Await @@ -25,21 +25,21 @@ import scala.concurrent.duration._ import scala.util.Random import scala.util.control.NoStackTrace -import SupervisorStrategy.{ Directive, Restart, Resume, Stop } - import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + +import SupervisorStrategy.{ Directive, Restart, Resume, Stop } import pekko.actor.SupervisorStrategy.seqThrowable2Decider import pekko.dispatch.{ Dispatcher, DispatcherConfigurator, DispatcherPrerequisites, MessageDispatcher } import pekko.event.Logging import pekko.pattern.ask import pekko.testkit.{ DefaultTimeout, EventFilter, ImplicitSender, PekkoSpec } -import pekko.testkit.{ filterEvents, filterException, TestDuration, TestLatch } +import pekko.testkit.{ TestDuration, TestLatch, filterEvents, filterException } import pekko.testkit.LongRunningTest import pekko.testkit.TestEvent.Mute import pekko.util.Helpers.ConfigOps -import com.typesafe.config.{ Config, ConfigFactory } - object SupervisorHierarchySpec { class FireWorkerException(msg: String) extends Exception(msg) diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala index d46996ef49f..fbf6fed6717 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala @@ -21,8 +21,9 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.pattern.ask -import pekko.testkit.{ filterEvents, EventFilter } +import pekko.testkit.{ EventFilter, filterEvents } import pekko.testkit.DefaultTimeout import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala index f75b460433c..d77176a7af3 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala @@ -20,6 +20,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.{ Die, Ping } import pekko.ConfigurationException import pekko.dispatch.MailboxType @@ -29,11 +35,6 @@ import pekko.routing.RoundRobinPool import pekko.testkit._ import pekko.testkit.TestEvent._ -import org.scalatest.BeforeAndAfterEach - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SupervisorSpec { val Timeout = 5.seconds diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorTreeSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorTreeSpec.scala index 804fadba837..d3090498408 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorTreeSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorTreeSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.pattern.ask import pekko.testkit.{ DefaultTimeout, EventFilter, ImplicitSender, PekkoSpec } diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala index 0a293532103..a80859dc4f4 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala @@ -17,14 +17,15 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll + import pekko.pattern.ask -import pekko.testkit.{ filterEvents, EventFilter } +import pekko.testkit.{ EventFilter, filterEvents } import pekko.testkit.DefaultTimeout import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec -import org.scalatest.BeforeAndAfterAll - class Ticket669Spec extends PekkoSpec with BeforeAndAfterAll with ImplicitSender with DefaultTimeout { import Ticket669Spec._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/UidClashTest.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/UidClashTest.scala index f489142d8dd..eee5308b517 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/UidClashTest.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/UidClashTest.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor.SupervisorStrategy.{ Restart, Stop } import pekko.dispatch.sysmsg.SystemMessage import pekko.event.EventStream diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala index 39bc418e69b..33ae0df1d36 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala @@ -14,15 +14,20 @@ package org.apache.pekko.actor.dispatch import java.rmi.RemoteException -import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch, TimeUnit } import java.util.concurrent.atomic.{ AtomicInteger, AtomicLong } +import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch, TimeUnit } import scala.annotation.nowarn import scala.annotation.tailrec -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import org.apache.pekko + +import org.scalatest.Assertions._ + +import com.typesafe.config.Config + import pekko.actor._ import pekko.dispatch._ import pekko.event.Logging.Error @@ -30,10 +35,6 @@ import pekko.pattern.ask import pekko.testkit._ import pekko.util.Switch -import org.scalatest.Assertions._ - -import com.typesafe.config.Config - object ActorModelSpec { sealed trait ActorModelMessage extends NoSerializationVerificationNeeded diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/BalancingDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/BalancingDispatcherSpec.scala index 63e367b21a9..12cf6471e6a 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/BalancingDispatcherSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/BalancingDispatcherSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.dispatch import java.util.concurrent.{ CountDownLatch, TimeUnit } import org.apache.pekko + import pekko.actor.{ Actor, ActorCell, ActorRefWithCell, Props } import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala index d2b3dd02e97..79d1b072bac 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala @@ -13,13 +13,14 @@ package org.apache.pekko.actor.dispatch -import java.util.concurrent.{ CountDownLatch, TimeUnit } import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.pattern.ask import pekko.testkit.DefaultTimeout diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorsSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorsSpec.scala index cb2e0faff06..2dc6aba7f7f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorsSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorsSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.dispatch import java.util.concurrent.CountDownLatch import org.apache.pekko + import pekko.actor._ import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala index 2fe8900f41a..0d3107c08f0 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala @@ -21,15 +21,16 @@ import scala.annotation.nowarn import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.ConfigurationException import pekko.actor._ import pekko.dispatch._ import pekko.routing.FromConfig import pekko.testkit.{ ImplicitSender, PekkoSpec } -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DispatchersSpec { val config = """ myapp { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala index 716452157e3..daa7d60c201 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala @@ -18,13 +18,14 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.Await import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.actor.{ Actor, Props } import pekko.pattern.ask import pekko.testkit._ import pekko.testkit.PekkoSpec -import org.scalatest.BeforeAndAfterEach - object PinnedActorSpec { val config = """ pinned-dispatcher { diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dungeon/DispatchSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dungeon/DispatchSpec.scala index 3cefc3806c9..8b97d223974 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/dungeon/DispatchSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dungeon/DispatchSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.dungeon import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Props import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/routing/ListenerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/routing/ListenerSpec.scala index 99376f2d8f2..76c4c27825e 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/routing/ListenerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/routing/ListenerSpec.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.Await import org.apache.pekko + import pekko.actor._ import pekko.routing._ import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala index ce79405f8cc..22efdd124d6 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.actor.setup import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.TestKit import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.ActorSystem +import pekko.testkit.TestKit + case class DummySetup(name: String) extends Setup case class DummySetup2(name: String) extends Setup case class DummySetup3(name: String) extends Setup diff --git a/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala index 264ff45ee6a..f28f2deb75d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala @@ -18,16 +18,17 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.Assertions + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.ExtendedActorSystem import pekko.event.DefaultLoggingFilter import pekko.event.Logging.DefaultLogger import pekko.testkit.PekkoSpec -import org.scalatest.Assertions - -import com.typesafe.config.ConfigFactory - class ConfigSpec extends PekkoSpec(ConfigFactory.defaultReference(ActorSystem.findClassLoader())) with Assertions { "The default configuration file (i.e. reference.conf)" must { diff --git a/actor-tests/src/test/scala/org/apache/pekko/dataflow/Future2Actor.scala b/actor-tests/src/test/scala/org/apache/pekko/dataflow/Future2Actor.scala index acaf568d6dc..75d3fba6fd3 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dataflow/Future2Actor.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dataflow/Future2Actor.scala @@ -20,6 +20,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.actor.ActorRef import pekko.pattern.{ ask, pipe } diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ControlAwareDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ControlAwareDispatcherSpec.scala index b6abfdb17cc..b5405af9f7c 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ControlAwareDispatcherSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ControlAwareDispatcherSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.dispatch import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.testkit.{ DefaultTimeout, PekkoSpec } diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala index a05f3cd5a13..4f0849f2802 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala @@ -15,16 +15,17 @@ package org.apache.pekko.dispatch import java.lang.management.ManagementFactory -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.TestKit import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.ActorSystem +import pekko.testkit.TestKit + class DispatcherShutdownSpec extends AnyWordSpec with Matchers { "pekko dispatcher" should { diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ExecutionContextSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ExecutionContextSpec.scala index 4db07018c29..7fe33569505 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ExecutionContextSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ExecutionContextSpec.scala @@ -13,14 +13,15 @@ package org.apache.pekko.dispatch -import java.util.concurrent.{ Executor, ExecutorService, Executors } import java.util.concurrent.atomic.AtomicInteger +import java.util.concurrent.{ Executor, ExecutorService, Executors } -import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, ExecutionContextExecutorService } -import scala.concurrent.{ blocking, Await, Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future, Promise, blocking } +import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, ExecutionContextExecutorService } import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Props import pekko.testkit.{ DefaultTimeout, PekkoSpec, TestLatch } diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala index 913b7752f51..f7caca4140d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfiguratorSpec.scala @@ -20,11 +20,12 @@ package org.apache.pekko.dispatch import java.util.concurrent.ThreadFactory import org.apache.pekko -import pekko.testkit.PekkoSpec -import pekko.util.JavaVersion import com.typesafe.config.{ Config, ConfigFactory } +import pekko.testkit.PekkoSpec +import pekko.util.JavaVersion + object ForkJoinExecutorConfiguratorSpec { // Keep the root config explicit so the dispatcher-config integration checks below // see exactly the values this spec is asserting on (and not whatever the project's diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala index 4816990c5d7..f27a4ab1fcc 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.dispatch import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, Props } import pekko.testkit.{ ImplicitSender, PekkoSpec } import pekko.util.JavaVersion -import com.typesafe.config.ConfigFactory - object ForkJoinPoolStarvationSpec { val config = ConfigFactory.parseString(""" |actorhang { diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala index 4720f9195af..a6718b50fd9 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala @@ -16,17 +16,18 @@ package org.apache.pekko.dispatch import java.util.concurrent.{ BlockingQueue, ConcurrentLinkedQueue } import scala.annotation.nowarn -import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future } import org.apache.pekko -import pekko.actor._ -import pekko.testkit.{ EventFilter, PekkoSpec } import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach } import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor._ +import pekko.testkit.{ EventFilter, PekkoSpec } + abstract class MailboxSpec extends PekkoSpec with BeforeAndAfterAll with BeforeAndAfterEach { def name: String diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala index 53511f096b6..f0f4295e8ec 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala @@ -17,11 +17,12 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.{ Actor, ActorSystem, Props } -import pekko.testkit.{ DefaultTimeout, PekkoSpec } import com.typesafe.config.Config +import pekko.actor.{ Actor, ActorSystem, Props } +import pekko.testkit.{ DefaultTimeout, PekkoSpec } + object PriorityDispatcherSpec { case object Result diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala index eb7681bf14a..dd58e1a3859 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala @@ -17,11 +17,12 @@ import scala.concurrent.ExecutionContext import scala.concurrent.Promise import org.apache.pekko -import pekko.Done -import pekko.testkit.PekkoSpec import org.scalatest.matchers.should.Matchers +import pekko.Done +import pekko.testkit.PekkoSpec + class SameThreadExecutionContextSpec extends PekkoSpec with Matchers { "The SameThreadExecutionContext" should { diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala index 1a7c5e18a74..2e709ab88dc 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala @@ -17,11 +17,12 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.{ Actor, ActorSystem, Props } -import pekko.testkit.{ DefaultTimeout, PekkoSpec } import com.typesafe.config.Config +import pekko.actor.{ Actor, ActorSystem, Props } +import pekko.testkit.{ DefaultTimeout, PekkoSpec } + object StablePriorityDispatcherSpec { case object Result diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/sysmsg/SystemMessageListSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/sysmsg/SystemMessageListSpec.scala index 9326d8b83c9..30dbfb50525 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/sysmsg/SystemMessageListSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/sysmsg/SystemMessageListSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.dispatch.sysmsg import org.apache.pekko + import pekko.actor.Props import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/AddressTerminatedTopicBenchSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/AddressTerminatedTopicBenchSpec.scala index 92155843844..2ebe1b2cbd4 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/AddressTerminatedTopicBenchSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/AddressTerminatedTopicBenchSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.event import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSystem diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/DeadLetterListenerShutdownSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/DeadLetterListenerShutdownSpec.scala index dd4b19eb587..0df3b2c2f33 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/DeadLetterListenerShutdownSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/DeadLetterListenerShutdownSpec.scala @@ -22,9 +22,10 @@ import scala.concurrent.Future import scala.concurrent.Promise import scala.concurrent.duration._ +import org.apache.pekko + import com.typesafe.config.ConfigFactory -import org.apache.pekko import pekko.Done import pekko.actor.Actor import pekko.actor.ActorRef diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala index bdffc760fb4..9f4d52555d7 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.event import org.apache.pekko -import pekko.actor.{ Actor, ActorRef, ActorSystem, PoisonPill, Props } -import pekko.japi.function.Procedure -import pekko.testkit._ import org.scalatest.BeforeAndAfterEach import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.{ Actor, ActorRef, ActorSystem, PoisonPill, Props } +import pekko.japi.function.Procedure +import pekko.testkit._ + object EventBusSpec { class TestActorWrapperActor(testActor: ActorRef) extends Actor { def receive = { diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala index 476135829e8..aa356b60795 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.event import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor._ -import pekko.testkit.{ PekkoSpec, TestProbe } import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.testkit.{ PekkoSpec, TestProbe } + object EventStreamSpec { val config = ConfigFactory.parseString(""" diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala index 6cb61dd31b9..478cf05c2e6 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala @@ -16,13 +16,19 @@ package org.apache.pekko.event import java.nio.charset.StandardCharsets import java.text.SimpleDateFormat import java.time.{ LocalDateTime, ZoneOffset } -import java.util.{ Calendar, Date, GregorianCalendar, TimeZone } import java.util.concurrent.TimeUnit +import java.util.{ Calendar, Date, GregorianCalendar, TimeZone } import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.event.Logging._ import pekko.event.Logging.InitializeLogger @@ -31,11 +37,6 @@ import pekko.serialization.SerializationExtension import pekko.testkit._ import pekko.util.Helpers -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - -import com.typesafe.config.{ Config, ConfigFactory } - object LoggerSpec { val defaultConfig = ConfigFactory.parseString(""" diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala index febe6ea1080..1aef7ef61d0 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala @@ -18,14 +18,15 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.actor._ -import pekko.testkit._ import org.scalatest.BeforeAndAfterAll import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.testkit._ + object LoggingReceiveSpec { class TestLogActor extends Actor { override val supervisorStrategy = diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/MarkerLoggingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/MarkerLoggingSpec.scala index 4a61fc70209..113958c799f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/event/MarkerLoggingSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/event/MarkerLoggingSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.event import org.apache.pekko + import pekko.event.Logging._ import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/CapacityLimitSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/CapacityLimitSpec.scala index 7ed15f5f0f1..46ae8e67bc8 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/CapacityLimitSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/CapacityLimitSpec.scala @@ -13,9 +13,9 @@ package org.apache.pekko.io -import Tcp._ - import org.apache.pekko + +import Tcp._ import pekko.testkit.{ PekkoSpec, TestProbe } import pekko.testkit.SocketUtil.temporaryServerAddresses diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/InetSocketOptionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/InetSocketOptionSpec.scala index 1825cfd1eb9..4793f1d6c21 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/InetSocketOptionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/InetSocketOptionSpec.scala @@ -24,6 +24,7 @@ import java.nio.channels.ServerSocketChannel import java.nio.channels.SocketChannel import org.apache.pekko + import pekko.testkit.PekkoSpec class InetSocketOptionSpec extends PekkoSpec { diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala index 4360018f415..299c3d13e7d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala @@ -20,14 +20,15 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.io.dns.ARecord import pekko.io.dns.CachePolicy.Ttl import pekko.io.dns.DnsProtocol import pekko.io.dns.DnsProtocol.Ip -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class SimpleDnsCacheSpec extends AnyWordSpec with Matchers { "Cache" should { "not reply with expired but not yet swept out entries" in { diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala index f531a1a4a9d..2da3346e24f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala @@ -14,11 +14,11 @@ package org.apache.pekko.io import java.io.IOException -import java.net.{ InetSocketAddress, ServerSocket } import java.net.SocketTimeoutException +import java.net.{ InetSocketAddress, ServerSocket } import java.nio.ByteBuffer -import java.nio.channels._ import java.nio.channels.SelectionKey._ +import java.nio.channels._ import java.nio.channels.spi.SelectorProvider import java.nio.file.Files import java.util.Random @@ -29,9 +29,14 @@ import scala.concurrent.duration._ import scala.util.Try import scala.util.control.NonFatal +import org.apache.pekko + +import org.scalatest.matchers._ + +import com.typesafe.config.ConfigFactory + import com.google.common.jimfs.{ Configuration, Jimfs } -import org.apache.pekko import pekko.actor._ import pekko.io.Inet.SocketOption import pekko.io.SelectionHandler._ @@ -41,10 +46,6 @@ import pekko.testkit.SocketUtil.temporaryServerAddress import pekko.testkit.WithLogCapturing import pekko.util.{ ByteString, Helpers } -import org.scalatest.matchers._ - -import com.typesafe.config.ConfigFactory - object TcpConnectionSpec { case class Ack(i: Int) extends Event object Ack extends Ack(0) diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala index 44e8fe1756b..123e68e67cc 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala @@ -20,14 +20,15 @@ import java.util.concurrent.atomic.AtomicReference import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.TimeLimits + import pekko.actor.{ ActorRef, PoisonPill } import pekko.io.Tcp._ import pekko.testkit.{ PekkoSpec, TestProbe } import pekko.testkit.WithLogCapturing import pekko.util.ByteString -import org.scalatest.concurrent.TimeLimits - class TcpIntegrationSpec extends PekkoSpec(""" pekko.loglevel = debug pekko.loggers = ["org.apache.pekko.testkit.SilenceAllTestEventListener"] diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala index 658f4bfd31a..7d6db29f04c 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala @@ -17,9 +17,9 @@ import scala.annotation.tailrec import scala.collection.immutable import scala.concurrent.ExecutionContext -import Tcp._ - import org.apache.pekko + +import Tcp._ import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.io.Inet.SocketOption diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpListenerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpListenerSpec.scala index 16d0e391255..9e7833233fd 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpListenerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpListenerSpec.scala @@ -14,14 +14,14 @@ package org.apache.pekko.io import java.net.Socket -import java.nio.channels.{ SelectableChannel, SocketChannel } import java.nio.channels.SelectionKey.OP_ACCEPT +import java.nio.channels.{ SelectableChannel, SocketChannel } import scala.concurrent.duration._ -import Tcp._ - import org.apache.pekko + +import Tcp._ import pekko.actor._ import pekko.io.SelectionHandler._ import pekko.io.TcpListener.{ FailedRegisterIncoming, RegisterIncoming } diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala index 686cd47136b..8ab8394e473 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala @@ -18,6 +18,7 @@ import java.net.InetSocketAddress import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala index 9a20d7bd9a8..95d0a4cc902 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala @@ -17,6 +17,7 @@ import java.net.DatagramSocket import java.net.InetSocketAddress import org.apache.pekko + import pekko.actor.ActorRef import pekko.io.Inet._ import pekko.io.Udp._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/UnsynchronizedByteArrayInputStreamSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/UnsynchronizedByteArrayInputStreamSpec.scala index 0fdff98c5a9..764769bb012 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/UnsynchronizedByteArrayInputStreamSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/UnsynchronizedByteArrayInputStreamSpec.scala @@ -20,11 +20,12 @@ package org.apache.pekko.util import java.nio.charset.StandardCharsets import org.apache.pekko -import pekko.io.UnsynchronizedByteArrayInputStream import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.io.UnsynchronizedByteArrayInputStream + class UnsynchronizedByteArrayInputStreamSpec extends AnyWordSpec with Matchers { "UnsynchronizedByteArrayInputStream" must { "support mark and reset" in { diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala index 9959d08b532..57b664a0b9c 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala @@ -17,9 +17,14 @@ import java.net.InetAddress import scala.concurrent.duration._ -import CachePolicy.Ttl - import org.apache.pekko + +import org.scalatest.time.Millis +import org.scalatest.time.Span + +import com.typesafe.config.ConfigFactory + +import CachePolicy.Ttl import pekko.io.{ Dns, IO } import pekko.io.dns.DnsProtocol.{ Ip, RequestType, Srv } import pekko.pattern.ask @@ -28,11 +33,6 @@ import pekko.testkit.SocketUtil.Both import pekko.testkit.WithLogCapturing import pekko.util.Timeout -import org.scalatest.time.Millis -import org.scalatest.time.Span - -import com.typesafe.config.ConfigFactory - /** * These tests rely on a DNS server with 2 zones configured, foo.test and bar.example. * diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala index c658106a23f..07293820b19 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala @@ -18,11 +18,12 @@ import java.net.InetAddress import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ExtendedActorSystem +import pekko.testkit.PekkoSpec + class DnsSettingsSpec extends PekkoSpec { val eas = system.asInstanceOf[ExtendedActorSystem] diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala index 501aa8a9e78..1837abb1159 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala @@ -20,6 +20,12 @@ import scala.jdk.CollectionConverters._ import scala.util.Try import scala.util.control.NonFatal +import org.apache.pekko + +import org.scalatest.concurrent.Eventually + +import com.typesafe.config.Config + import com.github.dockerjava.api.DockerClient import com.github.dockerjava.api.async.ResultCallback import com.github.dockerjava.api.command.CreateContainerCmd @@ -27,16 +33,11 @@ import com.github.dockerjava.api.model._ import com.github.dockerjava.core.{ DefaultDockerClientConfig, DockerClientConfig, DockerClientImpl } import com.github.dockerjava.httpclient5.ApacheDockerHttpClient -import org.apache.pekko import pekko.actor.Props import pekko.io.dns.internal.DnsClient import pekko.testkit.PekkoSpec import pekko.util.Timeout -import org.scalatest.concurrent.Eventually - -import com.typesafe.config.Config - abstract class DockerBindDnsService(config: Config) extends PekkoSpec(config) with Eventually { val dockerConfig: DockerClientConfig = DefaultDockerClientConfig diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsManagerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsManagerSpec.scala index e11ba2c0e31..735f25ccf75 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsManagerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsManagerSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.io.dns.internal import scala.collection.immutable.Seq import org.apache.pekko + import pekko.io.Dns import pekko.io.dns.AAAARecord import pekko.io.dns.CachePolicy.Ttl diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala index 1f520a6d652..d287d272f6e 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala @@ -19,6 +19,9 @@ import scala.collection.{ immutable => im } import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory, ConfigValueFactory } + import pekko.actor.{ ActorRef, ExtendedActorSystem, Props } import pekko.actor.Status.Failure import pekko.io.SimpleDnsCache @@ -29,8 +32,6 @@ import pekko.io.dns.internal.AsyncDnsResolver.ResolveFailedException import pekko.io.dns.internal.DnsClient.{ Answer, DropRequest, Dropped, DuplicateId, Question4, Question6, SrvQuestion } import pekko.testkit.{ PekkoSpec, TestProbe, WithLogCapturing } -import com.typesafe.config.{ Config, ConfigFactory, ConfigValueFactory } - class AsyncDnsResolverSpec extends PekkoSpec(""" pekko.loglevel = DEBUG pekko.loggers = ["org.apache.pekko.testkit.SilenceAllTestEventListener"] diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala index c84dc963751..5e72eb2c0fd 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala @@ -20,6 +20,7 @@ import scala.collection.{ immutable => im } import org.apache.pekko import org.apache.pekko.actor.Status.Failure + import pekko.actor.Props import pekko.io.Udp import pekko.io.dns.{ ARecord, CachePolicy, RecordClass, RecordType } diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala index cffbd246ab3..5c3578d67f1 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.io.dns.internal import org.apache.pekko -import pekko.io.dns.{ RecordClass, RecordType } -import pekko.util.ByteString import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.io.dns.{ RecordClass, RecordType } +import pekko.util.ByteString + class MessageSpec extends AnyWordSpec with Matchers { "The Message" should { "parse a response that is truncated mid-message" in { diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/TcpDnsClientSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/TcpDnsClientSpec.scala index e756d2b24aa..5e886c6dce7 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/TcpDnsClientSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/TcpDnsClientSpec.scala @@ -18,6 +18,7 @@ import java.net.InetSocketAddress import scala.collection.immutable.Seq import org.apache.pekko + import pekko.actor.{ ActorKilledException, Kill, Props } import pekko.io.Tcp import pekko.io.Tcp.{ Connected, PeerClosed, Register } diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala index 57679f14d78..1cf791aa4b0 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration._ import scala.util.Failure import org.apache.pekko + import pekko.actor._ import pekko.testkit.{ PekkoSpec, TestProbe } import pekko.testkit.WithLogCapturing diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala index f25635be664..d05d3de40f1 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala @@ -19,9 +19,10 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.pattern.TestActor.NormalException -import pekko.testkit.{ filterException, ImplicitSender, PekkoSpec, TestProbe } +import pekko.testkit.{ ImplicitSender, PekkoSpec, TestProbe, filterException } import pekko.testkit.WithLogCapturing object TestActor { diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala index 1ae76002e2f..af2898f4e41 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala @@ -17,12 +17,13 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko -import pekko.actor._ -import pekko.testkit._ import org.scalatest.concurrent.Eventually import org.scalatest.prop.TableDrivenPropertyChecks._ +import pekko.actor._ +import pekko.testkit._ + object BackoffSupervisorSpec { class TestException extends RuntimeException with NoStackTrace diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerMTSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerMTSpec.scala index f1e83caad4f..8efa3320296 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerMTSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerMTSpec.scala @@ -14,9 +14,9 @@ package org.apache.pekko.pattern import scala.collection.immutable -import scala.concurrent.{ Await, Future } import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import org.apache.pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala index b64e0a9e59e..0b889ccf596 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala @@ -24,6 +24,7 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem } import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala index b74d5442dae..6eabbb5cd2f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.Props diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala index 04111fee200..76c392ec604 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala @@ -13,10 +13,11 @@ package org.apache.pekko.pattern -import scala.concurrent.{ Await, ExecutionContextExecutor, Future, Promise, TimeoutException } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContextExecutor, Future, Promise, TimeoutException } import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.testkit.{ PekkoSpec, TestLatch } diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/PipeToSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/PipeToSpec.scala index 990b8dec89d..40ea069e635 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/PipeToSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/PipeToSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.pattern import scala.concurrent.Future import org.apache.pekko + import pekko.actor.Status import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/PromiseRefSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/PromiseRefSpec.scala index f4b8469efb2..194a98953de 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/PromiseRefSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/PromiseRefSpec.scala @@ -13,10 +13,11 @@ package org.apache.pekko.pattern -import scala.concurrent.{ Await, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Promise } import org.apache.pekko + import pekko.actor._ import pekko.testkit.{ ImplicitSender, PekkoSpec, TestProbe } diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala index 1ba1bcd032e..c124e551f50 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala @@ -15,10 +15,11 @@ package org.apache.pekko.pattern import java.util.concurrent.atomic.AtomicInteger -import scala.concurrent.{ Await, ExecutionContextExecutor, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContextExecutor, Future } import org.apache.pekko + import pekko.actor.Scheduler import pekko.testkit.PekkoSpec diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala index 019311eebb3..397debd238f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala @@ -13,18 +13,19 @@ package org.apache.pekko.pattern -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import pekko.Done import pekko.testkit.PekkoSpec import pekko.testkit.TestException import pekko.testkit.TestProbe import pekko.util.Timeout -import org.scalatest.concurrent.ScalaFutures - class StatusReplySpec extends PekkoSpec with ScalaFutures { "StatusReply" should { diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/extended/ExplicitAskSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/extended/ExplicitAskSpec.scala index 80fb90a74db..4a66345a22f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/pattern/extended/ExplicitAskSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/extended/ExplicitAskSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.testkit.PekkoSpec import pekko.util.Timeout diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala index 5eec57d6bf1..dd8ef22bc79 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala @@ -17,18 +17,19 @@ import java.net.URLEncoder import java.nio.charset.StandardCharsets import java.util.concurrent.atomic.AtomicInteger -import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future, Promise } import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.actor.{ Actor, ActorLogging, ActorRef, PoisonPill, Props } import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec import pekko.testkit.TestLatch import pekko.testkit.TestProbe -import org.scalatest.BeforeAndAfterEach - object BalancingSpec { val counter = new AtomicInteger(1) diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/BroadcastSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/BroadcastSpec.scala index ee835ff0f54..a3751051e0f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/BroadcastSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/BroadcastSpec.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.Await import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.pattern.ask import pekko.testkit.{ DefaultTimeout, ImplicitSender, PekkoSpec, TestLatch } diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala index d12addc3197..cd972f9a48f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala @@ -19,6 +19,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.ConfigurationException import pekko.actor.{ Actor, ActorRef, Deploy, Props } import pekko.actor.ActorPath @@ -30,8 +33,6 @@ import pekko.testkit.{ DefaultTimeout, ImplicitSender, PekkoSpec } import pekko.testkit.TestActors.echoActorProps import pekko.testkit.TestProbe -import com.typesafe.config.Config - object ConfiguredLocalRoutingSpec { val config = """ pekko { diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/ConsistentHashingRouterSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/ConsistentHashingRouterSpec.scala index c20d310d8cd..7b671bc8f1b 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/ConsistentHashingRouterSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/ConsistentHashingRouterSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.ExecutionContextExecutor import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/MetricsBasedResizerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/MetricsBasedResizerSpec.scala index 59752e01b4c..e43fe7889da 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/MetricsBasedResizerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/MetricsBasedResizerSpec.scala @@ -19,10 +19,10 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.{ Random, Try } +import org.apache.pekko + import MetricsBasedResizerSpec._ import OptimalSizeExploringResizer._ - -import org.apache.pekko import pekko.actor._ import pekko.pattern.ask import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/RandomSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/RandomSpec.scala index 0b850fe32a6..c5124605d85 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/RandomSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/RandomSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.pattern.ask import pekko.testkit.{ DefaultTimeout, ImplicitSender, PekkoSpec, TestLatch } diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala index 198b7144cf1..aa304e2adb4 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala @@ -17,13 +17,14 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.{ Actor, ActorRef, ActorSystem, Props } import pekko.pattern.ask import pekko.testkit._ import pekko.testkit.TestEvent._ -import com.typesafe.config.{ Config, ConfigFactory } - object ResizerSpec { val config = """ diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/RoundRobinSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/RoundRobinSpec.scala index 2e47538c5dd..9b024908d89 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/RoundRobinSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/RoundRobinSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/RouteeCreationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/RouteeCreationSpec.scala index 04bc6fc2063..ba85a9ccebf 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/RouteeCreationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/RouteeCreationSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.routing import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.Identify diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala index 90ca2eaec17..4832f07df7d 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala @@ -19,13 +19,14 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.ConfigurationException import pekko.actor._ import pekko.pattern.{ ask, pipe } import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RoutingSpec { val config = """ diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/ScatterGatherFirstCompletedSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/ScatterGatherFirstCompletedSpec.scala index 6902fab2303..42687ac71e8 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/ScatterGatherFirstCompletedSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/ScatterGatherFirstCompletedSpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.actor.ActorSystem import pekko.actor.Status diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/SmallestMailboxSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/SmallestMailboxSpec.scala index b379f7bceb5..28389b4894f 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/SmallestMailboxSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/SmallestMailboxSpec.scala @@ -18,6 +18,7 @@ import java.util.concurrent.ConcurrentHashMap import scala.concurrent.Await import org.apache.pekko + import pekko.actor.{ Actor, Props } import pekko.testkit.{ DefaultTimeout, ImplicitSender, PekkoSpec, TestLatch } diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/TailChoppingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/TailChoppingSpec.scala index 840daddaa31..d520c5a4a65 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/routing/TailChoppingSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/routing/TailChoppingSpec.scala @@ -19,9 +19,10 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, ActorSystem, Props } import pekko.actor.Status.Failure -import pekko.pattern.{ ask, AskTimeoutException } +import pekko.pattern.{ AskTimeoutException, ask } import pekko.testkit._ object TailChoppingSpec { diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala index 14f7bd46d89..d545b26b6b2 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala @@ -19,11 +19,12 @@ import java.util.concurrent.CompletionStage import scala.concurrent.Future import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.testkit.{ EventFilter, PekkoSpec } import com.typesafe.config.ConfigFactory +import pekko.actor.ExtendedActorSystem +import pekko.testkit.{ EventFilter, PekkoSpec } + object AsyncSerializeSpec { case class Message1(str: String) diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/DisabledJavaSerializerWarningSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/DisabledJavaSerializerWarningSpec.scala index ce723f9ab44..24ea0589323 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/serialization/DisabledJavaSerializerWarningSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/DisabledJavaSerializerWarningSpec.scala @@ -18,6 +18,7 @@ import java.nio.{ ByteBuffer, ByteOrder } import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.testkit._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala index b03861dd608..a80e4d6f9cb 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala @@ -19,12 +19,13 @@ import java.nio.ByteOrder import scala.util.Random import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.testkit.PekkoSpec import pekko.util.ByteString import pekko.util.ByteString.ByteString2 -import com.typesafe.config.ConfigFactory - object PrimitivesSerializationSpec { val serializationTestOverrides = "" diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala index a2853cf155e..6767a17a459 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala @@ -13,18 +13,19 @@ package org.apache.pekko.serialization -import java.util.{ BitSet => ProgrammaticJavaDummy } -import java.util.{ Date => SerializableDummy } import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicInteger +import java.util.{ BitSet => ProgrammaticJavaDummy } +import java.util.{ Date => SerializableDummy } import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorSystem, BootstrapSetup, ExtendedActorSystem } import pekko.actor.setup.ActorSystemSetup import pekko.testkit.{ PekkoSpec, TestKit } -import com.typesafe.config.ConfigFactory - class ConfigurationDummy class ProgrammaticDummy diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala index a94ba683680..66faa42130c 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala @@ -14,17 +14,20 @@ package org.apache.pekko.serialization import java.io._ -import java.nio.{ ByteBuffer, ByteOrder } import java.nio.charset.StandardCharsets +import java.nio.{ ByteBuffer, ByteOrder } import scala.annotation.nowarn import scala.concurrent.Await import scala.concurrent.duration._ -import SerializationTests._ +import org.apache.pekko + +import com.typesafe.config._ + import test.org.apache.pekko.serialization.NoVerification -import org.apache.pekko +import SerializationTests._ import pekko.actor._ import pekko.actor.dungeon.SerializationCheckFailedException import pekko.pattern.ask @@ -32,8 +35,6 @@ import pekko.testkit.{ EventFilter, PekkoSpec } import pekko.util.ByteString import pekko.util.Timeout -import com.typesafe.config._ - object SerializationTests { val serializeConf = s""" diff --git a/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala index ef189a231c4..c691cd87048 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.testkit import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.dispatch.ActorModelSpec import pekko.dispatch.DispatcherPrerequisites import pekko.dispatch.MessageDispatcher import pekko.dispatch.MessageDispatcherConfigurator -import com.typesafe.config.Config - object CallingThreadDispatcherModelSpec { import ActorModelSpec._ diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala index 4b92b2c19ba..4c1674b13ea 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala @@ -23,20 +23,21 @@ import scala.concurrent.{ Await, ExecutionContext, ExecutionContextExecutor, Fut import scala.jdk.CollectionConverters._ import scala.util.control.Exception -import org.scalactic.source.Position - import org.apache.pekko -import pekko.testkit.TimingTest -import pekko.util.DefaultExecutionContext._ import org.scalatest.concurrent.{ Signaler, ThreadSignaler } import org.scalatest.exceptions.TestFailedDueToTimeoutException -import org.scalatest.matchers.{ MatchResult, Matcher } import org.scalatest.matchers.should.Matchers +import org.scalatest.matchers.{ MatchResult, Matcher } import org.scalatest.time.Span import org.scalatest.time.SpanSugar._ import org.scalatest.wordspec.AnyWordSpec +import org.scalactic.source.Position + +import pekko.testkit.TimingTest +import pekko.util.DefaultExecutionContext._ + class BoundedBlockingQueueSpec extends AnyWordSpec with Matchers diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringInputStreamSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringInputStreamSpec.scala index 3bab0790714..876a27b0c25 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringInputStreamSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringInputStreamSpec.scala @@ -21,11 +21,12 @@ import java.io.{ ByteArrayOutputStream, InputStream, OutputStream } import java.nio.charset.StandardCharsets import org.apache.pekko -import pekko.util.ByteString.{ ByteString1, ByteString1C, ByteStrings } import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.util.ByteString.{ ByteString1, ByteString1C, ByteStrings } + class ByteStringInputStreamSpec extends AnyWordSpec with Matchers { "ByteString1" must { "support asInputStream" in { diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala index e7d15c7541d..e825e09efa7 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala @@ -16,25 +16,26 @@ package org.apache.pekko.util import java.io.{ ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream } import java.lang.Double.doubleToRawLongBits import java.lang.Float.floatToRawIntBits -import java.nio.{ ByteBuffer, ByteOrder } import java.nio.ByteOrder.{ BIG_ENDIAN, LITTLE_ENDIAN } import java.nio.charset.StandardCharsets +import java.nio.{ ByteBuffer, ByteOrder } import scala.annotation.nowarn import scala.collection.mutable.Builder +import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import org.apache.commons.codec.binary.Hex.encodeHex -import org.scalacheck.{ Arbitrary, Gen } import org.scalacheck.Arbitrary.arbitrary +import org.scalacheck.{ Arbitrary, Gen } import org.scalatestplus.scalacheck.Checkers -import org.apache.pekko import pekko.io.UnsynchronizedByteArrayInputStream import pekko.util.ByteString.{ ByteString1, ByteString1C, ByteString2, ByteStrings } -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class ByteStringSpec extends AnyWordSpec with Matchers with Checkers { implicit val betterGeneratorDrivenConfig: PropertyCheckConfiguration = diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala index d08c3d6c904..aaa16e4c3c5 100644 --- a/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala +++ b/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala @@ -21,11 +21,12 @@ import scala.concurrent.Future import scala.util.Random import org.apache.pekko -import pekko.testkit.DefaultTimeout -import pekko.testkit.PekkoSpec import org.scalatest.matchers.should.Matchers +import pekko.testkit.DefaultTimeout +import pekko.testkit.PekkoSpec + class IndexSpec extends PekkoSpec with Matchers with DefaultTimeout { implicit val ec: ExecutionContextExecutor = system.dispatcher private def emptyIndex = diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala index 05c2a56f451..af6489c0043 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.InvalidMessageException import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -26,8 +29,6 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.wordspec.AnyWordSpecLike - object ActorSpecMessages { sealed trait Command diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala index 3e4771bfe68..e01f0bb50dc 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala @@ -19,15 +19,16 @@ import scala.concurrent.duration._ import scala.util.{ Failure, Success } import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration.{ Timeout => PatienceTimeout } +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe } import pekko.actor.typed.scaladsl.AskPattern._ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ import pekko.util.Timeout -import org.scalatest.concurrent.PatienceConfiguration.{ Timeout => PatienceTimeout } -import org.scalatest.wordspec.AnyWordSpecLike - class ActorRefIgnoreSpec extends ScalaTestWithActorTestKit() with AnyWordSpecLike { case class Request(replyTo: ActorRef[Int]) diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala index 55653d218e5..5146203fbae 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.actor.typed import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.ActorPath import pekko.actor.ActorRefProvider import pekko.actor.ActorSystemImpl @@ -21,10 +26,6 @@ import pekko.actor.MinimalActorRef import pekko.actor.RootActorPath import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class ActorRefResolverSpec extends AnyWordSpec with ScalaFutures with Matchers { "ActorRefResolver" should { "not allow serialization of ref originating from other system" in { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala index 2fb49c5ffb0..1ae5a613e89 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala @@ -21,11 +21,12 @@ import scala.annotation.nowarn import scala.util.Using import org.apache.pekko -import pekko.actor.typed.scaladsl.Behaviors -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.actor.typed.scaladsl.Behaviors +import pekko.testkit.PekkoSpec + @nowarn("msg=possible missing interpolator") class ActorSystemSpec extends PekkoSpec { "ActorSystem" should { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala index 8800f5d962c..e2c39a51995 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala @@ -21,6 +21,9 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -33,8 +36,6 @@ import pekko.pattern.StatusReply import pekko.testkit.TestException import pekko.util.Timeout -import org.scalatest.wordspec.AnyWordSpecLike - object AskSpec { sealed trait Msg final case class Foo(s: String, replyTo: ActorRef[String]) extends Msg diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala index 9f9cba1715f..f373a8ea40f 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala @@ -17,9 +17,13 @@ import java.util.function.{ Function => F1 } import scala.annotation.nowarn +import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import org.scalactic.TypeCheckedTripleEquals -import org.apache.pekko import pekko.Done import pekko.actor.testkit.typed.scaladsl.{ BehaviorTestKit, TestInbox } import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -30,9 +34,6 @@ import pekko.actor.typed.scaladsl.{ Behaviors => SBehaviors } import pekko.japi.function.Function import pekko.japi.pf.PFBuilder -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - object BehaviorSpec { sealed trait Command { @nowarn diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/CancelReceiveTimeoutSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/CancelReceiveTimeoutSpec.scala index c342ba9cfd0..e5dae7b8c7b 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/CancelReceiveTimeoutSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/CancelReceiveTimeoutSpec.scala @@ -21,14 +21,15 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ -import org.scalatest.wordspec.AnyWordSpecLike - class CancelReceiveTimeoutSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { sealed trait Command diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala index 6600bdf3f2e..ae4044f4e89 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala @@ -16,15 +16,16 @@ package org.apache.pekko.actor.typed import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } + import pekko.actor.ActorInitializationException import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } - object DeferredSpec { sealed trait Command case object Ping extends Command diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala index 781ea42e070..ab6cd4db8ec 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala @@ -18,6 +18,11 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.Future import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.BootstrapSetup import pekko.actor.setup.ActorSystemSetup import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -26,10 +31,6 @@ import pekko.actor.typed.receptionist.Receptionist import pekko.actor.typed.receptionist.ServiceKey import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.{ Config, ConfigFactory } - class DummyExtension1 extends Extension object DummyExtension1 extends ExtensionId[DummyExtension1] { def createExtension(system: ActorSystem[?]) = new DummyExtension1 diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala index 208258315ef..82f748e5d4b 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.atomic.AtomicBoolean import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.ActorInitializationException import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -27,8 +30,6 @@ import pekko.actor.typed.internal.PoisonPill import pekko.actor.typed.internal.PoisonPillInterceptor import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.wordspec.AnyWordSpecLike - object InterceptSpec { final case class Msg(hello: String, replyTo: ActorRef[String]) case object MyPoisonPill diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala index 8a5b6fb60ba..3d941e631c0 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala @@ -14,11 +14,12 @@ package org.apache.pekko.actor.typed import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, LoggingTestKit, ScalaTestWithActorTestKit } -import pekko.actor.typed.internal.adapter.ActorSystemAdapter import org.scalatest.wordspec.AnyWordSpecLike +import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, LoggingTestKit, ScalaTestWithActorTestKit } +import pekko.actor.typed.internal.adapter.ActorSystemAdapter + object LocalActorRefProviderLogMessagesSpec { val config = """ pekko { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala index f8d865bc1b4..3e1dbf364e8 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.actor.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import org.slf4j.event.Level + import pekko.actor import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -21,10 +26,6 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ -import org.scalatest.wordspec.AnyWordSpecLike - -import org.slf4j.event.Level - class LogMessagesSpec extends ScalaTestWithActorTestKit(""" pekko.loglevel = DEBUG # test verifies debug """) with AnyWordSpecLike with LogCapturing { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala index acdb1ad0800..69275669fdc 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala @@ -17,6 +17,9 @@ import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.ActorCell import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -29,8 +32,6 @@ import pekko.dispatch.BoundedNodeMessageQueue import pekko.dispatch.MessageQueue import pekko.dispatch.UnboundedMessageQueueSemantics -import org.scalatest.wordspec.AnyWordSpecLike - class MailboxSelectorSpec extends ScalaTestWithActorTestKit(""" specific-mailbox { mailbox-type = "org.apache.pekko.dispatch.NonBlockingBoundedMailbox" diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala index 53cd0297b64..4e26b95c261 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.actor.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.wordspec.AnyWordSpecLike - class MonitorSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "The monitor behavior" should { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala index ac46eef74bb..b104c52f485 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.actor.typed import scala.annotation.tailrec import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl._ -import pekko.actor.typed.scaladsl.Behaviors import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.testkit.typed.scaladsl._ +import pekko.actor.typed.scaladsl.Behaviors + /** * Background: Originally there was an `OrElseBehavior` that could compose two `Behavior`, but that * wasn't safe when used together with narrow so `OrElseBehavior` was removed. Kept this diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala index 6038f3eb06b..7b6ee565c74 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala @@ -17,14 +17,15 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } + import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.scaladsl.Behaviors import pekko.util.Timeout -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } - object SpawnProtocolSpec { sealed trait Message final case class Ping(replyTo: ActorRef[Pong.type]) extends Message diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala index 9ced7d25581..47c47539129 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala @@ -26,6 +26,13 @@ import scala.util.Success import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import org.scalatest.wordspec.AnyWordSpecLike + +import org.slf4j.event.Level + import pekko.actor.ActorInitializationException import pekko.actor.Dropped import pekko.actor.testkit.typed._ @@ -37,12 +44,6 @@ import pekko.actor.typed.scaladsl.ActorContext import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.Behaviors._ -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec -import org.scalatest.wordspec.AnyWordSpecLike - -import org.slf4j.event.Level - object SupervisionSpec { sealed trait Command diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala index 4709337899e..50d72dd58f3 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.actor.typed import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.TestInbox import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.TestInbox + class TerminatedSpec extends AnyWordSpec with Matchers with LogCapturing { "Child Failed" must { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala index f47e8d69c92..f7ca634c6e5 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala @@ -21,6 +21,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.DeadLetter import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl._ @@ -29,8 +32,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.TimerScheduler import pekko.testkit.TimingTest -import org.scalatest.wordspec.AnyWordSpecLike - class TimerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { sealed trait Command diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala index 72e8e0a7d85..9dfa79be844 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor import pekko.actor.ActorInitializationException import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -28,8 +31,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ import pekko.util.Helpers.toRootLowerCase -import org.scalatest.wordspec.AnyWordSpecLike - object TransformMessagesSpec { // this is the sample from the Scaladoc diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala index ee29aaf85aa..cd339e26286 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent._ import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor import pekko.actor.testkit.typed.TestException @@ -28,8 +31,6 @@ import pekko.actor.typed.scaladsl.AbstractBehavior import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ -import org.scalatest.wordspec.AnyWordSpecLike - object WatchSpec { case object Stop diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala index f647146e773..8b9c384c4ee 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala @@ -13,6 +13,12 @@ package org.apache.pekko.actor.typed.coexistence import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.{ actor => u } import pekko.actor.Actor import pekko.actor.testkit.typed.TestException @@ -22,11 +28,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ import pekko.testkit.TestProbe -import org.scalatest.BeforeAndAfterAll -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ProbedBehavior { def behavior(probe: u.ActorRef): Behavior[String] = { Behaviors diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala index 5edfec293d2..d8855c6910b 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala @@ -13,6 +13,9 @@ package org.apache.pekko.actor.typed.coexistence import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.{ actor => classic } import pekko.actor.Actor import pekko.actor.testkit.typed.TestException @@ -22,8 +25,6 @@ import pekko.actor.typed.ActorRef import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ -import org.scalatest.wordspec.AnyWordSpecLike - object TypedSupervisingClassicSpec { sealed trait Protocol diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala index a442ddb2826..0e624c2a4a6 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.actor.typed.delivery import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.delivery.ConsumerController.DeliverThenStop @@ -23,10 +28,6 @@ import pekko.actor.typed.delivery.internal.ConsumerControllerImpl import pekko.actor.typed.delivery.internal.ProducerControllerImpl import pekko.serialization.SerializationExtension -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - class ConsumerControllerSpec extends ScalaTestWithActorTestKit(ConfigFactory.parseString(""" pekko.reliable-delivery.consumer-controller { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala index 429d83fdb62..9777c030983 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala @@ -18,6 +18,11 @@ import java.util.concurrent.atomic.AtomicReference import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.delivery.DurableProducerQueue.MessageSent @@ -26,10 +31,6 @@ import pekko.actor.typed.delivery.internal.ChunkedMessage import pekko.actor.typed.delivery.internal.ProducerControllerImpl import pekko.util.ByteString -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - class DurableProducerControllerSpec extends ScalaTestWithActorTestKit( ConfigFactory.parseString(""" diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala index fee91853d70..9667dede1d8 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala @@ -14,15 +14,16 @@ package org.apache.pekko.actor.typed.delivery import org.apache.pekko -import pekko.actor.typed.delivery.DurableProducerQueue.MessageSent -import pekko.actor.typed.delivery.DurableProducerQueue.State -import pekko.actor.typed.delivery.internal.ChunkedMessage -import pekko.util.ByteString import org.scalatest.TestSuite import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.typed.delivery.DurableProducerQueue.MessageSent +import pekko.actor.typed.delivery.DurableProducerQueue.State +import pekko.actor.typed.delivery.internal.ChunkedMessage +import pekko.util.ByteString + class DurableProducerQueueSpec extends AnyWordSpec with TestSuite with Matchers { "DurableProducerQueue.State" must { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala index 0b6ba0d4366..30042f73d65 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala @@ -17,9 +17,11 @@ import java.util.concurrent.atomic.AtomicReference import scala.concurrent.duration._ -import DurableProducerQueue.MessageSent - import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import DurableProducerQueue.MessageSent import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -28,8 +30,6 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl import pekko.actor.typed.receptionist.Receptionist import pekko.actor.typed.receptionist.ServiceKey -import org.scalatest.wordspec.AnyWordSpecLike - class DurableWorkPullingSpec extends ScalaTestWithActorTestKit(""" pekko.reliable-delivery.consumer-controller.flow-control-window = 20 diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala index 77fb97e9ffb..f820efdc918 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala @@ -16,16 +16,17 @@ package org.apache.pekko.actor.typed.delivery import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.delivery.ProducerController.MessageWithConfirmation import pekko.actor.typed.delivery.internal.ChunkedMessage import pekko.actor.typed.delivery.internal.ProducerControllerImpl -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - class ProducerControllerSpec extends ScalaTestWithActorTestKit( ConfigFactory.parseString(""" diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala index d229e36dbfa..4a194bdd893 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala @@ -19,6 +19,12 @@ import scala.concurrent.duration._ import scala.util.Random import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.Behavior @@ -28,11 +34,6 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.LoggerOps -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object ReliableDeliveryRandomSpec { val config: Config = ConfigFactory.parseString(""" pekko.reliable-delivery.consumer-controller { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala index 66f2d57cfd4..5aa649d342f 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.actor.typed.delivery import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit + object ReliableDeliverySpec { val config: Config = ConfigFactory.parseString(""" pekko.reliable-delivery.consumer-controller.flow-control-window = 20 diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala index 0164d68c66f..a23073351b5 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala @@ -16,11 +16,15 @@ package org.apache.pekko.actor.typed.delivery import java.io.NotSerializableException import java.nio.charset.StandardCharsets -import scala.concurrent.duration._ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.delivery.ConsumerController.SequencedMessage @@ -29,9 +33,6 @@ import pekko.actor.typed.scaladsl.ActorContext import pekko.actor.typed.scaladsl.Behaviors import pekko.serialization.SerializerWithStringManifest -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object TestConsumer { final case class Job(payload: String) diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestDurableProducerQueue.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestDurableProducerQueue.scala index d471512141f..622b3e8241e 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestDurableProducerQueue.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestDurableProducerQueue.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.testkit.typed.TestException import pekko.actor.typed.Behavior import pekko.actor.typed.SupervisorStrategy diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducer.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducer.scala index de6fd1dac8f..aa66c2ed2f0 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducer.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducer.scala @@ -13,11 +13,12 @@ package org.apache.pekko.actor.typed.delivery -import scala.concurrent.duration._ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.ActorContext diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala index f028d454142..63716af57b4 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala @@ -13,12 +13,13 @@ package org.apache.pekko.actor.typed.delivery -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.Behaviors diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWorkPulling.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWorkPulling.scala index 384f7c4a956..4e87576e3e9 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWorkPulling.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWorkPulling.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.delivery import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.Behaviors diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala index bf384c439d7..c5d377bf393 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.actor.typed.delivery import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -24,8 +27,6 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl import pekko.actor.typed.receptionist.Receptionist import pekko.actor.typed.receptionist.ServiceKey -import org.scalatest.wordspec.AnyWordSpecLike - class WorkPullingSpec extends ScalaTestWithActorTestKit(""" pekko.reliable-delivery.consumer-controller.flow-control-window = 20 diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala index 2bac08ea458..ffd9d9a1962 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala @@ -17,10 +17,10 @@ package org.apache.pekko.actor.typed.eventstream -import org.apache.pekko.actor.{ AllDeadLetters, DeadLetter, Dropped, SuppressedDeadLetter, UnhandledMessage } import org.apache.pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } import org.apache.pekko.actor.typed.ActorSystem import org.apache.pekko.actor.typed.scaladsl.Behaviors +import org.apache.pekko.actor.{ AllDeadLetters, DeadLetter, Dropped, SuppressedDeadLetter, UnhandledMessage } import org.scalatest.wordspec.AnyWordSpecLike diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala index 922768cc5d9..fd7a5d68052 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala @@ -19,13 +19,14 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.DeadLetter import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe } import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.wordspec.AnyWordSpecLike - class EventStreamSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { import EventStream._ diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala index 0ac9739d460..71cf1e384d1 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala @@ -14,16 +14,17 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.ActorRef import pekko.actor.typed.scaladsl.Behaviors import pekko.serialization.{ JavaSerializer, SerializationExtension } -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ActorRefSerializationSpec { def config = ConfigFactory.parseString(""" pekko.actor { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala index 094624d9674..54d998807a3 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala @@ -19,14 +19,6 @@ import scala.concurrent.Promise import scala.util.control.NonFatal import org.apache.pekko -import pekko.Done -import pekko.actor.{ Address, CoordinatedShutdown, InvalidMessageException } -import pekko.actor.dungeon.Dispatch -import pekko.actor.testkit.typed.TestKitSettings -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.TestInbox -import pekko.actor.testkit.typed.scaladsl.TestProbe -import pekko.actor.typed.scaladsl.Behaviors import org.scalatest.BeforeAndAfterAll import org.scalatest.concurrent.Eventually @@ -37,6 +29,15 @@ import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.Done +import pekko.actor.{ Address, CoordinatedShutdown, InvalidMessageException } +import pekko.actor.dungeon.Dispatch +import pekko.actor.testkit.typed.TestKitSettings +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.TestInbox +import pekko.actor.testkit.typed.scaladsl.TestProbe +import pekko.actor.typed.scaladsl.Behaviors + class ActorSystemSpec extends AnyWordSpec with Matchers diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapterSpec.scala index c0c554e355e..209c46b0230 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapterSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapterSpec.scala @@ -14,6 +14,10 @@ package org.apache.pekko.actor.typed.internal.adapter import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor import pekko.actor.typed.ActorTags import pekko.actor.typed.MailboxSelector @@ -21,9 +25,6 @@ import pekko.actor.typed.Props import pekko.actor.typed.internal.adapter.PropsAdapter import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class PropsAdapterSpec extends AnyWordSpec with Matchers { "PropsAdapter" should { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala index 2215a7cf800..42a7480df52 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala @@ -16,6 +16,10 @@ package org.apache.pekko.actor.typed.internal.receptionist import scala.concurrent.Future import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } + import pekko.actor.testkit.typed.scaladsl.BehaviorTestKit import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -28,9 +32,6 @@ import pekko.actor.typed.receptionist.ServiceKey import pekko.actor.typed.scaladsl.AskPattern._ import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike } - object LocalReceptionistSpec { trait ServiceA val ServiceKeyA = ServiceKey[ServiceA]("service-a") diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala index 16ba38012b2..219d2f0d904 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.actor.typed.internal.receptionist import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.internal.ActorRefSerializationSpec import pekko.actor.typed.receptionist.ServiceKey import pekko.serialization.SerializationExtension -import org.scalatest.wordspec.AnyWordSpecLike - class ServiceKeySerializationSpec extends ScalaTestWithActorTestKit(ActorRefSerializationSpec.config) with AnyWordSpecLike diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala index 3fde4ee16f8..a65d7926485 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.actor.typed.internal.routing import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } import pekko.actor.typed.{ ActorRef, Behavior, DispatcherSelector } import pekko.actor.typed.scaladsl.{ Behaviors, Routers } -import org.scalatest.wordspec.AnyWordSpecLike - object PoolRouterSpec { object RouteeBehavior { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala index fd197c38ad1..90cc94d449f 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala @@ -14,15 +14,16 @@ package org.apache.pekko.actor.typed.internal.routing import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.Address import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit, TestProbe } import pekko.actor.typed.{ ActorSystem, Behavior } import pekko.actor.typed.internal.routing.RoutingLogics.ConsistentHashingLogic import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - class RoutingLogicSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with Matchers with LogCapturing { val emptyMessage: Any = "" diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala index d59ea1cb5f5..b295869b979 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.actor.typed.javadsl import scala.concurrent.Promise import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -25,8 +28,6 @@ import pekko.actor.typed.MessageAdaptionFailure import pekko.actor.typed.PreRestart import pekko.actor.typed.Terminated -import org.scalatest.wordspec.AnyWordSpecLike - object AdaptationFailureSpec { def emptyAbstractBehavior: Behavior[Any] = Behaviors.setup(new EmptyAbstractBehavior(_)) class EmptyAbstractBehavior(ctx: ActorContext[Any]) extends AbstractBehavior[Any](ctx) { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala index 0d658409b21..5131ef26c0c 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.actor.typed.pubsub import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import org.scalatest.wordspec.AnyWordSpecLike +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit + class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "A pub-sub topic running locally" must { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/receptionist/ReceptionistApiSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/receptionist/ReceptionistApiSpec.scala index 81c5a552938..9e9258b9259 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/receptionist/ReceptionistApiSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/receptionist/ReceptionistApiSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.Success import org.apache.pekko + import pekko.actor.typed.{ ActorRef, ActorSystem } import pekko.actor.typed.scaladsl.AskPattern._ import pekko.actor.typed.scaladsl.Behaviors diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala index b8e8ab731ed..e3eac85aefa 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala @@ -20,6 +20,11 @@ import scala.util.{ Failure, Success } import org.apache.pekko import org.apache.pekko.actor.testkit.typed.TestException + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -27,10 +32,6 @@ import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.{ ActorRef, PostStop, Props } import pekko.pattern.StatusReply -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ActorContextAskSpec { val config = ConfigFactory.parseString(""" ping-pong-dispatcher { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala index 7c5a2391322..1c589d7bb82 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.UnhandledMessage import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl.{ FishingOutcomes, LogCapturing, ScalaTestWithActorTestKit, TestProbe } import pekko.actor.typed.{ ActorRef, Behavior } -import org.scalatest.wordspec.AnyWordSpecLike - object ActorContextDelegateSpec { sealed trait PingPongCommand case object Ping extends PingPongCommand diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala index 29b21b396c1..09a4d33ff08 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala @@ -15,19 +15,20 @@ package org.apache.pekko.actor.typed.scaladsl import scala.concurrent.Future import scala.concurrent.Promise -import scala.util.{ Failure, Success } import scala.util.control.NoStackTrace +import scala.util.{ Failure, Success } import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe } -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.LoggingTestKit -import pekko.actor.typed.Props import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe } +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.LoggingTestKit +import pekko.actor.typed.Props + object ActorContextPipeToSelfSpec { val config = ConfigFactory.parseString(""" |pipe-to-self-spec-dispatcher { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala index b8c7d9792df..e8c77eb2cd1 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala @@ -17,6 +17,15 @@ import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicReference import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import org.slf4j.LoggerFactory +import org.slf4j.MDC +import org.slf4j.helpers.BasicMarkerFactory + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorPath import pekko.actor.ActorSystem import pekko.actor.ExtendedActorSystem @@ -35,14 +44,6 @@ import pekko.event.Logging.DefaultLogger import pekko.event.slf4j.Slf4jLogger import pekko.event.slf4j.Slf4jLoggingFilter -import org.scalatest.wordspec.AnyWordSpecLike - -import org.slf4j.LoggerFactory -import org.slf4j.MDC -import org.slf4j.helpers.BasicMarkerFactory - -import com.typesafe.config.ConfigFactory - class SomeClass object WhereTheBehaviorIsDefined { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala index 8f79e5ff230..9b275318efd 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala @@ -21,6 +21,9 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -28,8 +31,6 @@ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.ActorThreadSpec.Echo -import org.scalatest.wordspec.AnyWordSpecLike - object ActorThreadSpec { object Echo { final case class Msg(i: Int, replyTo: ActorRef[Int]) diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala index 2a8aa0c1aaa..aef70467260 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.actor.typed.scaladsl import scala.concurrent.Promise import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -26,8 +29,6 @@ import pekko.actor.typed.PreRestart import pekko.actor.typed.Signal import pekko.actor.typed.Terminated -import org.scalatest.wordspec.AnyWordSpecLike - object AdaptationFailureSpec { def emptyAbstractBehavior: Behavior[Any] = Behaviors.setup(new EmptyAbstractBehavior(_)) diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala index 9f8160647a7..d16cf8fa156 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala @@ -14,6 +14,12 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.BootstrapSetup import pekko.actor.setup.ActorSystemSetup import pekko.actor.testkit.typed.scaladsl.ActorTestKit @@ -29,11 +35,6 @@ import pekko.actor.typed.Props import pekko.actor.typed.SpawnProtocol import pekko.actor.typed.scaladsl.AskPattern._ -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DispatcherSelectorSpec { val config = ConfigFactory.parseString(""" ping-pong-dispatcher { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala index d3ad36b3c87..625d77a17ec 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala @@ -15,14 +15,15 @@ package org.apache.pekko.actor.typed package scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.NotUsed import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe -import org.scalatest.wordspec.AnyWordSpecLike - final class GracefulStopSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "Graceful stop" must { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala index b4775e4f1bf..cc1efcb8b92 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.LoggingTestKit -import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import org.scalatest.wordspec.AnyWordSpecLike import org.slf4j.LoggerFactory +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.LoggingTestKit +import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit + object LoggerOpsSpec { case class Value1(i: Int) case class Value2(i: Int) diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala index be93d456e55..8df24fab70d 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala @@ -18,6 +18,12 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorCell import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -34,11 +40,6 @@ import pekko.dispatch.Dispatchers import pekko.dispatch.MessageQueue import pekko.dispatch.NodeMessageQueue -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object MailboxSelectorSpec { val config = ConfigFactory.parseString( """ diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala index d05d42e02e4..63869624b6c 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala @@ -14,6 +14,13 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import org.slf4j.LoggerFactory + +import com.typesafe.config.ConfigFactory + import pekko.actor.DeadLetter import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.FishingOutcomes @@ -27,12 +34,6 @@ import pekko.actor.typed.PostStop import pekko.actor.typed.Props import pekko.actor.typed.internal.AdaptMessage -import org.scalatest.wordspec.AnyWordSpecLike - -import org.slf4j.LoggerFactory - -import com.typesafe.config.ConfigFactory - object MessageAdapterSpec { val config = ConfigFactory.parseString(""" pekko.log-dead-letters = on diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala index 6c81d4178a1..be46cce661f 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala @@ -15,14 +15,15 @@ package org.apache.pekko.actor.typed package scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.ActorTestKit import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe -import org.scalatest.wordspec.AnyWordSpecLike - final class OnSignalSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "An Actor.OnSignal behavior" must { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala index 9553e94f639..0e6cae5f8c8 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala @@ -17,12 +17,13 @@ package scaladsl import scala.concurrent.ExecutionContextExecutor import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe -import org.scalatest.wordspec.AnyWordSpecLike - class ReceivePartialSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { implicit val ec: ExecutionContextExecutor = system.executionContext diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala index 40f867d5c7c..1783d9a05d7 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala @@ -15,6 +15,10 @@ package org.apache.pekko.actor.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.{ ActorPath, ActorSystem } import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -27,9 +31,6 @@ import pekko.actor.typed.receptionist.Receptionist import pekko.actor.typed.receptionist.ServiceKey import pekko.actor.typed.scaladsl.adapter._ -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - class RoutersSpec extends ScalaTestWithActorTestKit(""" pekko.loglevel=debug """) with AnyWordSpecLike with Matchers with LogCapturing { diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala index 05e4a597a15..0bca35bf276 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.testkit.typed.internal.StubbedActorContext import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.TestInbox import pekko.actor.typed.Behavior -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class StashBufferSpec extends AnyWordSpec with Matchers with LogCapturing { val context = new StubbedActorContext[String]( diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala index 496e4d1f5e1..ed5433e15ea 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala @@ -20,14 +20,15 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe -import org.scalatest.wordspec.AnyWordSpecLike - object AbstractStashSpec { sealed trait Command final case class Msg(s: String) extends Command diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala index 770f1d71640..d57438116fc 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -23,8 +26,6 @@ import pekko.actor.typed.Behavior import pekko.actor.typed.BehaviorInterceptor import pekko.actor.typed.PostStop -import org.scalatest.wordspec.AnyWordSpecLike - class StopSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { import BehaviorInterceptor._ diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala index 8bc0fbb73c7..cf8338a57d2 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.actor.typed.scaladsl.adapter import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.{ actor => classic } import pekko.Done import pekko.NotUsed @@ -33,10 +38,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.serialization.SerializationExtension import pekko.testkit._ -import org.scalatest.BeforeAndAfterAll -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - object AdapterSpec { val classic1: classic.Props = classic.Props(new Classic1) diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala index 294ea4d081f..6d641e19b96 100644 --- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala +++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala @@ -17,16 +17,17 @@ import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.ActorSystemImpl import pekko.actor.testkit.typed.scaladsl.ActorTestKit import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class GuardianStartupSpec extends AnyWordSpec with Matchers with ScalaFutures with LogCapturing { "The user guardian" must { diff --git a/actor-typed/src/main/scala-2.13/org/apache/pekko/actor/typed/internal/receptionist/Platform.scala b/actor-typed/src/main/scala-2.13/org/apache/pekko/actor/typed/internal/receptionist/Platform.scala index bc464be2080..977dbf760e8 100644 --- a/actor-typed/src/main/scala-2.13/org/apache/pekko/actor/typed/internal/receptionist/Platform.scala +++ b/actor-typed/src/main/scala-2.13/org/apache/pekko/actor/typed/internal/receptionist/Platform.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.receptionist import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRef.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRef.scala index 3d369223b90..63f0e9a9d6b 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRef.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRef.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.{ actor => classic } import pekko.actor.typed.internal.InternalRecipientRef import pekko.annotation.DoNotInherit diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRefResolver.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRefResolver.scala index ffa931d9387..9e5233bb1e3 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRefResolver.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRefResolver.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed import org.apache.pekko + import pekko.actor.{ ActorRefWithCell, ExtendedActorSystem } import pekko.annotation.{ DoNotInherit, InternalApi } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala index 24b8882396e..af2dab3a56a 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala @@ -18,7 +18,12 @@ import java.util.concurrent.{ CompletionStage, ThreadFactory, TimeoutException } import scala.concurrent.{ ExecutionContextExecutor, Future } import org.apache.pekko -import pekko.{ actor => classic, Done } + +import org.slf4j.Logger + +import com.typesafe.config.{ Config, ConfigFactory } + +import pekko.{ Done, actor => classic } import pekko.actor.{ Address, BootstrapSetup, ClassicActorSystemProvider } import pekko.actor.setup.ActorSystemSetup import pekko.actor.typed.eventstream.EventStream @@ -28,10 +33,6 @@ import pekko.actor.typed.receptionist.Receptionist import pekko.annotation.DoNotInherit import pekko.util.Helpers.{ ConfigOps, Requiring } -import org.slf4j.Logger - -import com.typesafe.config.{ Config, ConfigFactory } - /** * An ActorSystem is home to a hierarchy of Actors. It is created using * `ActorSystem.apply` from a [[Behavior]] object that describes the root diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Behavior.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Behavior.scala index bc0e070c846..c1647a92221 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Behavior.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Behavior.scala @@ -18,6 +18,7 @@ import scala.annotation.tailrec import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.InvalidMessageException import pekko.actor.typed.internal.{ BehaviorImpl, BehaviorTags, InterceptorImpl, Supervisor } import pekko.actor.typed.internal.BehaviorImpl.DeferredBehavior diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/BehaviorInterceptor.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/BehaviorInterceptor.scala index 421b2a11fec..5fc002954f4 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/BehaviorInterceptor.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/BehaviorInterceptor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed import scala.reflect.ClassTag import org.apache.pekko + import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.util.BoxedType diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Extensions.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Extensions.scala index 92a6c112e9f..abdea8a4f2c 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Extensions.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Extensions.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed import org.apache.pekko + import pekko.actor.setup.Setup import pekko.annotation.DoNotInherit diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/MessageAndSignals.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/MessageAndSignals.scala index efcd06ef950..43bb9ff9a90 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/MessageAndSignals.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/MessageAndSignals.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed import org.apache.pekko + import pekko.annotation.DoNotInherit /** diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala index 45993e22209..0ee732006c0 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala @@ -19,6 +19,7 @@ import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.internal.PropsImpl._ import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Scheduler.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Scheduler.scala index e0b75376548..571ac3e32c4 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Scheduler.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Scheduler.scala @@ -17,6 +17,7 @@ import scala.concurrent.ExecutionContext import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.Cancellable import pekko.annotation.DoNotInherit diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SpawnProtocol.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SpawnProtocol.scala index cf792d9a1c6..2d4387b075d 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SpawnProtocol.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SpawnProtocol.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.typed.scaladsl.Behaviors import pekko.annotation.DoNotInherit diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala index 0ec45b7fe39..a8dbe562ef6 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala @@ -18,11 +18,12 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko -import pekko.annotation.DoNotInherit -import pekko.annotation.InternalApi import org.slf4j.event.Level +import pekko.annotation.DoNotInherit +import pekko.annotation.InternalApi + object SupervisorStrategy { /** diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala index 72ae6b08ffb..cd524d13335 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala @@ -19,6 +19,9 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.DeadLetterSuppression import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem @@ -33,8 +36,6 @@ import pekko.annotation.ApiMayChange import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi -import com.typesafe.config.Config - /** * `ConsumerController` and [[ProducerController]] or [[WorkPullingProducerController]] are used * together. See the descriptions in those classes or the Pekko reference documentation for diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueue.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueue.scala index 82665b917f6..87e72d8a5b2 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueue.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueue.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.delivery import scala.collection.immutable import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.delivery.internal.ChunkedMessage import pekko.actor.typed.delivery.internal.DeliverySerializable diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala index 7d4368642eb..7ecc48dcd25 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala @@ -22,6 +22,9 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior @@ -33,8 +36,6 @@ import pekko.annotation.InternalApi import pekko.util.Helpers.Requiring import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - /** * Point-to-point reliable delivery between a single producer actor sending messages and a single consumer * actor receiving the messages. Used together with [[ConsumerController]]. diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala index b3a63a58588..139ddb0c4c2 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala @@ -21,6 +21,9 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem @@ -30,8 +33,6 @@ import pekko.actor.typed.receptionist.ServiceKey import pekko.actor.typed.scaladsl.Behaviors import pekko.annotation.ApiMayChange -import com.typesafe.config.Config - /** * Work pulling is a pattern where several worker actors pull tasks in their own pace from * a shared work manager instead of that the manager pushes work to the workers blindly diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ChunkedMessage.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ChunkedMessage.scala index 7c6445fb9a8..35ddbb5b996 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ChunkedMessage.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ChunkedMessage.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.delivery.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.ByteString diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala index d039a6aff13..0096174dbe7 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.delivery.internal import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.PostStop diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala index 46860168b79..7aeff723698 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala @@ -22,6 +22,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.actor.DeadLetterSuppression import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala index 2e8b008bee1..9a384df6a9d 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala @@ -23,6 +23,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala index 07190a07c49..5f15f98175a 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.eventstream import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.InvalidMessageException import pekko.actor.typed.ActorRef import pekko.annotation.{ DoNotInherit, InternalApi } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala index 7f3842dff36..f0d1e4576e2 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala @@ -20,8 +20,8 @@ import java.util.Optional import java.util.concurrent.CompletionStage import scala.annotation.{ nowarn, switch } -import scala.concurrent.{ ExecutionContextExecutor, Future } import scala.concurrent.ExecutionContext +import scala.concurrent.{ ExecutionContextExecutor, Future } import scala.jdk.DurationConverters._ import scala.reflect.ClassTag import scala.util.Failure @@ -29,6 +29,10 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + +import org.slf4j.Logger +import org.slf4j.LoggerFactory + import pekko.actor.Address import pekko.actor.typed.internal.adapter.ActorSystemAdapter import pekko.annotation.InternalApi @@ -37,9 +41,6 @@ import pekko.util.BoxedType import pekko.util.OptionVal import pekko.util.Timeout -import org.slf4j.Logger -import org.slf4j.LoggerFactory - /** * INTERNAL API */ diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorFlightRecorder.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorFlightRecorder.scala index f6bdfd77cb6..c10379eb35c 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorFlightRecorder.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorFlightRecorder.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + import pekko.actor.ActorPath import pekko.actor.typed.{ ActorSystem, Extension, ExtensionId } import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala index 7fa5c7c83d1..83d6fe8ae16 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala @@ -17,6 +17,7 @@ package internal import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.{ TypedActorContext => AC } import pekko.actor.typed.scaladsl.{ ActorContext => SAC } import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/EventStreamExtension.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/EventStreamExtension.scala index 899b9514654..9a3cfb1a220 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/EventStreamExtension.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/EventStreamExtension.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + import pekko.actor.typed._ import pekko.actor.typed.eventstream.EventStream import pekko.actor.typed.internal.adapter.EventStreamAdapter diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala index bfb75f180c8..d54bc4fedbd 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala @@ -21,6 +21,7 @@ import scala.jdk.CollectionConverters._ import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor.typed.{ ActorSystem, Extension, ExtensionId, Extensions } import pekko.actor.typed.ExtensionSetup import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala index c5a0fa3c698..d840e756ca0 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala @@ -16,6 +16,10 @@ package org.apache.pekko.actor.typed.internal import scala.reflect.ClassTag import org.apache.pekko + +import org.slf4j.LoggerFactory +import org.slf4j.event.Level + import pekko.actor.typed import pekko.actor.typed._ import pekko.actor.typed.LogOptions @@ -23,9 +27,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.annotation.InternalApi import pekko.util.LineNumbers -import org.slf4j.LoggerFactory -import org.slf4j.event.Level - /** * Provides the impl of any behavior that could nest another behavior * diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalMessage.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalMessage.scala index 550f293a569..c8916d6c937 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalMessage.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalMessage.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + import pekko.actor.WrappedMessage import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalRecipientRef.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalRecipientRef.scala index b70491d62af..94e8b35b6cf 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalRecipientRef.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InternalRecipientRef.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + import pekko.actor.ActorRefProvider import pekko.actor.typed.RecipientRef import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala index 94a150a0d6c..d8583e762d7 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.internal import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.OptionVal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/MiscMessageSerializer.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/MiscMessageSerializer.scala index 5de797568f2..ea6a5b7a4e4 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/MiscMessageSerializer.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/MiscMessageSerializer.scala @@ -17,6 +17,7 @@ import java.io.NotSerializableException import java.nio.charset.StandardCharsets import org.apache.pekko + import pekko.actor.typed.{ ActorRef, ActorRefResolver } import pekko.actor.typed.scaladsl.adapter._ import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PoisonPill.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PoisonPill.scala index 76372e913e3..9a56a6c750c 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PoisonPill.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PoisonPill.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.BehaviorInterceptor import pekko.actor.typed.BehaviorSignalInterceptor diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PropsImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PropsImpl.scala index 2def6324210..7c2caeea8c9 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PropsImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/PropsImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal import org.apache.pekko + import pekko.actor.typed.{ DispatcherSelector, MailboxSelector, Props } import pekko.actor.typed.ActorTags import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala index b0dc053a573..3484bcd5dbb 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala @@ -13,14 +13,15 @@ package org.apache.pekko.actor.typed.internal -import java.util.function.{ Function => JFunction } import java.util.function.Predicate +import java.util.function.{ Function => JFunction } import scala.annotation.nowarn import scala.annotation.tailrec import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.DeadLetter import pekko.actor.typed.Behavior import pekko.actor.typed.Signal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala index 396637bd2b6..2f41633cf32 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala @@ -25,6 +25,9 @@ import scala.util.control.Exception.Catcher import scala.util.control.NonFatal import org.apache.pekko + +import org.slf4j.event.Level + import pekko.actor.DeadLetterSuppression import pekko.actor.Dropped import pekko.actor.typed.BehaviorInterceptor.PreStartTarget @@ -37,8 +40,6 @@ import pekko.annotation.InternalApi import pekko.event.Logging import pekko.util.OptionVal -import org.slf4j.event.Level - /** * INTERNAL API */ diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala index 8672770e2ec..424b0917c95 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala @@ -20,13 +20,14 @@ import scala.concurrent.ExecutionContext import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import org.slf4j.Logger + import pekko.actor.{ Cancellable, NotInfluenceReceiveTimeout } import pekko.actor.typed.scaladsl.{ ActorContext, LoggerOps } import pekko.annotation.InternalApi import pekko.util.OptionVal -import org.slf4j.Logger - /** * INTERNAL API */ diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala index 251debe7b63..c61cb39cf05 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala @@ -16,11 +16,12 @@ package org.apache.pekko.actor.typed.internal import scala.reflect.ClassTag import org.apache.pekko -import pekko.actor.typed.{ Behavior, BehaviorInterceptor, Signal, TypedActorContext } -import pekko.annotation.InternalApi import org.slf4j.MDC +import pekko.actor.typed.{ Behavior, BehaviorInterceptor, Signal, TypedActorContext } +import pekko.annotation.InternalApi + /** * INTERNAL API */ diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorAdapter.scala index 7bee9f44f14..320105c1aa1 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorAdapter.scala @@ -23,6 +23,7 @@ import scala.util.control.Exception.Catcher import scala.util.control.NonFatal import org.apache.pekko + import pekko.{ actor => classic } import pekko.actor.ActorInitializationException import pekko.actor.ActorRefWithCell diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorContextAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorContextAdapter.scala index 45b256b1074..94cfd064790 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorContextAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorContextAdapter.scala @@ -19,6 +19,7 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ import org.apache.pekko + import pekko.{ actor => classic } import pekko.annotation.InternalApi import pekko.util.OptionVal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefAdapter.scala index 05e76a921da..15b37cdbe53 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefAdapter.scala @@ -16,6 +16,7 @@ package internal package adapter import org.apache.pekko + import pekko.{ actor => classic } import pekko.actor.ActorRefProvider import pekko.actor.InvalidMessageException diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefFactoryAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefFactoryAdapter.scala index 4611fd92435..8bdbcb9b0f5 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefFactoryAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorRefFactoryAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.adapter import org.apache.pekko + import pekko.ConfigurationException import pekko.actor.typed._ import pekko.actor.typed.internal.CachedProps diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala index 8a599493eb7..5e41badbbf3 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala @@ -19,6 +19,9 @@ import scala.concurrent.ExecutionContextExecutor import scala.jdk.FutureConverters._ import org.apache.pekko + +import org.slf4j.{ Logger, LoggerFactory } + import pekko.{ actor => classic } import pekko.Done import pekko.actor @@ -43,8 +46,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.annotation.InternalApi import pekko.util.OptionVal -import org.slf4j.{ Logger, LoggerFactory } - /** * INTERNAL API. Lightweight wrapper for presenting a classic ActorSystem to a Behavior (via the context). * Therefore it does not have a lot of vals, only the whenTerminated Future is cached after diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/AdapterExtension.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/AdapterExtension.scala index 26df65de487..1bf55dc4ab9 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/AdapterExtension.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/AdapterExtension.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.adapter import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/EventStreamAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/EventStreamAdapter.scala index 69812b8311c..9031a36069c 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/EventStreamAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/EventStreamAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.adapter import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.eventstream.EventStream import pekko.actor.typed.scaladsl.Behaviors diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/GuardianStartupBehavior.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/GuardianStartupBehavior.scala index d719a372326..7c8d668df88 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/GuardianStartupBehavior.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/GuardianStartupBehavior.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.adapter import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.BehaviorInterceptor import pekko.actor.typed.Signal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapter.scala index 8847ebb0da0..a9c157eedce 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/PropsAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.adapter import org.apache.pekko + import pekko.actor.Deploy import pekko.actor.LocalScope import pekko.actor.TypedCreatorFunctionConsumer diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/SchedulerAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/SchedulerAdapter.scala index 109c7fe01ec..57d966bb4e3 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/SchedulerAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/SchedulerAdapter.scala @@ -19,6 +19,7 @@ import scala.concurrent.ExecutionContext import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.Cancellable import pekko.actor.typed.Scheduler import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/Events.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/Events.scala index 1b330187e20..405db3c41b7 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/Events.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/Events.scala @@ -13,14 +13,14 @@ package org.apache.pekko.actor.typed.internal.jfr +import org.apache.pekko.annotation.InternalApi + import jdk.jfr.Category import jdk.jfr.Enabled import jdk.jfr.Event import jdk.jfr.Label import jdk.jfr.StackTrace -import org.apache.pekko.annotation.InternalApi - // requires jdk.jfr (available since JDK 9, project baseline is Java 17) /** INTERNAL API */ diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/JFRActorFlightRecorder.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/JFRActorFlightRecorder.scala index 1b56744a73b..8959c52dc88 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/JFRActorFlightRecorder.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/jfr/JFRActorFlightRecorder.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.jfr import org.apache.pekko + import pekko.actor.ActorPath import pekko.actor.typed.internal.ActorFlightRecorder import pekko.actor.typed.internal.DeliveryFlightRecorder diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/pubsub/TopicImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/pubsub/TopicImpl.scala index 0189696b6ac..7f15ad180ed 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/pubsub/TopicImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/pubsub/TopicImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.internal.pubsub import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.Dropped import pekko.actor.InvalidMessageException import pekko.actor.typed.ActorRef diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala index 38269c7e421..e930cfe5ce6 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.receptionist import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.receptionist.Receptionist._ diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistImpl.scala index 762e660feee..7e0423cb612 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.receptionist import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Dispatchers diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala index 8e212d6ef8f..525fee3eb6a 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.internal.receptionist import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.receptionist.{ Receptionist, ServiceKey } import pekko.actor.typed.receptionist.Receptionist.Command diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKey.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKey.scala index 8ea6577bde9..c06bc9f294f 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKey.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKey.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.internal.receptionist import org.apache.pekko + import pekko.actor.typed.receptionist.ServiceKey import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializer.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializer.scala index 9316e45b542..71a46f842f2 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializer.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.internal.receptionist import java.nio.charset.StandardCharsets import org.apache.pekko + import pekko.actor.typed.receptionist.ServiceKey import pekko.annotation.InternalApi import pekko.serialization.{ BaseSerializer, SerializerWithStringManifest } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/GroupRouterImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/GroupRouterImpl.scala index 4d006cf2e3d..603cf16e4d9 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/GroupRouterImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/GroupRouterImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.internal.routing import java.util.function import org.apache.pekko + import pekko.actor.Dropped import pekko.actor.typed._ import pekko.actor.typed.eventstream.EventStream diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala index bd043aca0af..ba4118c4a34 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala @@ -17,6 +17,7 @@ import java.util.function import java.util.function.Predicate import org.apache.pekko + import pekko.actor.typed._ import pekko.actor.typed.javadsl.PoolRouter import pekko.actor.typed.scaladsl.{ AbstractBehavior, ActorContext, Behaviors } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogic.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogic.scala index e06b1e598ec..ece614824a3 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogic.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogic.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.internal.routing import java.util.concurrent.ThreadLocalRandom import org.apache.pekko + import pekko.actor.Address import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractBehavior.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractBehavior.scala index 0b8a2041561..4f8167ab29c 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractBehavior.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractBehavior.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.javadsl import org.apache.pekko + import pekko.actor.typed.{ Behavior, ExtensibleBehavior, Signal, TypedActorContext } import pekko.util.OptionVal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractMatchingBehavior.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractMatchingBehavior.scala index c0e0762f536..ef7b384c0fc 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractMatchingBehavior.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AbstractMatchingBehavior.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.javadsl import org.apache.pekko + import pekko.actor.typed.{ Behavior, ExtensibleBehavior, MessageAdaptionFailure, Signal, TypedActorContext } /** diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala index 4c5d3519c3e..6bcbf10b215 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala @@ -20,13 +20,14 @@ import java.util.concurrent.CompletionStage import scala.concurrent.ExecutionContextExecutor import org.apache.pekko + +import org.slf4j.Logger + import pekko.actor.ClassicActorContextProvider import pekko.actor.typed._ import pekko.annotation.DoNotInherit import pekko.pattern.StatusReply -import org.slf4j.Logger - /** * An Actor is given by the combination of a [[Behavior]] and a context in * which this behavior is executed. As per the Actor Model an Actor can perform diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Adapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Adapter.scala index 4aa942d4b7e..98c090cdb72 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Adapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Adapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.javadsl import org.apache.pekko + import pekko.actor import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala index 58b47af6b31..6833f2c38e3 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala @@ -21,6 +21,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.actor.typed.Scheduler import pekko.actor.typed.scaladsl.AskPattern._ import pekko.japi.function.{ Function => JFunction } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala index a8e4a5dd56f..962df650801 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala @@ -15,9 +15,9 @@ package org.apache.pekko.actor.typed.javadsl import scala.annotation.tailrec -import BehaviorBuilder._ - import org.apache.pekko + +import BehaviorBuilder._ import pekko.actor.typed.Behavior import pekko.actor.typed.ExtensibleBehavior import pekko.actor.typed.Signal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala index 41e8a8b6783..3196351a7ca 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala @@ -21,6 +21,7 @@ import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed._ import pekko.actor.typed.internal.{ BehaviorImpl, StashBufferImpl, TimerSchedulerImpl, WithMdcBehaviorInterceptor } import pekko.japi.function.{ Effect, Function2 => JapiFunction2 } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Receive.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Receive.scala index f09bde29c98..118b5bc6d17 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Receive.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Receive.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.javadsl import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.ExtensibleBehavior import pekko.actor.typed.Signal diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala index fa706b65fb4..c01fb6eb234 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.javadsl import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.typed.{ Behavior, MessageAdaptionFailure, Signal } import pekko.annotation.InternalApi import pekko.japi.function.{ Creator, Function => JFunction, Predicate => JPredicate } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala index 0bdbf7e3f04..b4af40d28dd 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.javadsl import java.util.function.Predicate import org.apache.pekko + import pekko.actor.typed.{ Behavior, Props } import pekko.actor.typed.internal.BehaviorImpl.DeferredBehavior import pekko.actor.typed.internal.routing.{ GroupRouterBuilder, PoolRouterBuilder } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala index 1ddf7f4b815..4173b7a3c93 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala @@ -16,7 +16,8 @@ package org.apache.pekko.actor.typed.javadsl import java.util.function.{ Function => JFunction, Predicate } import org.apache.pekko -import pekko.actor.typed.{ scaladsl, Behavior } + +import pekko.actor.typed.{ Behavior, scaladsl } import pekko.annotation.DoNotInherit import pekko.japi.function.Procedure diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/pubsub/Topic.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/pubsub/Topic.scala index 10cd1ddc075..166dd6a4774 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/pubsub/Topic.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/pubsub/Topic.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.pubsub import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.internal.pubsub.TopicImpl diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala index 89fa1469d2c..98ccf4fb406 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala @@ -17,6 +17,7 @@ import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.{ ActorRef, ActorSystem, Extension, ExtensionId, ExtensionSetup } import pekko.actor.typed.internal.receptionist._ import pekko.annotation.DoNotInherit diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AbstractBehavior.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AbstractBehavior.scala index 490c04078df..ef61ff3e485 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AbstractBehavior.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AbstractBehavior.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + import pekko.actor.typed.{ Behavior, ExtensibleBehavior, Signal, TypedActorContext } import pekko.actor.typed.MessageAdaptionFailure diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala index e7565d03e7c..5811581eb2b 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala @@ -13,12 +13,15 @@ package org.apache.pekko.actor.typed.scaladsl -import scala.concurrent.{ ExecutionContextExecutor, Future } import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ ExecutionContextExecutor, Future } import scala.reflect.ClassTag import scala.util.Try import org.apache.pekko + +import org.slf4j.Logger + import pekko.actor.ClassicActorContextProvider import pekko.actor.typed._ import pekko.annotation.DoNotInherit @@ -26,8 +29,6 @@ import pekko.annotation.InternalApi import pekko.pattern.StatusReply import pekko.util.Timeout -import org.slf4j.Logger - /** * An Actor is given by the combination of a [[Behavior]] and a context in * which this behavior is executed. As per the Actor Model an Actor can perform diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala index 1fff9cc5b99..fef3c94d43a 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.concurrent.Future import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.RecipientRef diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala index bfeb4703898..3f30081edfd 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala @@ -17,6 +17,7 @@ package scaladsl import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.SuperviseBehavior import pekko.actor.typed.internal._ import pekko.annotation.{ DoNotInherit, InternalApi } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala index abbe5d0046d..0d9ff90b912 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + import pekko.actor.typed.{ Behavior, Props } import pekko.actor.typed.internal.routing.{ GroupRouterBuilder, PoolRouterBuilder } import pekko.actor.typed.receptionist.ServiceKey diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/StashBuffer.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/StashBuffer.scala index acc28f52d30..a94ab3d3e6b 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/StashBuffer.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/StashBuffer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.scaladsl import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.internal.StashBufferImpl import pekko.annotation.{ DoNotInherit, InternalApi } diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/PropsAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/PropsAdapter.scala index 5df5aad46a0..be73c693d0c 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/PropsAdapter.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/PropsAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor.typed.scaladsl.adapter import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.Props import pekko.actor.typed.SupervisorStrategy diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/package.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/package.scala index 99b1039c549..b0a561c3ad8 100644 --- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/package.scala +++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/package.scala @@ -15,6 +15,7 @@ package org.apache.pekko.actor.typed package scaladsl import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.actor.typed.internal.adapter.{ PropsAdapter => _, _ } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/actor/AbstractActor.scala b/actor/src/main/scala/org/apache/pekko/actor/AbstractActor.scala index 7bb3ce71a0f..6c09a97689e 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/AbstractActor.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/AbstractActor.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.runtime.BoxedUnit import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.dispatch.{ DequeBasedMessageQueueSemantics, diff --git a/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala b/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala index fd26155cedd..7a2fd67bcf1 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.japi.function.{ Effect, Function2, Predicate, Predicate2, Procedure, Procedure2, Procedure3 } /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala b/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala index bff3f4f22fa..e8370021842 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala @@ -20,6 +20,7 @@ import scala.annotation.tailrec import scala.annotation.varargs import org.apache.pekko + import pekko.japi.function.Creator /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/Actor.scala b/actor/src/main/scala/org/apache/pekko/actor/Actor.scala index 404c7e40e07..567b35a1697 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Actor.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Actor.scala @@ -21,6 +21,7 @@ import scala.beans.BeanProperty import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.PekkoException import pekko.annotation.InternalApi import pekko.event.LoggingAdapter diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala index 7d36e058895..d2131361dab 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala @@ -16,14 +16,15 @@ package org.apache.pekko.actor import java.io.{ NotSerializableException, ObjectOutputStream } import java.util.concurrent.ThreadLocalRandom -import scala.annotation.{ switch, tailrec } import scala.annotation.nowarn +import scala.annotation.{ switch, tailrec } import scala.collection.immutable import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration.Duration import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.dungeon.ChildrenContainer import pekko.annotation.{ InternalApi, InternalStableApi } import pekko.dispatch.{ Envelope, MessageDispatcher } diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorLogMarker.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorLogMarker.scala index 22f13abeb54..ee2e2d06942 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorLogMarker.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorLogMarker.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.event.LogMarker diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala index 9f347390097..0ac55cd8e11 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala @@ -20,6 +20,7 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi import pekko.dispatch._ diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorRefProvider.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorRefProvider.scala index 8655e38bf88..8d8eee6d291 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorRefProvider.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorRefProvider.scala @@ -20,6 +20,7 @@ import scala.concurrent.{ ExecutionContextExecutor, Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + import pekko.ConfigurationException import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala index 7facfe2e657..fa09afea131 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala @@ -27,6 +27,7 @@ import scala.language.implicitConversions import scala.util.Success import org.apache.pekko + import pekko.pattern.ask import pekko.routing.MurmurHash import pekko.util.{ Helpers, Timeout } diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala index 9c5accd751f..ef01b767c74 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala @@ -20,17 +20,20 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import scala.collection.immutable -import scala.concurrent.{ Await, ExecutionContext, ExecutionContextExecutor, Future, Promise } import scala.concurrent.blocking import scala.concurrent.duration.Duration +import scala.concurrent.{ Await, ExecutionContext, ExecutionContextExecutor, Future, Promise } import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ -import scala.util.{ Failure, Success, Try } import scala.util.control.{ ControlThrowable, NonFatal } +import scala.util.{ Failure, Success, Try } import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.ConfigurationException import pekko.actor.dungeon.ChildrenContainer import pekko.actor.setup.{ ActorSystemSetup, Setup } @@ -44,8 +47,6 @@ import pekko.serialization.SerializationExtension import pekko.util._ import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.{ Config, ConfigFactory } - object BootstrapSetup { /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/Address.scala b/actor/src/main/scala/org/apache/pekko/actor/Address.scala index 96af95ef0ca..ad343898134 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Address.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Address.scala @@ -23,6 +23,7 @@ import scala.collection.immutable import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/ClassicActorSystemProvider.scala b/actor/src/main/scala/org/apache/pekko/actor/ClassicActorSystemProvider.scala index 550399b1453..3c1a55f2528 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ClassicActorSystemProvider.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ClassicActorSystemProvider.scala @@ -14,6 +14,7 @@ package org.apache.pekko.actor import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala b/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala index e11b514d359..fd1fcdcf559 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala @@ -14,30 +14,31 @@ package org.apache.pekko.actor import java.util.Optional -import java.util.concurrent._ import java.util.concurrent.TimeUnit.MILLISECONDS +import java.util.concurrent._ import java.util.concurrent.atomic.AtomicReference import java.util.function.Supplier import scala.annotation.tailrec -import scala.concurrent.{ Await, ExecutionContext, Future, Promise } -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.annotation.InternalApi import pekko.event.Logging import pekko.pattern.after import pekko.util.OptionVal -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object CoordinatedShutdown extends ExtensionId[CoordinatedShutdown] with ExtensionIdProvider { /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala b/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala index deb8b89133b..33dad6169be 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala @@ -19,12 +19,13 @@ import scala.annotation.nowarn import scala.annotation.tailrec import org.apache.pekko + +import com.typesafe.config._ + import pekko.annotation.InternalApi import pekko.routing._ import pekko.util.WildcardIndex -import com.typesafe.config._ - object Deploy { final val NoDispatcherGiven = "" final val NoMailboxGiven = "" diff --git a/actor/src/main/scala/org/apache/pekko/actor/DynamicAccess.scala b/actor/src/main/scala/org/apache/pekko/actor/DynamicAccess.scala index dd89062f804..caea889951e 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/DynamicAccess.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/DynamicAccess.scala @@ -18,6 +18,7 @@ import scala.reflect.ClassTag import scala.util.Try import org.apache.pekko + import pekko.annotation.DoNotInherit /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/FSM.scala b/actor/src/main/scala/org/apache/pekko/actor/FSM.scala index 8f3fe318b6e..8f5523c62e3 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/FSM.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/FSM.scala @@ -16,13 +16,13 @@ package org.apache.pekko.actor import scala.annotation.nowarn import scala.collection.mutable import scala.concurrent.ExecutionContextExecutor -import scala.concurrent.duration._ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration - -import language.implicitConversions +import scala.concurrent.duration._ import org.apache.pekko + +import language.implicitConversions import pekko.annotation.InternalApi import pekko.routing.{ Deafen, Listen, Listeners } diff --git a/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala b/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala index 73b97fb7f6b..020d7494d6c 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala @@ -13,8 +13,8 @@ package org.apache.pekko.actor -import java.lang.{ Iterable => JIterable } import java.lang.reflect.InvocationTargetException +import java.lang.{ Iterable => JIterable } import java.util.concurrent.TimeUnit import scala.collection.immutable @@ -25,6 +25,7 @@ import scala.language.implicitConversions import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.event.Logging import pekko.event.Logging.{ Error, LogEvent, LogLevel } diff --git a/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala b/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala index 0c011c293ba..15d16b0bb40 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.japi.function.Creator import pekko.util.Reflect diff --git a/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala b/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala index 2d4e409501f..9a97ef5a28f 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala @@ -20,18 +20,19 @@ import java.util.concurrent.atomic.{ AtomicLong, AtomicReference } import scala.annotation.tailrec import scala.collection.immutable -import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Scheduler.AtomicCancellable import pekko.dispatch.AbstractNodeQueue import pekko.event.LoggingAdapter import pekko.util.Helpers -import com.typesafe.config.Config - /** * This scheduler implementation is based on a revolving wheel of buckets, * like Netty’s HashedWheelTimer, which it advances at a fixed tick rate and diff --git a/actor/src/main/scala/org/apache/pekko/actor/Props.scala b/actor/src/main/scala/org/apache/pekko/actor/Props.scala index 2d8c4abf467..cbe5064921e 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Props.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Props.scala @@ -18,6 +18,7 @@ import scala.collection.immutable import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.Deploy.{ NoDispatcherGiven, NoMailboxGiven } import pekko.dispatch._ import pekko.routing._ diff --git a/actor/src/main/scala/org/apache/pekko/actor/ReflectiveDynamicAccess.scala b/actor/src/main/scala/org/apache/pekko/actor/ReflectiveDynamicAccess.scala index 14d1aeb2116..d8f753d3f63 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ReflectiveDynamicAccess.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ReflectiveDynamicAccess.scala @@ -22,6 +22,7 @@ import scala.util.Failure import scala.util.Try import org.apache.pekko + import pekko.annotation.DoNotInherit /** diff --git a/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala b/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala index 5767188b8fd..fad369d18b0 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala @@ -13,8 +13,8 @@ package org.apache.pekko.actor -import java.util.{ LinkedList => JLinkedList } import java.util.concurrent.locks.ReentrantLock +import java.util.{ LinkedList => JLinkedList } import scala.annotation.nowarn import scala.annotation.tailrec @@ -22,6 +22,7 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.dungeon.ChildrenContainer import pekko.dispatch._ import pekko.dispatch.sysmsg._ diff --git a/actor/src/main/scala/org/apache/pekko/actor/Scheduler.scala b/actor/src/main/scala/org/apache/pekko/actor/Scheduler.scala index c6b36af79de..065b6c37692 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Scheduler.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Scheduler.scala @@ -21,6 +21,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor.Scheduler.AtomicCancellable import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/actor/Stash.scala b/actor/src/main/scala/org/apache/pekko/actor/Stash.scala index 104962a103f..4e681718d0c 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Stash.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Stash.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.PekkoException import pekko.annotation.InternalStableApi import pekko.dispatch.{ diff --git a/actor/src/main/scala/org/apache/pekko/actor/Timers.scala b/actor/src/main/scala/org/apache/pekko/actor/Timers.scala index c75574be4d5..b650b42710f 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/Timers.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/Timers.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.dispatch.Envelope import pekko.util.OptionVal diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala index d6845ecf4ec..2fb85eae5f7 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala @@ -21,6 +21,7 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalStableApi import pekko.serialization.{ Serialization, SerializationExtension, Serializers } diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ChildrenContainer.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ChildrenContainer.scala index bbba764ed9d..911029a4aed 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ChildrenContainer.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ChildrenContainer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.dungeon import scala.collection.immutable import org.apache.pekko + import pekko.actor.{ ActorRef, ChildNameReserved, ChildRestartStats, ChildStats, InvalidActorNameException } import pekko.util.Collections.{ EmptyImmutableSeq, PartialImmutableValuesIterable } diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala index b7353d688ab..a5acb11e3dd 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor.dungeon import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.{ Actor, ActorCell, ActorRef, ActorRefScope, Address, InternalActorRef, Terminated } import pekko.dispatch.sysmsg.{ DeathWatchNotification, Unwatch, Watch } import pekko.event.AddressTerminatedTopic diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala index 03ab027db62..6ed4959cc29 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala @@ -15,10 +15,11 @@ package org.apache.pekko.actor.dungeon import scala.annotation.nowarn import scala.annotation.tailrec -import scala.util.control.{ NoStackTrace, NonFatal } import scala.util.control.Exception.Catcher +import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.PekkoException import pekko.actor._ import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala index 928c02bca65..3c131882062 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala @@ -18,6 +18,7 @@ import scala.util.control.Exception._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ActorCell import pekko.actor.ActorInterruptedException import pekko.actor.ActorRef diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala index a8f4a67e653..ee7398189cf 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/ReceiveTimeout.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorCell import pekko.actor.Cancellable import pekko.actor.NotInfluenceReceiveTimeout diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala index e1ea980f3c8..4d4816669f1 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.actor import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.annotation.InternalApi import pekko.event.Logging import pekko.util.OptionVal diff --git a/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala b/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala index cfc541d84f2..e13a5bfdd58 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala @@ -20,6 +20,7 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala index 08a4b167670..c48942927d4 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala @@ -13,25 +13,26 @@ package org.apache.pekko.dispatch -import java.{ util => ju } import java.util.concurrent._ +import java.{ util => ju } import scala.annotation.{ nowarn, tailrec } -import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor } import scala.concurrent.duration.{ Duration, FiniteDuration } +import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor } import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.{ InternalApi, InternalStableApi } import pekko.dispatch.affinity.AffinityPoolConfigurator import pekko.dispatch.sysmsg._ import pekko.event.EventStream -import pekko.event.Logging.{ emptyMDC, Debug, Error, LogEventException, Warning } +import pekko.event.Logging.{ Debug, Error, LogEventException, Warning, emptyMDC } import pekko.util.Index -import com.typesafe.config.Config - final case class Envelope private (message: Any, sender: ActorRef) { @noinline // not inlined to permit downstream bytecode instrumentation to attach context information to the Envelope diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala index 79afca38ac3..85b98d3c11a 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala @@ -13,14 +13,15 @@ package org.apache.pekko.dispatch -import java.util.{ Comparator, Iterator } import java.util.concurrent.ConcurrentSkipListSet +import java.util.{ Comparator, Iterator } import scala.annotation.tailrec import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorCell import pekko.actor.ActorSystemImpl import pekko.dispatch.sysmsg._ diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala b/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala index ca0ac077ef7..b68fba1746f 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.concurrent._ import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala b/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala index 808f83016f5..8ed28d19ba8 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala @@ -18,8 +18,8 @@ package org.apache.pekko.dispatch import java.util.Optional -import java.util.concurrent.{ CompletableFuture, CompletionStage, Executor } import java.util.concurrent.atomic.AtomicReference +import java.util.concurrent.{ CompletableFuture, CompletionStage, Executor } import java.util.function.{ BiConsumer, BiFunction } import scala.annotation.nowarn diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala index 951cd75d21b..910fb695a30 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala @@ -13,14 +13,15 @@ package org.apache.pekko.dispatch -import java.util.concurrent.{ ExecutorService, RejectedExecutionException } import java.util.concurrent.atomic.AtomicReferenceFieldUpdater +import java.util.concurrent.{ ExecutorService, RejectedExecutionException } import scala.annotation.nowarn import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorCell import pekko.dispatch.sysmsg.SystemMessage import pekko.event.Logging diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala index 55aea4ae974..7d4b4af6ccc 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala @@ -19,6 +19,9 @@ import scala.annotation.{ nowarn, tailrec } import scala.concurrent.ExecutionContext import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory, ConfigValueType } + import pekko.ConfigurationException import pekko.actor.{ ActorSystem, DynamicAccess, Scheduler } import pekko.annotation.{ DoNotInherit, InternalApi } @@ -26,8 +29,6 @@ import pekko.event.{ EventStream, LoggingAdapter } import pekko.event.Logging.Warning import pekko.util.Helpers.ConfigOps -import com.typesafe.config.{ Config, ConfigFactory, ConfigValueType } - /** * DispatcherPrerequisites represents useful contextual pieces when constructing a MessageDispatcher */ diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Future.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Future.scala index 3cdab634e35..6ec6a3eb198 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Future.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Future.scala @@ -13,13 +13,14 @@ package org.apache.pekko.dispatch -import java.util.concurrent.{ Callable, Executor, ExecutorService } import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletionStage +import java.util.concurrent.{ Callable, Executor, ExecutorService } import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, ExecutionContextExecutorService, Future, Promise } import org.apache.pekko + import pekko.japi.function.Procedure /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala index 03ebf96a506..f14bbc8b326 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala @@ -13,16 +13,19 @@ package org.apache.pekko.dispatch -import java.util.{ Comparator, Deque, PriorityQueue, Queue } import java.util.concurrent._ import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.locks.ReentrantLock +import java.util.{ Comparator, Deque, PriorityQueue, Queue } import scala.annotation.tailrec import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ ActorCell, ActorRef, ActorSystem, DeadLetter, InternalActorRef } import pekko.annotation.InternalStableApi import pekko.dispatch.sysmsg._ @@ -30,8 +33,6 @@ import pekko.event.Logging.Error import pekko.util.{ BoundedBlockingQueue, StablePriorityBlockingQueue, StablePriorityQueue } import pekko.util.Helpers.ConfigOps -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala index f255eb832d4..4e77f74f451 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala @@ -22,6 +22,9 @@ import scala.concurrent.duration.Duration import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.ConfigurationException import pekko.actor.{ Actor, ActorRef, ActorSystem, DeadLetter, Deploy, DynamicAccess, Props } import pekko.annotation.InternalStableApi @@ -35,8 +38,6 @@ import pekko.event.EventStream import pekko.event.Logging.Warning import pekko.util.Reflect -import com.typesafe.config.{ Config, ConfigFactory } - object Mailboxes { final val DefaultMailboxId = "pekko.actor.default-mailbox" final val NoMailboxRequirement = "" diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/PinnedDispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/PinnedDispatcher.scala index 2e619f8a7ec..30c91233bdf 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/PinnedDispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/PinnedDispatcher.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorCell /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala b/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala index 20e69a1f233..e8e82892127 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala @@ -14,6 +14,7 @@ package org.apache.pekko.dispatch import java.util.Collection +import java.util.concurrent.atomic.{ AtomicLong, AtomicReference } import java.util.concurrent.{ ArrayBlockingQueue, BlockingQueue, @@ -30,12 +31,12 @@ import java.util.concurrent.{ ThreadPoolExecutor, TimeUnit } -import java.util.concurrent.atomic.{ AtomicLong, AtomicReference } -import scala.concurrent.{ BlockContext, CanAwait } import scala.concurrent.duration.Duration +import scala.concurrent.{ BlockContext, CanAwait } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.dispatch.VirtualThreadSupport.newVirtualThreadFactory diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala index f0953134629..bb2278a9e95 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala @@ -23,6 +23,7 @@ import java.util.concurrent.{ Executor, ExecutorService, ForkJoinPool, ForkJoinW import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.JavaVersion diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala index 160224cb047..5dd26697cb3 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala @@ -18,8 +18,8 @@ package org.apache.pekko.dispatch import java.util -import java.util.concurrent.{ Callable, Executor, ExecutorService, Future, ThreadFactory, TimeUnit } import java.util.concurrent.atomic.{ AtomicBoolean, AtomicInteger } +import java.util.concurrent.{ Callable, Executor, ExecutorService, Future, ThreadFactory, TimeUnit } import org.apache.pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala b/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala index 4262c2ae614..672cdd9bae5 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala @@ -15,8 +15,8 @@ package org.apache.pekko.dispatch.affinity import java.lang.Integer.reverseBytes import java.util.Collections -import java.util.concurrent._ import java.util.concurrent.TimeUnit.MICROSECONDS +import java.util.concurrent._ import java.util.concurrent.atomic.AtomicReference import java.util.concurrent.locks.{ LockSupport, ReentrantLock } @@ -24,14 +24,15 @@ import scala.annotation.{ switch, tailrec } import scala.collection.{ immutable, mutable } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.annotation.{ ApiMayChange, InternalApi } import pekko.dispatch._ import pekko.event.Logging import pekko.util.Helpers.Requiring import pekko.util.ImmutableIntMap -import com.typesafe.config.Config - @InternalApi @ApiMayChange private[affinity] object AffinityPool { diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/internal/ScalaBatchable.scala b/actor/src/main/scala/org/apache/pekko/dispatch/internal/ScalaBatchable.scala index 7345b5f0c8b..d4bf87df94d 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/internal/ScalaBatchable.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/internal/ScalaBatchable.scala @@ -14,6 +14,7 @@ package org.apache.pekko.dispatch.internal import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/sysmsg/SystemMessage.scala b/actor/src/main/scala/org/apache/pekko/dispatch/sysmsg/SystemMessage.scala index 803f81c6858..5477c646cb5 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/sysmsg/SystemMessage.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/sysmsg/SystemMessage.scala @@ -16,6 +16,7 @@ package org.apache.pekko.dispatch.sysmsg import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.{ ActorInitializationException, ActorRef, InternalActorRef, PossiblyHarmful } import pekko.actor.DeadLetterSuppression import pekko.annotation.InternalStableApi diff --git a/actor/src/main/scala/org/apache/pekko/event/ActorClassificationUnsubscriber.scala b/actor/src/main/scala/org/apache/pekko/event/ActorClassificationUnsubscriber.scala index 6ecf9220886..a2c0862387a 100644 --- a/actor/src/main/scala/org/apache/pekko/event/ActorClassificationUnsubscriber.scala +++ b/actor/src/main/scala/org/apache/pekko/event/ActorClassificationUnsubscriber.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicInteger import scala.annotation.nowarn import org.apache.pekko + import pekko.actor._ import pekko.event.Logging.simpleName diff --git a/actor/src/main/scala/org/apache/pekko/event/AddressTerminatedTopic.scala b/actor/src/main/scala/org/apache/pekko/event/AddressTerminatedTopic.scala index 0691cebde00..ed2ef7aca75 100644 --- a/actor/src/main/scala/org/apache/pekko/event/AddressTerminatedTopic.scala +++ b/actor/src/main/scala/org/apache/pekko/event/AddressTerminatedTopic.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.AddressTerminated diff --git a/actor/src/main/scala/org/apache/pekko/event/DeadLetterListener.scala b/actor/src/main/scala/org/apache/pekko/event/DeadLetterListener.scala index c3ee6dd2d8d..385aef32c28 100644 --- a/actor/src/main/scala/org/apache/pekko/event/DeadLetterListener.scala +++ b/actor/src/main/scala/org/apache/pekko/event/DeadLetterListener.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.Deadline import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogMarker import pekko.actor.ActorRef diff --git a/actor/src/main/scala/org/apache/pekko/event/EventBus.scala b/actor/src/main/scala/org/apache/pekko/event/EventBus.scala index 4e68fe1b816..4562f3e260d 100644 --- a/actor/src/main/scala/org/apache/pekko/event/EventBus.scala +++ b/actor/src/main/scala/org/apache/pekko/event/EventBus.scala @@ -20,6 +20,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.collection.immutable import org.apache.pekko + import pekko.actor.{ ActorRef, ActorSystem } import pekko.util.{ Subclassification, SubclassifiedIndex } import pekko.util.Index diff --git a/actor/src/main/scala/org/apache/pekko/event/EventStream.scala b/actor/src/main/scala/org/apache/pekko/event/EventStream.scala index 8e777f18709..ec1b23a16e6 100644 --- a/actor/src/main/scala/org/apache/pekko/event/EventStream.scala +++ b/actor/src/main/scala/org/apache/pekko/event/EventStream.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.{ ActorRef, ActorSystem } import pekko.event.Logging.simpleName import pekko.util.Subclassification diff --git a/actor/src/main/scala/org/apache/pekko/event/EventStreamUnsubscriber.scala b/actor/src/main/scala/org/apache/pekko/event/EventStreamUnsubscriber.scala index bf647e05c2c..ee34dd4ae23 100644 --- a/actor/src/main/scala/org/apache/pekko/event/EventStreamUnsubscriber.scala +++ b/actor/src/main/scala/org/apache/pekko/event/EventStreamUnsubscriber.scala @@ -16,6 +16,7 @@ package org.apache.pekko.event import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + import pekko.actor._ import pekko.dispatch.Dispatchers import pekko.event.Logging.simpleName diff --git a/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala b/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala index 6981a8c8385..08a25ae1c71 100644 --- a/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala +++ b/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala @@ -16,6 +16,9 @@ package org.apache.pekko.event import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.dispatch.MailboxType @@ -24,8 +27,6 @@ import pekko.dispatch.ProducesMessageQueue import pekko.dispatch.UnboundedMailbox import pekko.event.Logging.LogEvent -import com.typesafe.config.Config - trait LoggerMessageQueueSemantics /** diff --git a/actor/src/main/scala/org/apache/pekko/event/Logging.scala b/actor/src/main/scala/org/apache/pekko/event/Logging.scala index 3877e89f1e8..ce8d6a43da6 100644 --- a/actor/src/main/scala/org/apache/pekko/event/Logging.scala +++ b/actor/src/main/scala/org/apache/pekko/event/Logging.scala @@ -25,6 +25,7 @@ import scala.language.existentials import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.{ ConfigurationException, PekkoException } import pekko.actor._ import pekko.actor.ActorSystem.Settings diff --git a/actor/src/main/scala/org/apache/pekko/event/LoggingReceive.scala b/actor/src/main/scala/org/apache/pekko/event/LoggingReceive.scala index 95a8f871194..5bd3651bf4d 100644 --- a/actor/src/main/scala/org/apache/pekko/event/LoggingReceive.scala +++ b/actor/src/main/scala/org/apache/pekko/event/LoggingReceive.scala @@ -15,9 +15,9 @@ package org.apache.pekko.event import scala.runtime.BoxedUnit -import language.existentials - import org.apache.pekko + +import language.existentials import pekko.actor.AbstractActor import pekko.actor.Actor.Receive import pekko.actor.ActorCell diff --git a/actor/src/main/scala/org/apache/pekko/event/japi/EventBusJavaAPI.scala b/actor/src/main/scala/org/apache/pekko/event/japi/EventBusJavaAPI.scala index a21d88592b2..4fbcb8d400c 100644 --- a/actor/src/main/scala/org/apache/pekko/event/japi/EventBusJavaAPI.scala +++ b/actor/src/main/scala/org/apache/pekko/event/japi/EventBusJavaAPI.scala @@ -14,6 +14,7 @@ package org.apache.pekko.event.japi import org.apache.pekko + import pekko.actor.{ ActorRef, ActorSystem } import pekko.util.Subclassification diff --git a/actor/src/main/scala/org/apache/pekko/io/Dns.scala b/actor/src/main/scala/org/apache/pekko/io/Dns.scala index 94217052477..7e9a1d63bdf 100644 --- a/actor/src/main/scala/org/apache/pekko/io/Dns.scala +++ b/actor/src/main/scala/org/apache/pekko/io/Dns.scala @@ -20,14 +20,15 @@ import java.util.function.{ Function => JFunction } import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi import pekko.event.Logging import pekko.io.dns.DnsProtocol -import com.typesafe.config.Config - /** * Not for user extension. * diff --git a/actor/src/main/scala/org/apache/pekko/io/DnsProvider.scala b/actor/src/main/scala/org/apache/pekko/io/DnsProvider.scala index 5fe606224fd..43e01071435 100644 --- a/actor/src/main/scala/org/apache/pekko/io/DnsProvider.scala +++ b/actor/src/main/scala/org/apache/pekko/io/DnsProvider.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io import org.apache.pekko + import pekko.actor.Actor import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/io/IO.scala b/actor/src/main/scala/org/apache/pekko/io/IO.scala index 9a937eefe2e..9e7e4665ecc 100644 --- a/actor/src/main/scala/org/apache/pekko/io/IO.scala +++ b/actor/src/main/scala/org/apache/pekko/io/IO.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io import org.apache.pekko + import pekko.actor._ /** diff --git a/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala b/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala index f6102e28324..0d3a520da2e 100644 --- a/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala +++ b/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala @@ -13,9 +13,9 @@ package org.apache.pekko.io -import java.net.{ InetAddress, UnknownHostException } import java.net.Inet4Address import java.net.Inet6Address +import java.net.{ InetAddress, UnknownHostException } import java.security.Security import java.util.concurrent.TimeUnit @@ -24,6 +24,9 @@ import scala.concurrent.duration._ import scala.util.{ Failure, Success, Try } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ Actor, ActorLogging } import pekko.actor.Status import pekko.annotation.InternalApi @@ -36,8 +39,6 @@ import pekko.io.dns.DnsProtocol.Srv import pekko.io.dns.ResourceRecord import pekko.util.Helpers.Requiring -import com.typesafe.config.Config - /** * INTERNAL API * diff --git a/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala b/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala index c6e2f869cf5..f825ee12569 100644 --- a/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala +++ b/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala @@ -13,12 +13,12 @@ package org.apache.pekko.io -import java.nio.channels.{ CancelledKeyException, SelectableChannel, SelectionKey } import java.nio.channels.ClosedChannelException import java.nio.channels.SelectionKey._ import java.nio.channels.spi.SelectorProvider -import java.util.{ Iterator => JIterator } +import java.nio.channels.{ CancelledKeyException, SelectableChannel, SelectionKey } import java.util.concurrent.atomic.AtomicBoolean +import java.util.{ Iterator => JIterator } import scala.annotation.tailrec import scala.concurrent.ExecutionContext @@ -26,6 +26,9 @@ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.event.Logging @@ -34,8 +37,6 @@ import pekko.routing.RandomPool import pekko.util.Helpers.Requiring import pekko.util.SerializedSuspendableExecutionContext -import com.typesafe.config.Config - abstract class SelectionHandlerSettings(config: Config) { import config._ diff --git a/actor/src/main/scala/org/apache/pekko/io/SimpleDnsCache.scala b/actor/src/main/scala/org/apache/pekko/io/SimpleDnsCache.scala index 27e735ff2fa..12f03a645ff 100644 --- a/actor/src/main/scala/org/apache/pekko/io/SimpleDnsCache.scala +++ b/actor/src/main/scala/org/apache/pekko/io/SimpleDnsCache.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.actor.NoSerializationVerificationNeeded import pekko.annotation.InternalApi import pekko.io.dns.CachePolicy.CachePolicy diff --git a/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala b/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala index 62a24818462..8ffd1d5ac53 100644 --- a/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala +++ b/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala @@ -18,6 +18,7 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration.Duration import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, Deploy, Props } import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.routing.FromConfig diff --git a/actor/src/main/scala/org/apache/pekko/io/Tcp.scala b/actor/src/main/scala/org/apache/pekko/io/Tcp.scala index 97641f90ce7..7177e89c3db 100644 --- a/actor/src/main/scala/org/apache/pekko/io/Tcp.scala +++ b/actor/src/main/scala/org/apache/pekko/io/Tcp.scala @@ -25,14 +25,15 @@ import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.InternalApi import pekko.io.Inet._ import pekko.util.{ ByteString, Helpers } import pekko.util.Helpers.Requiring -import com.typesafe.config.Config - /** * TCP Extension for Akka’s IO layer. * diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala b/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala index b866f99ed03..ad100d7791d 100644 --- a/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala +++ b/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala @@ -16,8 +16,8 @@ package org.apache.pekko.io import java.io.IOException import java.net.{ InetSocketAddress, SocketException } import java.nio.ByteBuffer -import java.nio.channels.{ FileChannel, SocketChannel } import java.nio.channels.SelectionKey._ +import java.nio.channels.{ FileChannel, SocketChannel } import java.nio.file.Path import scala.annotation.nowarn @@ -27,6 +27,7 @@ import scala.concurrent.duration._ import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.actor._ import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.io.Inet.SocketOption diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala b/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala index 5adb59024ae..26f8e296138 100644 --- a/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala +++ b/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.actor.ActorRef import pekko.io.Inet.SocketOption diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpListener.scala b/actor/src/main/scala/org/apache/pekko/io/TcpListener.scala index db4f5238d97..a8246a887ff 100644 --- a/actor/src/main/scala/org/apache/pekko/io/TcpListener.scala +++ b/actor/src/main/scala/org/apache/pekko/io/TcpListener.scala @@ -20,6 +20,7 @@ import scala.annotation.tailrec import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor._ import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.io.SelectionHandler._ diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpManager.scala b/actor/src/main/scala/org/apache/pekko/io/TcpManager.scala index af3bde377b0..b2e0ef3eede 100644 --- a/actor/src/main/scala/org/apache/pekko/io/TcpManager.scala +++ b/actor/src/main/scala/org/apache/pekko/io/TcpManager.scala @@ -13,9 +13,9 @@ package org.apache.pekko.io -import Tcp._ - import org.apache.pekko + +import Tcp._ import pekko.actor.{ ActorLogging, Props } /** diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpOutgoingConnection.scala b/actor/src/main/scala/org/apache/pekko/io/TcpOutgoingConnection.scala index 34c678ce208..a0a1e9d3b59 100644 --- a/actor/src/main/scala/org/apache/pekko/io/TcpOutgoingConnection.scala +++ b/actor/src/main/scala/org/apache/pekko/io/TcpOutgoingConnection.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration._ import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.actor.{ ActorRef, ReceiveTimeout, Timers } import pekko.actor.Status.Failure import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/io/Udp.scala b/actor/src/main/scala/org/apache/pekko/io/Udp.scala index 995f463f4f5..c978e7915d3 100644 --- a/actor/src/main/scala/org/apache/pekko/io/Udp.scala +++ b/actor/src/main/scala/org/apache/pekko/io/Udp.scala @@ -20,13 +20,14 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.io.Inet.{ SoJavaFactories, SocketOption } import pekko.util.ByteString import pekko.util.Helpers.Requiring -import com.typesafe.config.Config - /** * UDP Extension for Akka’s IO layer. * diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala b/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala index cb670dbc385..aa7ecb43ec1 100644 --- a/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala +++ b/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala @@ -20,6 +20,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.actor._ import pekko.io.Inet.SocketOption import pekko.io.Udp.UdpSettings diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpConnectedManager.scala b/actor/src/main/scala/org/apache/pekko/io/UdpConnectedManager.scala index c0f486ce5e9..41dfba1731b 100644 --- a/actor/src/main/scala/org/apache/pekko/io/UdpConnectedManager.scala +++ b/actor/src/main/scala/org/apache/pekko/io/UdpConnectedManager.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io import org.apache.pekko + import pekko.actor.Props import pekko.io.UdpConnected.Connect diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpConnection.scala b/actor/src/main/scala/org/apache/pekko/io/UdpConnection.scala index 0f984f73666..b55819dd529 100644 --- a/actor/src/main/scala/org/apache/pekko/io/UdpConnection.scala +++ b/actor/src/main/scala/org/apache/pekko/io/UdpConnection.scala @@ -22,6 +22,7 @@ import scala.annotation.{ nowarn, tailrec } import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, ActorRef } import pekko.actor.Status.Failure import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpListener.scala b/actor/src/main/scala/org/apache/pekko/io/UdpListener.scala index e59180059ab..19a9dc0ee94 100644 --- a/actor/src/main/scala/org/apache/pekko/io/UdpListener.scala +++ b/actor/src/main/scala/org/apache/pekko/io/UdpListener.scala @@ -21,6 +21,7 @@ import scala.annotation.tailrec import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, ActorRef } import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.io.Inet.DatagramChannelCreator diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpManager.scala b/actor/src/main/scala/org/apache/pekko/io/UdpManager.scala index cf8a57f188d..1646908f98b 100644 --- a/actor/src/main/scala/org/apache/pekko/io/UdpManager.scala +++ b/actor/src/main/scala/org/apache/pekko/io/UdpManager.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io import org.apache.pekko + import pekko.actor.Props import pekko.io.Udp._ diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala b/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala index a0bc4f598a0..c7e1d85df3d 100644 --- a/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala +++ b/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor._ import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.io.Inet.DatagramChannelCreator diff --git a/actor/src/main/scala/org/apache/pekko/io/WithUdpSend.scala b/actor/src/main/scala/org/apache/pekko/io/WithUdpSend.scala index cf262fdc294..7154c9c1540 100644 --- a/actor/src/main/scala/org/apache/pekko/io/WithUdpSend.scala +++ b/actor/src/main/scala/org/apache/pekko/io/WithUdpSend.scala @@ -19,6 +19,7 @@ import java.nio.channels.{ DatagramChannel, SelectionKey } import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, ActorRef } import pekko.io.SelectionHandler._ import pekko.io.Udp.{ CommandFailed, Send } diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala b/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala index 803192fe2dc..fcd9137462b 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.{ Duration, FiniteDuration, _ } import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.annotation.InternalApi object CachePolicy { diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala b/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala index 665665ebbb7..fbac32b9fa3 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala @@ -23,6 +23,7 @@ import scala.collection.{ immutable => im } import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.NoSerializationVerificationNeeded import pekko.io.IpVersionSelector import pekko.routing.ConsistentHashingRouter.ConsistentHashable diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/DnsResourceRecords.scala b/actor/src/main/scala/org/apache/pekko/io/dns/DnsResourceRecords.scala index a02d6f3eadb..d5ca472d552 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/DnsResourceRecords.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/DnsResourceRecords.scala @@ -19,9 +19,9 @@ import scala.annotation.nowarn import scala.annotation.switch import scala.concurrent.duration._ -import CachePolicy._ - import org.apache.pekko + +import CachePolicy._ import pekko.actor.NoSerializationVerificationNeeded import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala b/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala index fde89e6c816..477b11c59b4 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala @@ -41,6 +41,9 @@ import scala.jdk.DurationConverters._ import scala.util.{ Failure, Success, Try } import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigValueType } + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.event.Logging @@ -50,8 +53,6 @@ import pekko.io.dns.internal.{ ResolvConf, ResolvConfParser } import pekko.util.Helpers import pekko.util.Helpers.Requiring -import com.typesafe.config.{ Config, ConfigValueType } - /** INTERNAL API */ @InternalApi private[dns] final class DnsSettings(system: ExtendedActorSystem, c: Config) { diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala index 28e904b508b..d41029108d8 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala @@ -20,6 +20,9 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration.Duration import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ Actor, ActorLogging, ActorRefFactory, Deploy, ExtendedActorSystem, Props, Timers } import pekko.annotation.InternalApi import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } @@ -30,8 +33,6 @@ import pekko.io.dns.internal.AsyncDnsManager.CacheCleanup import pekko.routing.FromConfig import pekko.util.Timeout -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsProvider.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsProvider.scala index 74615eb1459..0748027f94d 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsProvider.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsProvider.scala @@ -16,6 +16,7 @@ package org.apache.pekko.io.dns.internal import scala.annotation.nowarn import org.apache.pekko + import pekko.annotation.InternalApi import pekko.io._ diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala index 89b2059bf59..80ad8be498c 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala @@ -17,12 +17,13 @@ import java.net.{ Inet4Address, Inet6Address, InetAddress, InetSocketAddress } import scala.annotation.tailrec import scala.collection.immutable -import scala.concurrent.{ ExecutionContextExecutor, Future, Promise } import scala.concurrent.ExecutionContext.parasitic -import scala.util.{ Failure, Success, Try } +import scala.concurrent.{ ExecutionContextExecutor, Future, Promise } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, ActorRef, ActorRefFactory, NoSerializationVerificationNeeded, Props, Status } import pekko.annotation.InternalApi import pekko.io.SimpleDnsCache diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala index 72b6619c53a..8746828002e 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala @@ -21,6 +21,7 @@ import scala.concurrent.duration._ import scala.util.Try import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, ActorRef, NoSerializationVerificationNeeded, Props, Stash } import pekko.actor.Status.Failure import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala index a94f0d621cb..328ce486b83 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala @@ -19,6 +19,7 @@ import scala.collection.immutable.Seq import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.io.dns.ResourceRecord import pekko.util.{ ByteString, ByteStringBuilder } diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DomainName.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DomainName.scala index e0e92d7c0ef..b794b446e3f 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DomainName.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DomainName.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io.dns.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.{ ByteIterator, ByteString, ByteStringBuilder } diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/Question.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/Question.scala index 87a4cc66bfb..1cd6e5519f6 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/Question.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/Question.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io.dns.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.io.dns.{ RecordClass, RecordType } import pekko.util.{ ByteIterator, ByteString, ByteStringBuilder } diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordClassSerializer.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordClassSerializer.scala index 54c07f4e827..79d4a7c0742 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordClassSerializer.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordClassSerializer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io.dns.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.io.dns.RecordClass import pekko.util.{ ByteIterator, ByteStringBuilder } diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordTypeSerializer.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordTypeSerializer.scala index 5ece7fa85b8..4672c74fd60 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordTypeSerializer.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/RecordTypeSerializer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.io.dns.internal import org.apache.pekko + import pekko.io.dns.RecordType import pekko.util.{ ByteIterator, ByteStringBuilder, OptionVal } diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala index a85f36d0739..c57803fef34 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala @@ -16,6 +16,7 @@ package org.apache.pekko.io.dns.internal import java.net.InetSocketAddress import org.apache.pekko + import pekko.PekkoException import pekko.actor.{ Actor, ActorLogging, ActorRef, Stash, Terminated } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/package.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/package.scala index e5986a2a2bd..c6ec2c87352 100644 --- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/package.scala +++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/package.scala @@ -16,6 +16,7 @@ package org.apache.pekko.io.dns import java.nio.ByteOrder import org.apache.pekko + import pekko.annotation.InternalApi import pekko.io.dns.CachePolicy.{ CachePolicy, Forever, Never, Ttl } diff --git a/actor/src/main/scala/org/apache/pekko/japi/JavaAPI.scala b/actor/src/main/scala/org/apache/pekko/japi/JavaAPI.scala index d89ac697b44..a533ec75180 100644 --- a/actor/src/main/scala/org/apache/pekko/japi/JavaAPI.scala +++ b/actor/src/main/scala/org/apache/pekko/japi/JavaAPI.scala @@ -19,6 +19,7 @@ import scala.runtime.AbstractPartialFunction import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.util.Collections.EmptyImmutableSeq /** diff --git a/actor/src/main/scala/org/apache/pekko/japi/pf/CaseStatements.scala b/actor/src/main/scala/org/apache/pekko/japi/pf/CaseStatements.scala index f7f4b06b167..1d90129fa8f 100644 --- a/actor/src/main/scala/org/apache/pekko/japi/pf/CaseStatements.scala +++ b/actor/src/main/scala/org/apache/pekko/japi/pf/CaseStatements.scala @@ -14,6 +14,7 @@ package org.apache.pekko.japi.pf import org.apache.pekko + import pekko.japi.function.{ Function, Predicate, Procedure } private[pf] object CaseStatement { diff --git a/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala index b3d83335053..4c97ef4fbc0 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala @@ -19,13 +19,14 @@ import java.util.concurrent.TimeoutException import scala.annotation.{ nowarn, tailrec } import scala.collection.immutable -import scala.concurrent.{ Future, Promise } import scala.concurrent.ExecutionContext +import scala.concurrent.{ Future, Promise } import scala.language.implicitConversions -import scala.util.{ Failure, Success } import scala.util.control.NoStackTrace +import scala.util.{ Failure, Success } import org.apache.pekko + import pekko.actor._ import pekko.annotation.{ InternalApi, InternalStableApi } import pekko.dispatch.sysmsg._ diff --git a/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala b/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala index 9638b82553f..1ece35be722 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.{ ActorRef, OneForOneStrategy, Props, SupervisorStrategy } import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.pattern.internal.{ BackoffOnRestartSupervisor, BackoffOnStopSupervisor } diff --git a/actor/src/main/scala/org/apache/pekko/pattern/BackoffSupervisor.scala b/actor/src/main/scala/org/apache/pekko/pattern/BackoffSupervisor.scala index 4214ba65caa..9bf01d9a0bc 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/BackoffSupervisor.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/BackoffSupervisor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.pattern import java.util.Optional import org.apache.pekko + import pekko.actor.{ ActorRef, DeadLetterSuppression, Props } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala index 2a7b8b7b520..f8996017b90 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala @@ -14,23 +14,24 @@ package org.apache.pekko.pattern import java.util.Optional -import java.util.concurrent.{ Callable, CompletionException, CompletionStage, CopyOnWriteArrayList, ThreadLocalRandom } import java.util.concurrent.atomic.{ AtomicBoolean, AtomicInteger, AtomicLong } +import java.util.concurrent.{ Callable, CompletionException, CompletionStage, CopyOnWriteArrayList, ThreadLocalRandom } import java.util.function.BiFunction import java.util.function.Consumer import scala.annotation.nowarn -import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.concurrent.ExecutionContext.parasitic import scala.concurrent.TimeoutException import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ -import scala.util.{ Failure, Success, Try } import scala.util.control.NoStackTrace import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.PekkoException import pekko.actor.{ ExtendedActorSystem, Scheduler } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala index 2298537643b..6e6f59e6b57 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration.{ DurationLong, MILLISECONDS } import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.{ ActorSystem, ClassicActorSystemProvider, diff --git a/actor/src/main/scala/org/apache/pekko/pattern/FutureTimeoutSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/FutureTimeoutSupport.scala index 3e696758f92..b1706f6ad03 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/FutureTimeoutSupport.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/FutureTimeoutSupport.scala @@ -15,11 +15,12 @@ package org.apache.pekko.pattern import java.util.concurrent.{ CompletableFuture, CompletionStage, TimeoutException } -import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor._ trait FutureTimeoutSupport { diff --git a/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala index 04204448df9..b8095319588 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor._ import pekko.dispatch.sysmsg.{ Unwatch, Watch } import pekko.util.Timeout diff --git a/actor/src/main/scala/org/apache/pekko/pattern/HandleBackoff.scala b/actor/src/main/scala/org/apache/pekko/pattern/HandleBackoff.scala index 60755e6e698..b44ddada97b 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/HandleBackoff.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/HandleBackoff.scala @@ -14,6 +14,7 @@ package org.apache.pekko.pattern import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Props } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala index 54cbd22916b..4d6c05aa5aa 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala @@ -23,6 +23,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.actor.{ ActorSelection, ClassicActorSystemProvider, Scheduler } /** diff --git a/actor/src/main/scala/org/apache/pekko/pattern/PipeToSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/PipeToSupport.scala index a254b8fba1a..877478c52c7 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/PipeToSupport.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/PipeToSupport.scala @@ -19,9 +19,9 @@ import scala.annotation.nowarn import scala.concurrent.{ ExecutionContext, Future } import scala.util.{ Failure, Success } -import language.implicitConversions - import org.apache.pekko + +import language.implicitConversions import pekko.actor.{ Actor, ActorRef, Status } import pekko.actor.ActorSelection diff --git a/actor/src/main/scala/org/apache/pekko/pattern/PromiseRef.scala b/actor/src/main/scala/org/apache/pekko/pattern/PromiseRef.scala index db2b22238f4..6f1501fc376 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/PromiseRef.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/PromiseRef.scala @@ -16,6 +16,7 @@ package org.apache.pekko.pattern import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.actor._ import pekko.util.Timeout diff --git a/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala index 16f842238ec..82cf3dfc470 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala @@ -15,12 +15,13 @@ package org.apache.pekko.pattern import java.util.concurrent.ThreadLocalRandom -import scala.concurrent.{ ExecutionContext, Future } import scala.concurrent.duration.{ Duration, FiniteDuration } -import scala.util.{ Failure, Success, Try } +import scala.concurrent.{ ExecutionContext, Future } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor.Scheduler import pekko.util.ConstantFun diff --git a/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala b/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala index fbba788aaad..d319d2efafc 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala @@ -15,12 +15,13 @@ package org.apache.pekko.pattern import scala.concurrent.ExecutionContext import scala.concurrent.Future -import scala.util.{ Failure => ScalaFailure } -import scala.util.{ Success => ScalaSuccess } import scala.util.Try import scala.util.control.{ NoStackTrace, NonFatal } +import scala.util.{ Failure => ScalaFailure } +import scala.util.{ Success => ScalaSuccess } import org.apache.pekko + import pekko.Done import pekko.actor.InvalidMessageException import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnRestartSupervisor.scala b/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnRestartSupervisor.scala index 3c9b8ffe768..11cc469d6ab 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnRestartSupervisor.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnRestartSupervisor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.pattern.internal import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ OneForOneStrategy, _ } import pekko.actor.SupervisorStrategy._ import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnStopSupervisor.scala b/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnStopSupervisor.scala index 20f6ff6585d..a1d707a7bd7 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnStopSupervisor.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/internal/BackoffOnStopSupervisor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.pattern.internal import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.{ Actor, ActorLogging, OneForOneStrategy, Props, SupervisorStrategy, Terminated } import pekko.actor.SupervisorStrategy.{ Directive, Escalate } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala b/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala index e801fb20271..2f7dfcf542a 100644 --- a/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala +++ b/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala @@ -18,6 +18,7 @@ import java.util.{ List => JList } import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.{ InternalApi, InternalStableApi } diff --git a/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala b/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala index 309001dd4bf..4e60ea09614 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala @@ -17,6 +17,10 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorContext import pekko.actor.ActorSystem import pekko.actor.Props @@ -24,9 +28,6 @@ import pekko.actor.SupervisorStrategy import pekko.dispatch.BalancingDispatcherConfigurator import pekko.dispatch.Dispatchers -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * INTERNAL API */ diff --git a/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala b/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala index 191e070e505..80c547a1761 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala @@ -17,13 +17,14 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.actor.SupervisorStrategy import pekko.dispatch.Dispatchers import pekko.japi.Util.immutableSeq -import com.typesafe.config.Config - object BroadcastRoutingLogic { def apply(): BroadcastRoutingLogic = new BroadcastRoutingLogic } diff --git a/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala b/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala index f4d50b527f8..939e8dccaeb 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala @@ -19,6 +19,9 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorPath import pekko.actor.ActorSystem import pekko.actor.Address @@ -31,8 +34,6 @@ import pekko.event.Logging import pekko.japi.Util.immutableSeq import pekko.serialization.SerializationExtension -import com.typesafe.config.Config - object ConsistentHashingRouter { /** diff --git a/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala b/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala index de1e5bf192b..118abeb2582 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala @@ -20,14 +20,14 @@ import scala.collection.immutable import scala.concurrent.duration._ import scala.jdk.DurationConverters._ -import OptimalSizeExploringResizer._ - import org.apache.pekko -import pekko.actor._ -import pekko.annotation.InternalApi import com.typesafe.config.Config +import OptimalSizeExploringResizer._ +import pekko.actor._ +import pekko.annotation.InternalApi + trait OptimalSizeExploringResizer extends Resizer { /** diff --git a/actor/src/main/scala/org/apache/pekko/routing/Random.scala b/actor/src/main/scala/org/apache/pekko/routing/Random.scala index 451e74888c1..50cc41e08de 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/Random.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/Random.scala @@ -19,13 +19,14 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.actor.SupervisorStrategy import pekko.dispatch.Dispatchers import pekko.japi.Util.immutableSeq -import com.typesafe.config.Config - object RandomRoutingLogic { def apply(): RandomRoutingLogic = new RandomRoutingLogic } diff --git a/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala b/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala index 0addb8c6d81..2cdd3a1d310 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala @@ -19,6 +19,9 @@ import java.util.concurrent.atomic.AtomicLong import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.PekkoException import pekko.actor.Actor import pekko.actor.ActorCell @@ -31,8 +34,6 @@ import pekko.actor.SupervisorStrategy import pekko.dispatch.Envelope import pekko.dispatch.MessageDispatcher -import com.typesafe.config.Config - /** * [[Pool]] routers with dynamically resizable number of routees are implemented by providing a Resizer * implementation in the [[pekko.routing.Pool]] configuration. diff --git a/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala b/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala index 7d06eefe087..9908fdc2fe8 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala @@ -19,13 +19,14 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.actor.SupervisorStrategy import pekko.dispatch.Dispatchers import pekko.japi.Util.immutableSeq -import com.typesafe.config.Config - object RoundRobinRoutingLogic { def apply(): RoundRobinRoutingLogic = new RoundRobinRoutingLogic } diff --git a/actor/src/main/scala/org/apache/pekko/routing/RoutedActorCell.scala b/actor/src/main/scala/org/apache/pekko/routing/RoutedActorCell.scala index 5150037ef55..db902fbfd64 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/RoutedActorCell.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/RoutedActorCell.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorCell import pekko.actor.ActorInitializationException diff --git a/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala b/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala index 9a95bd2b596..6486e38b0f1 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/RoutedActorRef.scala @@ -16,6 +16,7 @@ package org.apache.pekko.routing import scala.annotation.nowarn import org.apache.pekko + import pekko.ConfigurationException import pekko.actor.ActorPath import pekko.actor.ActorSystemImpl diff --git a/actor/src/main/scala/org/apache/pekko/routing/Router.scala b/actor/src/main/scala/org/apache/pekko/routing/Router.scala index 32516e45dad..e2949757a72 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/Router.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/Router.scala @@ -16,6 +16,7 @@ package org.apache.pekko.routing import scala.collection.immutable import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSelection import pekko.actor.InternalActorRef diff --git a/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala b/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala index db84b801e24..3c00b4b944e 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.ConfigurationException import pekko.actor.ActorContext import pekko.actor.ActorPath diff --git a/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala b/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala index a82323e474c..e2548fbca96 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala @@ -23,6 +23,9 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.SupervisorStrategy @@ -33,8 +36,6 @@ import pekko.pattern.pipe import pekko.util.Helpers.ConfigOps import pekko.util.Timeout -import com.typesafe.config.Config - /** * Broadcasts the message to all routees, and replies with the first response. * diff --git a/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala b/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala index 6485704d798..2bbbd540c0a 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala @@ -20,14 +20,15 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorCell import pekko.actor.ActorRefWithCell import pekko.actor.ActorSystem import pekko.actor.SupervisorStrategy import pekko.dispatch.Dispatchers -import com.typesafe.config.Config - object SmallestMailboxRoutingLogic { def apply(): SmallestMailboxRoutingLogic = new SmallestMailboxRoutingLogic } diff --git a/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala b/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala index 7c6fbe38d75..41bbd59a02d 100644 --- a/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala +++ b/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala @@ -16,21 +16,22 @@ package org.apache.pekko.routing import java.util.concurrent.atomic.AtomicInteger import scala.collection.immutable -import scala.concurrent.{ ExecutionContext, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ ExecutionContext, Promise } import scala.jdk.DurationConverters._ import scala.util.Random import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.dispatch.Dispatchers import pekko.japi.Util.immutableSeq -import pekko.pattern.{ ask, pipe, AskTimeoutException } +import pekko.pattern.{ AskTimeoutException, ask, pipe } import pekko.util.Helpers.ConfigOps import pekko.util.Timeout -import com.typesafe.config.Config - /** * As each message is sent to the router, the routees are randomly ordered. The message is sent to the * first routee. If no response is received before the `interval` has passed, the same message is sent diff --git a/actor/src/main/scala/org/apache/pekko/serialization/AsyncSerializer.scala b/actor/src/main/scala/org/apache/pekko/serialization/AsyncSerializer.scala index b0051a612b5..cee1937c30e 100644 --- a/actor/src/main/scala/org/apache/pekko/serialization/AsyncSerializer.scala +++ b/actor/src/main/scala/org/apache/pekko/serialization/AsyncSerializer.scala @@ -15,10 +15,11 @@ package org.apache.pekko.serialization import java.util.concurrent.CompletionStage -import scala.concurrent.{ Await, Future } import scala.concurrent.duration.Duration +import scala.concurrent.{ Await, Future } import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.event.Logging diff --git a/actor/src/main/scala/org/apache/pekko/serialization/PrimitiveSerializers.scala b/actor/src/main/scala/org/apache/pekko/serialization/PrimitiveSerializers.scala index 224046002ee..ac316d1077c 100644 --- a/actor/src/main/scala/org/apache/pekko/serialization/PrimitiveSerializers.scala +++ b/actor/src/main/scala/org/apache/pekko/serialization/PrimitiveSerializers.scala @@ -13,10 +13,11 @@ package org.apache.pekko.serialization -import java.nio.{ BufferOverflowException, ByteBuffer } import java.nio.charset.StandardCharsets +import java.nio.{ BufferOverflowException, ByteBuffer } import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.util.ByteString diff --git a/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala b/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala index 9515ec1b238..2f8257bfaa1 100644 --- a/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala +++ b/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala @@ -22,17 +22,18 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import scala.collection.immutable import scala.collection.mutable.ArrayBuffer -import scala.util.{ DynamicVariable, Failure, Try } import scala.util.Success import scala.util.control.NonFatal +import scala.util.{ DynamicVariable, Failure, Try } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.InternalApi import pekko.event.{ LogMarker, Logging, LoggingAdapter } -import com.typesafe.config.Config - object Serialization { private final val PekkoPackagePrefix = "org.apache.pekko." diff --git a/actor/src/main/scala/org/apache/pekko/serialization/SerializationExtension.scala b/actor/src/main/scala/org/apache/pekko/serialization/SerializationExtension.scala index 28eec511da6..32e54994c3f 100644 --- a/actor/src/main/scala/org/apache/pekko/serialization/SerializationExtension.scala +++ b/actor/src/main/scala/org/apache/pekko/serialization/SerializationExtension.scala @@ -14,6 +14,7 @@ package org.apache.pekko.serialization import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem, ExtensionId, ExtensionIdProvider } import pekko.actor.ClassicActorSystemProvider diff --git a/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala b/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala index 0e32bd811f5..b6035319509 100644 --- a/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala +++ b/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.actor.setup.Setup diff --git a/actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala b/actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala index 39275ef6a7b..5e96168a158 100644 --- a/actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala +++ b/actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala @@ -23,6 +23,7 @@ import scala.util.DynamicVariable import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.event.LogMarker diff --git a/actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala b/actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala index a51e2cbb62c..cd22d4e8a53 100644 --- a/actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala +++ b/actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala @@ -13,9 +13,9 @@ package org.apache.pekko.util -import java.util.{ AbstractQueue, Collection, Iterator, Queue } -import java.util.concurrent.{ BlockingQueue, TimeUnit } import java.util.concurrent.locks.{ Condition, ReentrantLock } +import java.util.concurrent.{ BlockingQueue, TimeUnit } +import java.util.{ AbstractQueue, Collection, Iterator, Queue } import annotation.tailrec diff --git a/actor/src/main/scala/org/apache/pekko/util/ByteString.scala b/actor/src/main/scala/org/apache/pekko/util/ByteString.scala index e835387dd8f..83734da1bb1 100644 --- a/actor/src/main/scala/org/apache/pekko/util/ByteString.scala +++ b/actor/src/main/scala/org/apache/pekko/util/ByteString.scala @@ -15,14 +15,14 @@ package org.apache.pekko.util import java.io.{ InputStream, ObjectInputStream, ObjectOutputStream, SequenceInputStream } import java.lang.{ Iterable => JIterable } -import java.nio.{ ByteBuffer, ByteOrder } import java.nio.charset.{ Charset, StandardCharsets } +import java.nio.{ ByteBuffer, ByteOrder } import java.util.Base64 import scala.annotation.{ nowarn, tailrec, varargs } -import scala.collection.{ immutable, mutable } import scala.collection.immutable.{ IndexedSeq, IndexedSeqOps, StrictOptimizedSeqOps, VectorBuilder } import scala.collection.mutable.{ Builder, WrappedArray } +import scala.collection.{ immutable, mutable } import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag diff --git a/actor/src/main/scala/org/apache/pekko/util/Clock.scala b/actor/src/main/scala/org/apache/pekko/util/Clock.scala index 2226a2fec67..9aee0590b03 100644 --- a/actor/src/main/scala/org/apache/pekko/util/Clock.scala +++ b/actor/src/main/scala/org/apache/pekko/util/Clock.scala @@ -21,6 +21,7 @@ import scala.concurrent.ExecutionContext import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem diff --git a/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala b/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala index 8cf9f5d1860..c7cb11fdd61 100644 --- a/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala +++ b/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala @@ -16,6 +16,7 @@ package org.apache.pekko.util import java.lang import org.apache.pekko + import pekko.annotation.InternalApi import pekko.japi.{ Pair => JPair } import pekko.japi.function.{ Function => JFun, Function2 => JFun2 } diff --git a/actor/src/main/scala/org/apache/pekko/util/FlightRecorderLoader.scala b/actor/src/main/scala/org/apache/pekko/util/FlightRecorderLoader.scala index 5d2e0ed3bdd..d503f52a558 100644 --- a/actor/src/main/scala/org/apache/pekko/util/FlightRecorderLoader.scala +++ b/actor/src/main/scala/org/apache/pekko/util/FlightRecorderLoader.scala @@ -17,6 +17,7 @@ import scala.reflect.ClassTag import scala.util.{ Failure, Success } import org.apache.pekko + import pekko.actor.{ ClassicActorSystemProvider, ExtendedActorSystem } import pekko.annotation.InternalApi diff --git a/actor/src/main/scala/org/apache/pekko/util/Helpers.scala b/actor/src/main/scala/org/apache/pekko/util/Helpers.scala index 0f2e82b681f..af58cd40b74 100644 --- a/actor/src/main/scala/org/apache/pekko/util/Helpers.scala +++ b/actor/src/main/scala/org/apache/pekko/util/Helpers.scala @@ -26,11 +26,11 @@ package org.apache.pekko.util -import java.time.{ Instant, LocalDateTime, ZoneId } import java.time.format.DateTimeFormatter -import java.util.{ Comparator, Locale } +import java.time.{ Instant, LocalDateTime, ZoneId } import java.util.concurrent.TimeUnit import java.util.regex.Pattern +import java.util.{ Comparator, Locale } import scala.annotation.tailrec import scala.concurrent.duration.{ Duration, FiniteDuration } diff --git a/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala b/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala index 1692c0c630b..b755becc7cd 100644 --- a/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala +++ b/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala @@ -21,6 +21,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem diff --git a/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala b/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala index 3b61ac637cf..ca87504254f 100644 --- a/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala +++ b/actor/src/main/scala/org/apache/pekko/util/MessageBuffer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.util import org.apache.pekko + import pekko.actor.{ ActorRef, Dropped } import pekko.annotation.InternalApi import pekko.japi.function.Procedure2 diff --git a/actor/src/main/scala/org/apache/pekko/util/StablePriorityQueue.scala b/actor/src/main/scala/org/apache/pekko/util/StablePriorityQueue.scala index 4bb863aa8de..01dafd1d107 100644 --- a/actor/src/main/scala/org/apache/pekko/util/StablePriorityQueue.scala +++ b/actor/src/main/scala/org/apache/pekko/util/StablePriorityQueue.scala @@ -13,9 +13,9 @@ package org.apache.pekko.util -import java.util.{ AbstractQueue, Comparator, Iterator, PriorityQueue } import java.util.concurrent.PriorityBlockingQueue import java.util.concurrent.atomic.AtomicLong +import java.util.{ AbstractQueue, Comparator, Iterator, PriorityQueue } /** * PriorityQueueStabilizer wraps a priority queue so that it respects FIFO for elements of equal priority. diff --git a/actor/src/main/scala/org/apache/pekko/util/WallClock.scala b/actor/src/main/scala/org/apache/pekko/util/WallClock.scala index ec1ff6a1f71..d94e7ae3ee5 100644 --- a/actor/src/main/scala/org/apache/pekko/util/WallClock.scala +++ b/actor/src/main/scala/org/apache/pekko/util/WallClock.scala @@ -17,6 +17,7 @@ import java.util.concurrent.atomic.AtomicLong import java.util.function.LongUnaryOperator import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.annotation.InternalApi diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala index 360b450433f..8c0cc2a8cec 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala @@ -15,10 +15,11 @@ package org.apache.pekko.actor import java.util.concurrent.TimeUnit -import BenchmarkActors._ +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import com.typesafe.config.ConfigFactory +import BenchmarkActors._ object ActorBenchmark { // Constants because they are used in annotations diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorPathValidationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorPathValidationBenchmark.scala index 780bbf096cd..26e71236f80 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorPathValidationBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorPathValidationBenchmark.scala @@ -15,7 +15,6 @@ package org.apache.pekko.actor import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations.{ Scope => JmhScope } import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Fork @@ -24,6 +23,7 @@ import org.openjdk.jmh.annotations.Mode import org.openjdk.jmh.annotations.OutputTimeUnit import org.openjdk.jmh.annotations.State import org.openjdk.jmh.annotations.Warmup +import org.openjdk.jmh.annotations.{ Scope => JmhScope } /* [info] Benchmark Mode Samples Score Score error Units diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala index af04cf6a76e..b517cc0b966 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala @@ -15,14 +15,15 @@ package org.apache.pekko.actor import java.util.concurrent.TimeUnit +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.BenchmarkActors._ import pekko.actor.ForkJoinActorBenchmark.cores -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(1) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala index 4d3c3b7dfc0..daf08207c10 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala @@ -15,12 +15,12 @@ package org.apache.pekko.actor import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.actor.BenchmarkActors._ import com.typesafe.config.ConfigFactory +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(1) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala index 76c6c5d95c4..14b1be7fbae 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala @@ -15,14 +15,15 @@ package org.apache.pekko.actor import java.util.concurrent.{ CountDownLatch, TimeUnit } +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.BenchmarkActors._ import pekko.actor.ForkJoinActorBenchmark.cores -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(1) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala index 340319ef4ba..9141867c174 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala @@ -16,8 +16,8 @@ package org.apache.pekko.actor import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.Await -import scala.concurrent.duration._ import scala.concurrent.duration.Duration +import scala.concurrent.duration._ object BenchmarkActors { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/DirectByteBufferPoolBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/DirectByteBufferPoolBenchmark.scala index 0562a036d76..f206728af29 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/DirectByteBufferPoolBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/DirectByteBufferPoolBenchmark.scala @@ -17,10 +17,10 @@ import java.nio.ByteBuffer import java.util.Random import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.io.DirectByteBufferPool +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUnit(TimeUnit.NANOSECONDS) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala index 04e846406ac..0f62ff54016 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala @@ -17,13 +17,14 @@ import java.util.concurrent.TimeUnit import scala.annotation.tailrec -import BenchmarkActors._ -import org.openjdk.jmh.annotations._ - import org.apache.pekko.testkit.TestProbe import com.typesafe.config.ConfigFactory +import org.openjdk.jmh.annotations._ + +import BenchmarkActors._ + @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(1) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala index 86718f21f78..4563f2449c0 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala @@ -16,9 +16,12 @@ package org.apache.pekko.actor import scala.annotation.tailrec import scala.concurrent.duration.Duration +import org.apache.pekko + +import com.typesafe.config.Config + import org.jctools.queues.MpscGrowableArrayQueue -import org.apache.pekko import pekko.dispatch.BoundedMessageQueueSemantics import pekko.dispatch.BoundedNodeMessageQueue import pekko.dispatch.Envelope @@ -26,8 +29,6 @@ import pekko.dispatch.MailboxType import pekko.dispatch.MessageQueue import pekko.dispatch.ProducesMessageQueue -import com.typesafe.config.Config - case class JCToolsMailbox(val capacity: Int) extends MailboxType with ProducesMessageQueue[BoundedNodeMessageQueue] { def this(settings: ActorSystem.Settings, config: Config) = this(config.getInt("mailbox-capacity")) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala index 7e293236350..fdad37bbe60 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala @@ -16,9 +16,12 @@ package org.apache.pekko.actor import scala.annotation.tailrec import scala.concurrent.duration.Duration +import org.apache.pekko + +import com.typesafe.config.Config + import org.agrona.concurrent.ManyToOneConcurrentArrayQueue -import org.apache.pekko import pekko.dispatch.BoundedMessageQueueSemantics import pekko.dispatch.BoundedNodeMessageQueue import pekko.dispatch.Envelope @@ -26,8 +29,6 @@ import pekko.dispatch.MailboxType import pekko.dispatch.MessageQueue import pekko.dispatch.ProducesMessageQueue -import com.typesafe.config.Config - /** * ManyToOneArrayMailbox is a high-performance, multiple-producer single-consumer, bounded MailboxType, * Noteworthy is that it discards overflow as DeadLetters. diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/RouterPoolCreationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/RouterPoolCreationBenchmark.scala index bec9bb0a1bb..97386313185 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/RouterPoolCreationBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/RouterPoolCreationBenchmark.scala @@ -17,9 +17,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.routing.RoundRobinPool import pekko.testkit.TestActors import pekko.testkit.TestProbe diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala index 97ce680f5ad..6aa3f9222d0 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala @@ -16,14 +16,14 @@ package org.apache.pekko.actor import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger -import scala.concurrent.{ Await, Promise } import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ - -import org.openjdk.jmh.annotations._ +import scala.concurrent.{ Await, Promise } import org.apache.pekko.util.Timeout +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(2) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala index 09d5b4c733b..22625757235 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala @@ -15,12 +15,12 @@ package org.apache.pekko.actor import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.testkit.TestProbe import com.typesafe.config.ConfigFactory +import org.openjdk.jmh.annotations._ + object StashCreationBenchmark { class StashingActor extends Actor with Stash { def receive = { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala index 9933c0b26c6..eb45ba7de1f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala @@ -17,15 +17,16 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.dispatch._ import pekko.testkit.TestProbe import pekko.util.Helpers.ConfigOps -import com.typesafe.config.{ Config, ConfigFactory } - @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.SingleShotTime)) @Fork(5) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala index d09e70c44fb..deb35af3e39 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala @@ -18,13 +18,14 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ -import org.openjdk.jmh.annotations._ - import org.apache.pekko -import pekko.actor.typed.scaladsl.AskPattern._ import com.typesafe.config.ConfigFactory +import org.openjdk.jmh.annotations._ + +import pekko.actor.typed.scaladsl.AskPattern._ + object TypedActorBenchmark { // Constants because they are used in annotations final val threads = 8 // update according to cpu diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedBenchmarkActors.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedBenchmarkActors.scala index dea2a1b1e2a..43d58df8b10 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedBenchmarkActors.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedBenchmarkActors.scala @@ -18,6 +18,7 @@ import java.util.concurrent.CountDownLatch import scala.concurrent.duration._ import org.apache.pekko + import pekko.Done import pekko.actor.typed.scaladsl.ActorContext import pekko.actor.typed.scaladsl.Behaviors diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala index 8ac10da4c35..42e9391d273 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala @@ -19,6 +19,10 @@ import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Fork @@ -34,11 +38,8 @@ import org.openjdk.jmh.annotations.TearDown import org.openjdk.jmh.annotations.Threads import org.openjdk.jmh.annotations.Warmup -import org.apache.pekko import pekko.actor.typed.scaladsl.AskPattern._ -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(1) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala index da331671e33..34e1006b6cd 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala @@ -21,9 +21,12 @@ import scala.concurrent.duration._ import scala.util.Failure import scala.util.Success +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem @@ -33,8 +36,6 @@ import pekko.actor.typed.receptionist.ServiceKey import pekko.actor.typed.scaladsl.AskPattern._ import pekko.actor.typed.scaladsl.Behaviors -import com.typesafe.config.ConfigFactory - object Producer { trait Command diff --git a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetMergeBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetMergeBenchmark.scala index 84d90a846ed..a304cf4842d 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetMergeBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetMergeBenchmark.scala @@ -15,7 +15,8 @@ package org.apache.pekko.cluster.ddata import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations.{ Scope => JmhScope } +import org.apache.pekko + import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Fork @@ -27,8 +28,8 @@ import org.openjdk.jmh.annotations.Param import org.openjdk.jmh.annotations.Setup import org.openjdk.jmh.annotations.State import org.openjdk.jmh.annotations.Warmup +import org.openjdk.jmh.annotations.{ Scope => JmhScope } -import org.apache.pekko import pekko.actor.Address import pekko.cluster.UniqueAddress diff --git a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala index f2e1569fc2f..65a19e52001 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala @@ -18,7 +18,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ -import org.openjdk.jmh.annotations.{ Scope => JmhScope } +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Fork @@ -28,8 +31,8 @@ import org.openjdk.jmh.annotations.OutputTimeUnit import org.openjdk.jmh.annotations.State import org.openjdk.jmh.annotations.TearDown import org.openjdk.jmh.annotations.Warmup +import org.openjdk.jmh.annotations.{ Scope => JmhScope } -import org.apache.pekko import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Props @@ -37,8 +40,6 @@ import pekko.cluster.Cluster import pekko.serialization.SerializationExtension import pekko.serialization.Serializers -import com.typesafe.config.ConfigFactory - @Fork(2) @State(JmhScope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/VersionVectorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/VersionVectorBenchmark.scala index 818b3061353..a6c7206692d 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/VersionVectorBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/VersionVectorBenchmark.scala @@ -15,7 +15,8 @@ package org.apache.pekko.cluster.ddata import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations.{ Scope => JmhScope } +import org.apache.pekko + import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Fork @@ -27,8 +28,8 @@ import org.openjdk.jmh.annotations.Param import org.openjdk.jmh.annotations.Setup import org.openjdk.jmh.annotations.State import org.openjdk.jmh.annotations.Warmup +import org.openjdk.jmh.annotations.{ Scope => JmhScope } -import org.apache.pekko import pekko.actor.Address import pekko.cluster.UniqueAddress diff --git a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala index bd2ea0261e7..7b0c841ef08 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala @@ -15,10 +15,10 @@ package org.apache.pekko.dispatch import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import com.typesafe.config.ConfigFactory +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @Fork(2) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala index bf80a0cf67e..6f276715a35 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala @@ -18,14 +18,15 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor._ import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object NodeQueueBenchmark { final val burst = 100000 case object Stop diff --git a/bench-jmh/src/main/scala/org/apache/pekko/event/LogLevelAccessBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/event/LogLevelAccessBenchmark.scala index cca78458ee9..21066ee1c1f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/event/LogLevelAccessBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/event/LogLevelAccessBenchmark.scala @@ -15,9 +15,10 @@ package org.apache.pekko.event import java.util.concurrent.TimeUnit +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.event.Logging.LogLevel @Fork(3) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala index d133f43ed90..12575660f2d 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala @@ -18,10 +18,11 @@ import java.util.concurrent.TimeUnit import scala.annotation.nowarn +import org.apache.pekko + import org.apache.commons.io.FileUtils import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor._ import pekko.persistence.journal.AsyncWriteTarget._ import pekko.persistence.journal.leveldb.{ SharedLeveldbJournal, SharedLeveldbStore } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistenceActorDeferBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistenceActorDeferBenchmark.scala index 73282ae8cd8..cafe94f1b5f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistenceActorDeferBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistenceActorDeferBenchmark.scala @@ -15,11 +15,12 @@ package org.apache.pekko.persistence import java.io.File +import org.apache.pekko + import org.apache.commons.io.FileUtils -import org.openjdk.jmh.annotations._ import org.openjdk.jmh.annotations.Scope +import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor._ import pekko.testkit.TestProbe diff --git a/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorBenchmark.scala index 1dbea3f4e6a..1565070e89f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorBenchmark.scala @@ -15,11 +15,12 @@ package org.apache.pekko.persistence import java.io.File +import org.apache.pekko + import org.apache.commons.io.FileUtils -import org.openjdk.jmh.annotations._ import org.openjdk.jmh.annotations.Scope +import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor._ import pekko.testkit.TestProbe diff --git a/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala index bc67effab19..eb8f8e6427e 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala @@ -17,11 +17,12 @@ import java.io.File import scala.concurrent.duration._ +import org.apache.pekko + import org.apache.commons.io.FileUtils -import org.openjdk.jmh.annotations._ import org.openjdk.jmh.annotations.Scope +import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor._ import pekko.testkit.TestProbe diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/BenchTestSource.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/BenchTestSource.scala index 4736c68b457..08cddb752e9 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/BenchTestSource.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/BenchTestSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.stream.Attributes import pekko.stream.Outlet import pekko.stream.SourceShape diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala index 3f019fd3b00..fd7b879bc3c 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala @@ -25,9 +25,12 @@ import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.Done import pekko.NotUsed import pekko.actor._ @@ -41,8 +44,6 @@ import pekko.stream.SystemMaterializer import pekko.stream.scaladsl._ import pekko.util.OptionVal -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @OutputTimeUnit(TimeUnit.MILLISECONDS) @BenchmarkMode(Array(Mode.Throughput)) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LatchSink.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LatchSink.scala index dc11828346d..ffa9296c2fd 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LatchSink.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LatchSink.scala @@ -17,6 +17,7 @@ import java.util.concurrent.CountDownLatch import java.util.concurrent.CyclicBarrier import org.apache.pekko + import pekko.stream.Attributes import pekko.stream.Inlet import pekko.stream.SinkShape diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LiteralEncodingBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LiteralEncodingBenchmark.scala index 865ab653313..4cc9233cbef 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LiteralEncodingBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/LiteralEncodingBenchmark.scala @@ -18,10 +18,10 @@ import java.nio.ByteOrder import java.nio.charset.StandardCharsets import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.Unsafe +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @OutputTimeUnit(TimeUnit.MILLISECONDS) @BenchmarkMode(Array(Mode.Throughput)) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala index e1b904017e7..e12c3432895 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala @@ -20,18 +20,19 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.agrona.concurrent.ManyToOneConcurrentArrayQueue import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.KillSwitches import pekko.stream.OverflowStrategy import pekko.stream.SystemMaterializer import pekko.stream.scaladsl._ -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @OutputTimeUnit(TimeUnit.MILLISECONDS) @BenchmarkMode(Array(Mode.Throughput)) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala index 6ad899dbbca..638f2c9f120 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala @@ -16,6 +16,8 @@ package org.apache.pekko.remote.artery.compress import scala.annotation.nowarn import scala.concurrent.Promise +import org.apache.pekko + import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Fork import org.openjdk.jmh.annotations.Level @@ -27,7 +29,6 @@ import org.openjdk.jmh.annotations.State import org.openjdk.jmh.annotations.TearDown import org.openjdk.jmh.infra.Blackhole -import org.apache.pekko import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSystem diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/compress/HeavyHittersBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/compress/HeavyHittersBenchmark.scala index 6042770d3ec..3ac04fd87e6 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/remote/compress/HeavyHittersBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/compress/HeavyHittersBenchmark.scala @@ -15,11 +15,11 @@ package org.apache.pekko.remote.compress import java.util.Random +import org.apache.pekko.remote.artery.compress.TopHeavyHitters + import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole -import org.apache.pekko.remote.artery.compress.TopHeavyHitters - /** * On Macbook pro: * [info] Benchmark (n) Mode Cnt Score Error Units diff --git a/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala b/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala index b4a3719d1f3..bd32b5a5719 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala @@ -13,9 +13,9 @@ package org.apache.pekko.serialization.jackson -import java.time.{ Duration => JDuration } import java.time.Instant import java.time.LocalDateTime +import java.time.{ Duration => JDuration } import java.util import java.util.concurrent.TimeUnit @@ -23,16 +23,17 @@ import scala.annotation.nowarn import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor._ import pekko.serialization.Serialization import pekko.serialization.SerializationExtension import pekko.serialization.SerializerWithStringManifest -import com.typesafe.config.ConfigFactory - object JacksonSerializationBench { trait TestMessage diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorGraphInterpreterBoundaryBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorGraphInterpreterBoundaryBenchmark.scala index 92b07b53ccc..a7df6a6f76f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorGraphInterpreterBoundaryBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorGraphInterpreterBoundaryBenchmark.scala @@ -26,22 +26,24 @@ import java.util.concurrent.atomic.AtomicReference import scala.concurrent.Await import scala.concurrent.duration._ -import org.openjdk.jmh.annotations._ -import org.openjdk.jmh.annotations.OperationsPerInvocation -import org.openjdk.jmh.infra.Blackhole +import org.apache.pekko + import org.reactivestreams.Publisher import org.reactivestreams.Subscriber import org.reactivestreams.Subscription -import org.apache.pekko +import com.typesafe.config.ConfigFactory + +import org.openjdk.jmh.annotations.OperationsPerInvocation +import org.openjdk.jmh.annotations._ +import org.openjdk.jmh.infra.Blackhole + import pekko.actor.ActorSystem import pekko.stream.scaladsl.Keep import pekko.stream.scaladsl.RunnableGraph import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source -import com.typesafe.config.ConfigFactory - object ActorGraphInterpreterBoundaryBenchmark { final val ElementCount = 100 * 1000 final val CancelAfter = ElementCount / 2 diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorRefSourceBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorRefSourceBenchmark.scala index 11f9e2ef4e8..d88447c77db 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorRefSourceBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/ActorRefSourceBenchmark.scala @@ -24,9 +24,10 @@ import java.util.concurrent.atomic.AtomicLong import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.scaladsl.Keep import pekko.stream.scaladsl.Sink diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala index 33e9c379ee7..eeab0719949 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala @@ -19,9 +19,12 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.Actor import pekko.actor.ActorRef @@ -33,8 +36,6 @@ import pekko.stream.scaladsl._ import pekko.stream.testkit.scaladsl.StreamTestKit import pekko.util.Timeout -import com.typesafe.config.ConfigFactory - object AskBenchmark { final val OperationsPerInvocation = 100000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/AsyncBoundaryThroughputBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/AsyncBoundaryThroughputBenchmark.scala index 19b14ea4afe..8c8fda69e4c 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/AsyncBoundaryThroughputBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/AsyncBoundaryThroughputBenchmark.scala @@ -24,17 +24,18 @@ import scala.annotation.nowarn import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.stream.scaladsl._ import pekko.stream.stage._ -import com.typesafe.config.ConfigFactory - object AsyncBoundaryThroughputBenchmark { final val ElementCount = 100 * 1000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala index 687f695183f..68d964bb653 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala @@ -22,8 +22,6 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.Await import scala.concurrent.duration._ -import org.openjdk.jmh.annotations._ - import org.apache.pekko.NotUsed import org.apache.pekko.actor.ActorSystem import org.apache.pekko.remote.artery.{ BenchTestSource, LatchSink } @@ -32,6 +30,8 @@ import org.apache.pekko.stream.testkit.scaladsl.StreamTestKit import com.typesafe.config.ConfigFactory +import org.openjdk.jmh.annotations._ + /** * Benchmarks BroadcastHub throughput under high-fan-out lockstep consumer scenarios. * diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala index a6722c34244..bd8a84cfe58 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala @@ -20,9 +20,12 @@ import scala.concurrent._ import scala.concurrent.duration._ import scala.util.control.NonFatal +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.ActorAttributes.SupervisionStrategy import pekko.stream.Attributes.SourceLocation @@ -32,8 +35,6 @@ import pekko.stream.impl.fusing.Collect.NotApplied import pekko.stream.scaladsl._ import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } -import com.typesafe.config.ConfigFactory - object CollectBenchmark { final val OperationsPerInvocation = 10000000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/EmptySourceBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/EmptySourceBenchmark.scala index 4de17fbf734..43b630476f4 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/EmptySourceBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/EmptySourceBenchmark.scala @@ -18,9 +18,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent._ import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.scaladsl._ diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala index 83723c9305c..4e3686f4a4a 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala @@ -16,12 +16,15 @@ package org.apache.pekko.stream import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } + +import org.apache.pekko + +import com.typesafe.config.ConfigFactory import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSource @@ -30,8 +33,6 @@ import pekko.stream.impl.fusing.GraphStages import pekko.stream.scaladsl._ import pekko.stream.testkit.scaladsl.StreamTestKit -import com.typesafe.config.ConfigFactory - object FlatMapConcatBenchmark { final val OperationsPerInvocation = 100000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapMergeBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapMergeBenchmark.scala index 074bad5a02b..0bd98b8c1b2 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapMergeBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapMergeBenchmark.scala @@ -18,9 +18,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent._ import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.{ Done, NotUsed } import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSourceSameElement diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala index b7a60858023..0b132c9cafd 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala @@ -20,17 +20,18 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Success +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSource import pekko.stream.impl.fusing.GraphStages import pekko.stream.scaladsl._ -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @OutputTimeUnit(TimeUnit.SECONDS) @BenchmarkMode(Array(Mode.Throughput)) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala index 5c05601f5ca..fa586167eb7 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala @@ -20,9 +20,13 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Random +import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSourceSameElement @@ -31,9 +35,6 @@ import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source import pekko.util.ByteString -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - @State(Scope.Benchmark) @OutputTimeUnit(TimeUnit.SECONDS) @BenchmarkMode(Array(Mode.Throughput)) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala index 5fe66760606..7d904abd47c 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala @@ -19,17 +19,18 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ -import org.openjdk.jmh.annotations._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations.OperationsPerInvocation +import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.stream.scaladsl._ import pekko.stream.stage._ -import com.typesafe.config.ConfigFactory - object FusedGraphsBenchmark { val ElementCount = 100 * 1000 diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphBuilderBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphBuilderBenchmark.scala index 1b2d8116d67..c0657e8cb3f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphBuilderBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphBuilderBenchmark.scala @@ -15,9 +15,10 @@ package org.apache.pekko.stream import java.util.concurrent.TimeUnit +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.stream.scaladsl.RunnableGraph diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphStageConstructionBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphStageConstructionBenchmark.scala index efa220f2960..3ae0b20adc0 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphStageConstructionBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/GraphStageConstructionBenchmark.scala @@ -22,14 +22,6 @@ import java.util.concurrent.TimeUnit import scala.collection.immutable import scala.concurrent.Promise -import org.openjdk.jmh.annotations.Benchmark -import org.openjdk.jmh.annotations.BenchmarkMode -import org.openjdk.jmh.annotations.Mode -import org.openjdk.jmh.annotations.OutputTimeUnit -import org.openjdk.jmh.annotations.Scope -import org.openjdk.jmh.annotations.State -import org.openjdk.jmh.infra.Blackhole - import org.apache.pekko.NotUsed import org.apache.pekko.stream.impl.LinearTraversalBuilder import org.apache.pekko.stream.impl.Stages.DefaultAttributes @@ -41,6 +33,14 @@ import org.apache.pekko.stream.scaladsl.Sink import org.apache.pekko.stream.scaladsl.Source import org.apache.pekko.stream.stage.GraphStageWithMaterializedValue +import org.openjdk.jmh.annotations.Benchmark +import org.openjdk.jmh.annotations.BenchmarkMode +import org.openjdk.jmh.annotations.Mode +import org.openjdk.jmh.annotations.OutputTimeUnit +import org.openjdk.jmh.annotations.Scope +import org.openjdk.jmh.annotations.State +import org.openjdk.jmh.infra.Blackhole + @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.MILLISECONDS) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala index 2045852a691..147e23f3e08 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala @@ -18,9 +18,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.stream.impl.fusing.GraphInterpreter.{ DownstreamBoundaryStageLogic, UpstreamBoundaryStageLogic } import pekko.stream.impl.fusing.GraphInterpreterSpecKit import pekko.stream.stage._ diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/InvokeWithFeedbackBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/InvokeWithFeedbackBenchmark.scala index 17c30e5f948..fe597b787fd 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/InvokeWithFeedbackBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/InvokeWithFeedbackBenchmark.scala @@ -18,9 +18,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent._ import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.scaladsl._ diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/JsonFramingBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/JsonFramingBenchmark.scala index 0b4d5d466a5..6f39a7c8bf9 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/JsonFramingBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/JsonFramingBenchmark.scala @@ -15,9 +15,10 @@ package org.apache.pekko.stream import java.util.concurrent.TimeUnit +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.stream.impl.JsonObjectParser import pekko.util.ByteString diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala index 21f8f7e2ef7..b28fc733cab 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala @@ -22,15 +22,16 @@ import java.util.concurrent.TimeUnit import scala.concurrent._ import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.stream.scaladsl._ -import com.typesafe.config.ConfigFactory - object LazyFutureSourceBenchmark { final val OperationsPerInvocation = 100000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala index 3442b2a426c..e6f9047da8e 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala @@ -20,9 +20,12 @@ import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSource @@ -30,8 +33,6 @@ import pekko.remote.artery.LatchSink import pekko.stream.scaladsl._ import pekko.stream.testkit.scaladsl.StreamTestKit -import com.typesafe.config.ConfigFactory - object MapAsyncBenchmark { final val OperationsPerInvocation = 100000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializationBenchmark.scala index c1fd4307104..15a66652867 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializationBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializationBenchmark.scala @@ -19,9 +19,10 @@ import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.Done import pekko.NotUsed import pekko.actor.ActorSystem diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializerWiringBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializerWiringBenchmark.scala index 00e7d70c8f2..e90ee070de1 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializerWiringBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/MaterializerWiringBenchmark.scala @@ -22,9 +22,10 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.stream.scaladsl._ diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala index 40be60fe91b..29a34e39a75 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala @@ -19,9 +19,12 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSource @@ -31,8 +34,6 @@ import pekko.stream.scaladsl._ import pekko.stream.scaladsl.PartitionHub import pekko.stream.testkit.scaladsl.StreamTestKit -import com.typesafe.config.ConfigFactory - object PartitionHubBenchmark { final val OperationsPerInvocation = 100000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/RangeSourceBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/RangeSourceBenchmark.scala index eb53966012b..9803b756f14 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/RangeSourceBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/RangeSourceBenchmark.scala @@ -22,9 +22,10 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.impl.Stages.DefaultAttributes import pekko.stream.impl.fusing.IterableSource diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala index 218751f5753..6a9e2361316 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala @@ -20,15 +20,16 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Success +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.remote.artery.BenchTestSource import pekko.stream.scaladsl._ -import com.typesafe.config.ConfigFactory - /* Just a brief reference run (3.1 GHz Intel Core i7, MacBook Pro late 2017): [info] SourceRefBenchmark.source_ref_100k_elements thrpt 10 724650.336 ± 233643.256 ops/s diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/StageActorRefBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/StageActorRefBenchmark.scala index 007253e275f..cd2730a38ee 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/StageActorRefBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/StageActorRefBenchmark.scala @@ -24,9 +24,10 @@ import scala.concurrent.Await import scala.concurrent.Promise import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.NoSerializationVerificationNeeded diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala index 9c1dde4c6e8..f68e5cb0a0b 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala @@ -24,14 +24,15 @@ import scala.collection.immutable import scala.concurrent._ import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.scaladsl._ -import com.typesafe.config.ConfigFactory - object ZipWithIndexBenchmark { final val OperationsPerInvocation = 100000 } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/impl/OutputStreamSourceStageBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/impl/OutputStreamSourceStageBenchmark.scala index 4b06c731d79..4ce70d8aeef 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/impl/OutputStreamSourceStageBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/impl/OutputStreamSourceStageBenchmark.scala @@ -18,10 +18,11 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ -import org.openjdk.jmh.annotations._ +import org.apache.pekko + import org.openjdk.jmh.annotations.TearDown +import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.scaladsl.Keep import pekko.stream.scaladsl.Sink diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesBenchmark.scala index 3f558f044c7..6d9d0396040 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesBenchmark.scala @@ -22,9 +22,10 @@ import scala.concurrent.Future import scala.concurrent.Promise import scala.concurrent.duration._ +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.Done import pekko.NotUsed import pekko.actor.ActorSystem diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesScaleBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesScaleBenchmark.scala index e007ed22b49..de85c0ad521 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesScaleBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesScaleBenchmark.scala @@ -21,12 +21,13 @@ import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration._ -import org.openjdk.jmh.annotations._ +import org.apache.pekko + import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Scope import org.openjdk.jmh.annotations.State +import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.actor.ActorSystem import pekko.stream.IOResult import pekko.stream.scaladsl._ diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala index 64968581df5..5b189a94d68 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala @@ -25,9 +25,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.{ Success, Try } +import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.stream._ @@ -36,8 +39,6 @@ import pekko.stream.impl.io.{ TlsGraphStage, TlsModule } import pekko.stream.scaladsl._ import pekko.util.ByteString -import com.typesafe.config.{ Config, ConfigFactory } - /** * JMH benchmark comparing the legacy actor-based TLS path (`TlsModule`) to the * GraphStage path (`TlsGraphStage`). diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala index 6df3f7a1e84..327c1583898 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala @@ -19,9 +19,10 @@ package org.apache.pekko.util import java.util.concurrent.TimeUnit +import org.apache.pekko + import org.openjdk.jmh.annotations._ -import org.apache.pekko import pekko.stream.impl.io.ByteStringParser @State(Scope.Benchmark) diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_apply_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_apply_Benchmark.scala index 5bff64aa86e..1ec0f640434 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_apply_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_apply_Benchmark.scala @@ -15,10 +15,10 @@ package org.apache.pekko.util import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.ByteString.{ ByteString1, ByteStrings } +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_apply_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_asInputStream_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_asInputStream_Benchmark.scala index a6d9600a762..644805dd98e 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_asInputStream_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_asInputStream_Benchmark.scala @@ -20,11 +20,11 @@ package org.apache.pekko.util import java.io.InputStream import java.util.concurrent.TimeUnit +import org.apache.pekko.io.UnsynchronizedByteArrayInputStream + import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole -import org.apache.pekko.io.UnsynchronizedByteArrayInputStream - /** * Compares ByteString.asInputStream and new ByteStreamArray(ByteString.toArray). */ diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_concat3way_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_concat3way_Benchmark.scala index e4841dc0647..6d17a6c3e28 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_concat3way_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_concat3way_Benchmark.scala @@ -12,11 +12,11 @@ package org.apache.pekko.util import java.nio.{ ByteBuffer, ByteOrder } import java.util.concurrent.TimeUnit +import org.apache.pekko.util.ByteString.{ ByteString1C, ByteString2 } + import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole -import org.apache.pekko.util.ByteString.{ ByteString1C, ByteString2 } - /** * Directional benchmark for PR #2924, comparing the two candidate strategies for * the gRPC-shaped "5-byte header ++ payload" hot path: diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_copyToBuffer_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_copyToBuffer_Benchmark.scala index ec9c335cab2..d87ff586e7d 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_copyToBuffer_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_copyToBuffer_Benchmark.scala @@ -16,10 +16,10 @@ package org.apache.pekko.util import java.nio.ByteBuffer import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.ByteString.{ ByteString1C, ByteStrings } +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_copyToBuffer_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_decode_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_decode_Benchmark.scala index 90534ede0ff..97b23f2fc54 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_decode_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_decode_Benchmark.scala @@ -16,10 +16,10 @@ package org.apache.pekko.util import java.nio.charset.StandardCharsets import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.ByteString.{ ByteString1C, ByteStrings } +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_decode_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropRight_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropRight_Benchmark.scala index 6cb18032207..f4714c5b740 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropRight_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropRight_Benchmark.scala @@ -17,10 +17,10 @@ import java.util.concurrent.TimeUnit import scala.util.Random -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.ByteString.{ ByteString1, ByteStrings } +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_dropRight_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropSliceTake_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropSliceTake_Benchmark.scala index 39d78b6a3ec..16d87d1d69e 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropSliceTake_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_dropSliceTake_Benchmark.scala @@ -15,10 +15,10 @@ package org.apache.pekko.util import java.util.concurrent.TimeUnit -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.ByteString.{ ByteString1C, ByteStrings } +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_dropSliceTake_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_drop_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_drop_Benchmark.scala index 405ba2d885a..be9ccdfce5f 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_drop_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_drop_Benchmark.scala @@ -17,10 +17,10 @@ import java.util.concurrent.TimeUnit import scala.util.Random -import org.openjdk.jmh.annotations._ - import org.apache.pekko.util.ByteString.{ ByteString1, ByteStrings } +import org.openjdk.jmh.annotations._ + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_drop_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_take_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_take_Benchmark.scala index 31603c603ef..e47467de386 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_take_Benchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_take_Benchmark.scala @@ -17,10 +17,10 @@ import java.util.concurrent.TimeUnit import scala.util.Random -import org.openjdk.jmh.annotations.{ Benchmark, Measurement, Scope, State } - import org.apache.pekko.util.ByteString.{ ByteString1, ByteStrings } +import org.openjdk.jmh.annotations.{ Benchmark, Measurement, Scope, State } + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MILLISECONDS) class ByteString_take_Benchmark { diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/LruBoundedCacheBench.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/LruBoundedCacheBench.scala index 8b5f339b30f..7061c86fbe2 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/util/LruBoundedCacheBench.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/util/LruBoundedCacheBench.scala @@ -18,10 +18,10 @@ import java.util.concurrent.TimeUnit import scala.util.Random -import org.openjdk.jmh.annotations.{ Param, _ } - import org.apache.pekko.remote.artery.LruBoundedCache +import org.openjdk.jmh.annotations.{ Param, _ } + @State(Scope.Benchmark) @Measurement(timeUnit = TimeUnit.MICROSECONDS) class LruBoundedCacheBench { diff --git a/build.sbt b/build.sbt index b283f1f66e2..62c148169d2 100644 --- a/build.sbt +++ b/build.sbt @@ -48,7 +48,7 @@ addCommandAlias( name = "fixall", value = ";scalafixEnable; scalafixAll; scalafmtAll; test:compile; multi-jvm:compile; reload") -addCommandAlias(name = "sortImports", value = ";scalafixEnable; scalafixAll SortImports; scalafmtAll") +addCommandAlias(name = "sortImports", value = ";scalafixEnable; scalafixAll OrganizeImports; scalafmtAll") import PekkoBuild._ import com.typesafe.tools.mima.plugin.MimaPlugin diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala index bcb473101be..896f5ba1ab2 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.Address diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala index d4898b79424..4e652eff7e2 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.metrics import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider @@ -29,8 +32,6 @@ import pekko.actor.SupervisorStrategy import pekko.event.Logging import pekko.event.LoggingAdapter -import com.typesafe.config.Config - /** * Cluster metrics extension. * diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala index a5ba07243c2..6859ad24186 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala @@ -22,6 +22,9 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Actor import pekko.actor.ActorSystem import pekko.actor.Address @@ -35,8 +38,6 @@ import pekko.dispatch.Dispatchers import pekko.japi.Util.immutableSeq import pekko.routing._ -import com.typesafe.config.Config - /** * Load balancing of messages to cluster nodes based on cluster metric data. * diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala index 91b59034054..7fde254cf74 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala @@ -17,11 +17,12 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko -import pekko.util.Helpers.ConfigOps -import pekko.util.Helpers.Requiring import com.typesafe.config.Config +import pekko.util.Helpers.ConfigOps +import pekko.util.Helpers.Requiring + /** * Metrics extension settings. Documented in: `src/main/resources/reference.conf`. */ diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala index bbc3a1c064d..29a71c1bfd1 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala @@ -14,11 +14,12 @@ package org.apache.pekko.cluster.metrics import org.apache.pekko -import pekko.actor.OneForOneStrategy -import pekko.util.Helpers.ConfigOps import com.typesafe.config.Config +import pekko.actor.OneForOneStrategy +import pekko.util.Helpers.ConfigOps + /** * Default `ClusterMetricsSupervisor` strategy: * A configurable [[pekko.actor.OneForOneStrategy]] with restart-on-throwable decider. diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala index df7ee5d67e0..eb8fbdaf23e 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala @@ -19,6 +19,7 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + import pekko.actor.Address /** diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/MetricsCollector.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/MetricsCollector.scala index 64005d2db61..ec967d0a523 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/MetricsCollector.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/MetricsCollector.scala @@ -20,9 +20,10 @@ import java.lang.management.MemoryMXBean import java.lang.management.MemoryUsage import java.lang.management.OperatingSystemMXBean +import org.apache.pekko + import org.hyperic.sigar.SigarProxy -import org.apache.pekko import pekko.ConfigurationException import pekko.actor.ActorSystem import pekko.actor.Address diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala index 706c221e1ad..f4dbea374b5 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala @@ -13,14 +13,15 @@ package org.apache.pekko.cluster.metrics.protobuf -import java.{ lang => jl } import java.io.{ ByteArrayOutputStream, NotSerializableException, ObjectOutputStream } import java.util.zip.{ GZIPInputStream, GZIPOutputStream } +import java.{ lang => jl } import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.{ Address, ExtendedActorSystem } import pekko.cluster.metrics._ import pekko.cluster.metrics.protobuf.msg.{ ClusterMetricsMessages => cm } diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStream.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStream.scala index 6a5d073c3f5..e44a2b7d046 100644 --- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStream.scala +++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStream.scala @@ -20,6 +20,7 @@ package org.apache.pekko.cluster.metrics.protobuf import java.io.{ InputStream, ObjectStreamClass } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.ClassLoaderObjectInputStream diff --git a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala index f7a32b13965..e80b6cceb1a 100644 --- a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala +++ b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster.metrics import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.MemberStatus import pekko.cluster.MultiNodeClusterSpec import pekko.remote.testkit.MultiNodeConfig -import com.typesafe.config.ConfigFactory - trait ClusterMetricsCommonConfig extends MultiNodeConfig { import ConfigFactory._ diff --git a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala index ed0739250c8..70a4a79285b 100644 --- a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala +++ b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala @@ -20,6 +20,10 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.MultiNodeClusterSpec @@ -35,9 +39,6 @@ import pekko.serialization.jackson.CborSerializable import pekko.testkit.{ DefaultTimeout, ImplicitSender, LongRunningTest } import pekko.testkit.GHExcludeTest -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object AdaptiveLoadBalancingRouterConfig extends MultiNodeConfig { class Echo extends Actor { diff --git a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/sample/StatsService.scala b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/sample/StatsService.scala index eef45b2c1ae..392d1886303 100644 --- a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/sample/StatsService.scala +++ b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/sample/StatsService.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.metrics.sample import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Props, ReceiveTimeout } import pekko.routing.ConsistentHashingRouter.ConsistentHashableEnvelope import pekko.routing.FromConfig diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala index 948221b6b0b..b14b646a070 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.metrics import scala.concurrent.duration._ import org.apache.pekko + import pekko.cluster.Cluster import pekko.cluster.metrics.StandardMetrics._ import pekko.testkit._ diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala index 347fb8ff4d4..0ea9cc6e72f 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.cluster.metrics import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.metrics.StandardMetrics._ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.metrics.StandardMetrics._ + class MetricsSelectorSpec extends AnyWordSpec with Matchers { val factor = 0.3 // TODO read from reference.conf diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala index 329ef2944bb..64a5b8aa457 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster.metrics import scala.concurrent.duration._ import org.apache.pekko -import pekko.dispatch.Dispatchers -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.dispatch.Dispatchers +import pekko.testkit.PekkoSpec + class ClusterMetricsSettingsSpec extends PekkoSpec { "ClusterMetricsSettings" must { diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala index e8cc7089790..a295311177a 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala @@ -19,14 +19,15 @@ import scala.annotation.nowarn import scala.util.Failure import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.Address import pekko.cluster.metrics.StandardMetrics._ import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - @nowarn class MetricNumericConverterSpec extends AnyWordSpec with Matchers with MetricNumericConverter { diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala index a08e4b5e9ce..06dfe60cfaf 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.Try import org.apache.pekko + import pekko.cluster.metrics.StandardMetrics._ import pekko.testkit._ diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala index 893bde2550c..8daf8ab5114 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala @@ -16,9 +16,12 @@ package org.apache.pekko.cluster.metrics import java.io.Closeable import java.util.logging.LogManager +import org.apache.pekko + +import org.slf4j.bridge.SLF4JBridgeHandler + import org.scalatestplus.mockito.MockitoSugar -import org.apache.pekko import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef @@ -34,8 +37,6 @@ import pekko.dispatch.UnboundedMessageQueueSemantics import pekko.remote.RARP import pekko.testkit.PekkoSpec -import org.slf4j.bridge.SLF4JBridgeHandler - /** * Redirect different logging sources to SLF4J. */ diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala index af0b6a61f80..94eff072d25 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.metrics import scala.Vector import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.actor.RootActorPath import pekko.remote.RARP @@ -23,8 +26,6 @@ import pekko.routing.ActorRefRoutee import pekko.routing.ActorSelectionRoutee import pekko.testkit.PekkoSpec -import com.typesafe.config.ConfigFactory - class WeightedRouteesSpec extends PekkoSpec(ConfigFactory.parseString(""" pekko.actor.provider = "cluster" pekko.remote.classic.netty.tcp.port = 0 diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializerSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializerSpec.scala index 3a538c4a777..6e3b6c58170 100644 --- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializerSpec.scala +++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.metrics.protobuf import org.apache.pekko + import pekko.actor.{ Address, ExtendedActorSystem } import pekko.cluster.MemberStatus import pekko.cluster.TestMember diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala index 308c9566fb8..5e6d1133442 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.cluster.sharding.ShardRegion.ClusterShardingStats import pekko.cluster.sharding.ShardRegion.CurrentShardRegionState diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala index f4a5cf6c985..5f636913c22 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala @@ -18,6 +18,9 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.annotation.InternalApi import pekko.cluster.ClusterSettings.DataCenter @@ -28,8 +31,6 @@ import pekko.cluster.typed.ClusterSingletonManagerSettings import pekko.coordination.lease.LeaseUsageSettings import pekko.japi.Util.immutableSeq -import com.typesafe.config.Config - object ClusterShardingSettings { /** Scala API: Creates new cluster sharding settings object */ diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/Murmur2MessageExtractor.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/Murmur2MessageExtractor.scala index 58c15aeeea4..82932971abe 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/Murmur2MessageExtractor.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/Murmur2MessageExtractor.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed import org.apache.pekko + import pekko.cluster.sharding.typed.internal.Murmur2 abstract class Murmur2NoEnvelopeMessageExtractor[M](val numberOfShards: Int) extends ShardingMessageExtractor[M, M] { diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala index 4edad5b75d7..9b4921e26ca 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala @@ -20,6 +20,7 @@ import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.cluster.sharding.typed.internal.EntityTypeKeyImpl import pekko.cluster.sharding.typed.javadsl.{ Entity => JEntity, EntityTypeKey => JEntityTypeKey } diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala index b470adba799..47d87330f0f 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.typed import java.util.{ Map => JMap } import org.apache.pekko + import pekko.actor.typed.ActorSystem import pekko.actor.typed.Extension import pekko.actor.typed.ExtensionId diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala index 9fccb9209c6..8ce02d108e5 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.typed import java.time.Instant import org.apache.pekko + import pekko.Done import pekko.actor.typed.ActorRef import pekko.annotation.DoNotInherit diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala index b64fc1930d1..5122adb5955 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala @@ -19,13 +19,14 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.annotation.ApiMayChange import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi -import com.typesafe.config.Config - object ShardedDaemonProcessSettings { /** Scala API: Create default settings for system */ diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingDirectReplication.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingDirectReplication.scala index 470a77a2070..2573fc64683 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingDirectReplication.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingDirectReplication.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed import org.apache.pekko + import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingMessageExtractor.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingMessageExtractor.scala index 15f8ac45976..0644cec3bab 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingMessageExtractor.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardingMessageExtractor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.typed import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.{ InvalidMessageException, WrappedMessage } import pekko.cluster.sharding.typed.internal.ClusterShardingTypedSerializable diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala index 6ef3a74be9e..33eac04d8b2 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding.typed.delivery import java.util.function.{ Function => JFunction } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior @@ -24,8 +27,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.annotation.ApiMayChange import pekko.cluster.sharding.typed.delivery.internal.ShardingConsumerControllerImpl -import com.typesafe.config.Config - /** * `ShardingConsumerController` is used together with [[ShardingProducerController]]. See the description * in that class or the Pekko reference documentation for how they are intended to be used. diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala index 4266c16011c..c28cfeeab43 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala @@ -21,6 +21,9 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem @@ -33,8 +36,6 @@ import pekko.annotation.ApiMayChange import pekko.cluster.sharding.typed.ShardingEnvelope import pekko.cluster.sharding.typed.delivery.internal.ShardingProducerControllerImpl -import com.typesafe.config.Config - /** * Reliable delivery between a producer actor sending messages to sharded consumer * actors receiving the messages. diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingConsumerControllerImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingConsumerControllerImpl.scala index 3e85591e2a2..9cfcb715801 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingConsumerControllerImpl.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingConsumerControllerImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed.delivery.internal import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.DispatcherSelector diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala index 1778f005a02..f93880d3a26 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala @@ -21,6 +21,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala index 1794da8b866..0a0856a6a1e 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala @@ -26,6 +26,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.actor.ActorRefProvider import pekko.actor.ExtendedActorSystem import pekko.actor.InternalActorRef diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala index 60f1ea91f84..39978f97670 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster.sharding.typed.internal import scala.collection.{ immutable => im } import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker, Valid } import com.typesafe.config.Config +import pekko.annotation.InternalApi +import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker, Valid } + /** * INTERNAL API */ diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala index a69331442c5..966f1811156 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala @@ -13,12 +13,15 @@ package org.apache.pekko.cluster.sharding.typed.internal -import java.util.{ Map => JMap } import java.util.concurrent.atomic.AtomicLong +import java.util.{ Map => JMap } import scala.jdk.CollectionConverters._ import org.apache.pekko + +import org.slf4j.LoggerFactory + import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.LoggerOps import pekko.annotation.InternalApi @@ -33,8 +36,6 @@ import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey import pekko.persistence.typed.ReplicaId import pekko.persistence.typed.ReplicationId -import org.slf4j.LoggerFactory - /** * INTERNAL API */ diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala index bea64bff40a..b06dc8929f5 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration.Duration import org.apache.pekko + import pekko.Done import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessId.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessId.scala index 5310a9f2862..62aebdb176a 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessId.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessId.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.sharding.typed.ShardingEnvelope import pekko.cluster.sharding.typed.ShardingMessageExtractor diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala index 50ef440a899..a69410ab5bd 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala @@ -20,6 +20,7 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessState.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessState.scala index 6febc38d35a..f260759b9f2 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessState.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessState.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.typed.internal import java.time.Instant import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.LoggerOps diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala index 3287d94929f..643b251c66f 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala @@ -18,6 +18,7 @@ import java.nio.ByteBuffer import java.time.Instant import org.apache.pekko + import pekko.actor.typed.ActorRefResolver import pekko.actor.typed.scaladsl.adapter._ import pekko.annotation.InternalApi diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingState.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingState.scala index 55df61668fa..11c7890287b 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingState.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingState.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed.internal import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.SupervisorStrategy import pekko.actor.typed.scaladsl.Behaviors diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala index 65b36b56a73..c405a290d42 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala @@ -21,6 +21,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.actor.ActorRefProvider import pekko.actor.typed.ActorRef import pekko.actor.typed.Scheduler diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala index dcdd8b36bed..19182ac1de9 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala @@ -22,6 +22,7 @@ import scala.annotation.nowarn import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala index 32f63beb801..76cee06d709 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala @@ -14,10 +14,11 @@ package org.apache.pekko.cluster.sharding.typed.javadsl import java.util.Optional -import java.util.function.{ Function => JFunction } import java.util.function.IntFunction +import java.util.function.{ Function => JFunction } import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala index 820be201ebd..8d7f2e617fd 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcess.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcess.scala index 2f742b25a26..bbdd9da410b 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcess.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcess.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.typed.scaladsl import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/javadsl/EntityRef.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/javadsl/EntityRef.scala index ff77a8e3356..90bfdbe9a02 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/javadsl/EntityRef.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/javadsl/EntityRef.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed.testkit.javadsl import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.cluster.sharding.typed.internal.testkit.TestEntityRefImpl import pekko.cluster.sharding.typed.javadsl.EntityRef diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/EntityRef.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/EntityRef.scala index d56542290d0..1e05958554c 100644 --- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/EntityRef.scala +++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/EntityRef.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.typed.testkit.scaladsl import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.cluster.sharding.typed.internal.testkit.TestEntityRefImpl import pekko.cluster.sharding.typed.scaladsl.EntityRef diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala index 5c520edd887..64fec5d9ab5 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala @@ -19,16 +19,17 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.HdrHistogram.Histogram -import org.apache.pekko import pekko.actor._ import pekko.cluster.MemberStatus import pekko.cluster.sharding.ShardRegion.{ CurrentShardRegionState, GetShardRegionState, Passivate } import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterShardingRememberEntitiesPerfSpec { val NrRegions = 6 // use 5 for "real" testing diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala index fdbb55e811b..9c0922fc966 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding.typed import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -33,8 +36,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable -import com.typesafe.config.ConfigFactory - object ClusterShardingPreparingForShutdownSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala index 7973f789545..2ba1bb0a026 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.cluster.sharding.typed import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -28,10 +33,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - object ClusterShardingStatsSpecConfig extends MultiNodeConfig { val first = role("first") diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala index 22d544f1f6e..3881e2b182a 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster.sharding.typed import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef import pekko.cluster.MultiNodeClusterSpec @@ -26,10 +31,6 @@ import pekko.cluster.typed.{ MultiDcPinger, MultiNodeTypedClusterSpec } import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec } import pekko.util.Timeout -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - object MultiDcClusterShardingSpecConfig extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala index 95831d243ac..9086edb6b43 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala @@ -14,6 +14,13 @@ package org.apache.pekko.cluster.sharding.typed import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.time.Span + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef @@ -37,12 +44,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable -import org.scalatest.concurrent.Eventually -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.time.Span - -import com.typesafe.config.ConfigFactory - object ReplicatedShardingSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala index af0fb05aa9e..288eb530992 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster.sharding.typed import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.Behavior import pekko.actor.typed.receptionist.Receptionist @@ -29,10 +34,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - object ShardedDaemonProcessSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala index 2e447782cda..dcc6142716a 100644 --- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala +++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala @@ -19,6 +19,9 @@ import java.util.concurrent.TimeUnit.NANOSECONDS import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -43,8 +46,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.PerfFlamesSupport import pekko.serialization.jackson.CborSerializable -import com.typesafe.config.ConfigFactory - object DeliveryThroughputSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala index 17bb7741f85..a3ce40714a6 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala @@ -17,17 +17,18 @@ import scala.collection.{ immutable => im } import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.CoordinatedShutdown -import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, ScalaTestWithActorTestKit } -import pekko.actor.typed.ActorSystem -import pekko.cluster.{ Cluster => ClassicCluster } -import pekko.testkit.LongRunningTest import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.CoordinatedShutdown +import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, ScalaTestWithActorTestKit } +import pekko.actor.typed.ActorSystem +import pekko.cluster.{ Cluster => ClassicCluster } +import pekko.testkit.LongRunningTest + object JoinConfigCompatCheckerClusterShardingSpec { val Shards = 2 diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala index e8eb44dc7bb..efb4ce125a5 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster.sharding.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -25,8 +28,6 @@ import pekko.persistence.typed.ReplicaId import pekko.persistence.typed.ReplicationId import pekko.persistence.typed.internal.{ PublishedEventImpl, ReplicatedPublishedEventMetaData, VersionVector } -import org.scalatest.wordspec.AnyWordSpecLike - class ReplicatedShardingDirectReplicationSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "Replicated sharding direct replication" must { diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala index 0811ba1b468..fad96df5376 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala @@ -16,6 +16,13 @@ package org.apache.pekko.cluster.sharding.typed import java.util.concurrent.ThreadLocalRandom import org.apache.pekko + +import org.scalatest.time.Span +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, ScalaTestWithActorTestKit } import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem @@ -41,12 +48,6 @@ import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing import pekko.serialization.jackson.CborSerializable -import org.scalatest.time.Span -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object ReplicatedShardingSpec { def commonConfig = ConfigFactory.parseString(""" pekko.loglevel = DEBUG diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala index 003a6d91907..6d5f6a82e87 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala @@ -17,14 +17,15 @@ import java.nio.ByteBuffer import java.nio.ByteOrder import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.internal.adapter.ActorSystemAdapter import pekko.cluster.sharding.typed.internal.ShardingSerializer import pekko.serialization.SerializationExtension -import org.scalatest.wordspec.AnyWordSpecLike - class ShardingSerializerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "The typed ShardingSerializer" must { diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala index d9c6ac12c48..d6b0b4e2165 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala @@ -18,6 +18,12 @@ import java.util.UUID import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -39,11 +45,6 @@ import pekko.persistence.journal.inmem.InmemJournal import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.delivery.EventSourcedProducerQueue -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableShardingSpec { def conf: Config = ConfigFactory.parseString(s""" diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala index e05cf0d23d4..47ecbd188fe 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala @@ -18,6 +18,11 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.FishingOutcomes import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -38,10 +43,6 @@ import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey import pekko.cluster.typed.Cluster import pekko.cluster.typed.Join -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ReliableDeliveryShardingSpec { val config = ConfigFactory.parseString(""" pekko.actor.provider = cluster diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala index 229374a70ac..9ab9726d9aa 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala @@ -23,6 +23,11 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -44,10 +49,6 @@ import pekko.persistence.typed.RecoveryCompleted import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ClusterShardingPersistenceSpec { val config = ConfigFactory.parseString(""" pekko.loglevel = INFO diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala index aa5eaf3497a..26fa578083b 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala @@ -18,6 +18,11 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.ActorTestKit import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -37,10 +42,6 @@ import pekko.pattern.AskTimeoutException import pekko.serialization.jackson.CborSerializable import pekko.util.Timeout -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ClusterShardingSpec { val config = ConfigFactory.parseString(s""" pekko.actor.provider = cluster diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala index 37487af6502..5923c0f72cd 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster.sharding.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe } import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.typed.ActorRef @@ -22,8 +25,6 @@ import pekko.cluster.sharding.typed.{ GetShardRegionState, ShardingMessageExtrac import pekko.cluster.sharding.typed.scaladsl.ClusterShardingSpec._ import pekko.cluster.typed.{ Cluster, Join } -import org.scalatest.wordspec.AnyWordSpecLike - class ClusterShardingStateSpec extends ScalaTestWithActorTestKit(ClusterShardingSpec.config) with AnyWordSpecLike diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala index e414ccd0322..46fc84e2eb5 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster.sharding.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.ActorRef @@ -26,8 +29,6 @@ import pekko.cluster.typed.Cluster import pekko.cluster.typed.Join import pekko.cluster.typed.SelfUp -import org.scalatest.wordspec.AnyWordSpecLike - class ClusterShardingStatsSpec extends ScalaTestWithActorTestKit(ClusterShardingSpec.config) with AnyWordSpecLike diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala index 529f04133ba..b13e191d5a0 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster.sharding.typed.scaladsl import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.ActorRef @@ -32,10 +37,6 @@ import pekko.cluster.sharding.typed.internal.ShardedDaemonProcessStateKey import pekko.cluster.typed.Cluster import pekko.cluster.typed.Join -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ShardedDaemonProcessSpec { // single node cluster config def config = ConfigFactory.parseString(""" diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala index e5adea23a0f..99424b52f28 100644 --- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala +++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding.typed.testkit.scaladsl import scala.concurrent.Future import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -31,8 +34,6 @@ import pekko.cluster.sharding.typed.scaladsl.Entity import pekko.cluster.sharding.typed.scaladsl.EntityRef import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey -import org.scalatest.wordspec.AnyWordSpecLike - object TestEntityRefSpec { final case class AskReq(s: String, replyTo: ActorRef[Done]) diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala index 10b1d53d609..4b279c0578b 100755 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala @@ -24,6 +24,7 @@ import scala.jdk.CollectionConverters._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSystem diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala index 2f1d75ea74d..1a401364251 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala @@ -20,6 +20,9 @@ import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.annotation.InternalApi @@ -30,8 +33,6 @@ import pekko.pattern.AskTimeoutException import pekko.pattern.ask import pekko.util.Timeout -import com.typesafe.config.Config - /** * Internal API */ diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala index 9093e912a63..a50cd25dacd 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala @@ -18,6 +18,9 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.actor.NoSerializationVerificationNeeded import pekko.annotation.InternalApi @@ -27,8 +30,6 @@ import pekko.coordination.lease.LeaseUsageSettings import pekko.japi.Util.immutableSeq import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - object ClusterShardingSettings { val StateStoreModePersistence = "persistence" diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategy.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategy.scala index 0778c519dbe..ce168460cc7 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategy.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategy.scala @@ -18,6 +18,7 @@ import scala.collection.immutable import scala.concurrent.Future import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Address diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala index 208f2a7612c..99470e81dc5 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster.sharding import scala.collection.{ immutable => im } import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker } import com.typesafe.config.Config +import pekko.annotation.InternalApi +import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker } + /** * INTERNAL API */ diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/OldCoordinatorStateMigrationEventAdapter.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/OldCoordinatorStateMigrationEventAdapter.scala index 3a3fe6b0073..adbce2a0457 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/OldCoordinatorStateMigrationEventAdapter.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/OldCoordinatorStateMigrationEventAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.sharding.ShardCoordinator.Internal.ShardHomeAllocated import pekko.persistence.journal.EventAdapter diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala index 4b4d5273a57..d5f3392c891 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala @@ -21,6 +21,7 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala index b45ba8e8707..e301c45e995 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala @@ -21,6 +21,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala index 1d9baa46dc1..f6f56679c14 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala @@ -21,6 +21,7 @@ import scala.concurrent.duration._ import scala.util.Success import org.apache.pekko + import pekko.actor._ import pekko.actor.DeadLetterSuppression import pekko.annotation.{ InternalApi, InternalStableApi } @@ -43,7 +44,7 @@ import pekko.cluster.sharding.internal.ClusterShardAllocationMixin.RegionEntry import pekko.cluster.sharding.internal.ClusterShardAllocationMixin.ShardSuitabilityOrdering import pekko.cluster.sharding.internal.EventSourcedRememberEntitiesCoordinatorStore.MigrationMarker import pekko.event.{ BusLogging, Logging } -import pekko.pattern.{ pipe, AskTimeoutException } +import pekko.pattern.{ AskTimeoutException, pipe } import pekko.persistence._ import pekko.util.PrettyDuration._ import pekko.util.Timeout diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala index b5bd7f5cc57..46858f660cf 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala @@ -18,13 +18,14 @@ import java.nio.charset.StandardCharsets import scala.annotation.tailrec import scala.collection.immutable -import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Future, Promise } import scala.reflect.ClassTag import scala.runtime.AbstractFunction1 import scala.util.{ Failure, Success } import org.apache.pekko + import pekko.Done import pekko.actor._ import pekko.annotation.{ InternalApi, InternalStableApi } diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingFlightRecorder.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingFlightRecorder.scala index 52bd659492a..bdecc22f678 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingFlightRecorder.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingFlightRecorder.scala @@ -13,6 +13,7 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko + import pekko.actor.{ ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import pekko.annotation.InternalApi import pekko.util.FlightRecorderLoader diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingLogMarker.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingLogMarker.scala index e71b0ab52f3..99153c4dec0 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingLogMarker.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardingLogMarker.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko + import pekko.actor.Address import pekko.annotation.ApiMayChange import pekko.annotation.InternalApi diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocation.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocation.scala index 68c6ec86348..196a02c2308 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocation.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocation.scala @@ -17,6 +17,7 @@ import java.util.concurrent.ConcurrentHashMap import java.util.function.{ Function => JFunction } import org.apache.pekko + import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem import pekko.actor.Extension diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala index cd126c0681f..108780a87ab 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala index 5ce23eb3fe5..3ab191c75b5 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.external import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.cluster.sharding.ShardRegion.ShardId import pekko.cluster.sharding.external.ExternalShardAllocationStrategy.ShardLocation diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala index 2bec4058690..d32f510799b 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala @@ -21,6 +21,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.Done import pekko.actor.ActorRef import pekko.actor.ActorSystem diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/javadsl/ExternalShardAllocationClient.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/javadsl/ExternalShardAllocationClient.scala index dcac16f8101..df07d8cd676 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/javadsl/ExternalShardAllocationClient.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/javadsl/ExternalShardAllocationClient.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.external.javadsl import java.util.concurrent.CompletionStage import org.apache.pekko + import pekko.Done import pekko.actor.Address import pekko.annotation.ApiMayChange diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/scaladsl/ExternalShardAllocationClient.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/scaladsl/ExternalShardAllocationClient.scala index 6f57fda3cd2..810d7a57c93 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/scaladsl/ExternalShardAllocationClient.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/scaladsl/ExternalShardAllocationClient.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.external.scaladsl import scala.concurrent.Future import org.apache.pekko + import pekko.Done import pekko.actor.Address import pekko.annotation.ApiMayChange diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/AbstractLeastShardAllocationStrategy.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/AbstractLeastShardAllocationStrategy.scala index 1826e83f5b9..852cfdb42af 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/AbstractLeastShardAllocationStrategy.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/AbstractLeastShardAllocationStrategy.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration.DurationInt import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.annotation.InternalApi diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/ClusterShardAllocationMixin.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/ClusterShardAllocationMixin.scala index ec23b34ce9d..b554348aa2a 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/ClusterShardAllocationMixin.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/ClusterShardAllocationMixin.scala @@ -19,6 +19,7 @@ import java.lang.{ Integer => JInteger } import scala.collection.immutable import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Address import pekko.annotation.InternalApi diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/CustomStateStoreModeProvider.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/CustomStateStoreModeProvider.scala index d17e693adda..7afc6ffbd30 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/CustomStateStoreModeProvider.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/CustomStateStoreModeProvider.scala @@ -13,6 +13,7 @@ package org.apache.pekko.cluster.sharding.internal import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ExtendedActorSystem import pekko.actor.Props diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesCoordinatorStore.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesCoordinatorStore.scala index ad47a66631a..1e8099b8bb6 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesCoordinatorStore.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesCoordinatorStore.scala @@ -13,6 +13,7 @@ package org.apache.pekko.cluster.sharding.internal import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesProvider.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesProvider.scala index 3488fa42b14..3c19c4ee909 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesProvider.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesProvider.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.internal import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Props import pekko.annotation.InternalApi diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesShardStore.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesShardStore.scala index 9667bc60af8..6f5c372b46c 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesShardStore.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/DDataRememberEntitiesShardStore.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.internal import scala.concurrent.ExecutionContext import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EntityPassivationStrategy.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EntityPassivationStrategy.scala index 2806b5c5632..a51acfa3d3c 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EntityPassivationStrategy.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EntityPassivationStrategy.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.sharding.ClusterShardingSettings import pekko.cluster.sharding.ShardRegion.EntityId diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala index 59318768c89..6750513e77a 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.internal import scala.collection.mutable import org.apache.pekko + import pekko.actor.ActorLogging import pekko.actor.Props import pekko.annotation.InternalApi diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesProvider.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesProvider.scala index 61826483ab9..c0c8e55231c 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesProvider.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesProvider.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.internal import org.apache.pekko + import pekko.actor.Props import pekko.annotation.InternalApi import pekko.cluster.sharding.ClusterShardingSettings diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala index 3bbd8e41890..cce2f284fe0 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.internal import org.apache.pekko + import pekko.actor.ActorLogging import pekko.actor.Props import pekko.annotation.InternalApi diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/LeastShardAllocationStrategy.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/LeastShardAllocationStrategy.scala index 61d7ba5dd02..1cc9642f9c2 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/LeastShardAllocationStrategy.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/LeastShardAllocationStrategy.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.Future import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.cluster.sharding.ShardRegion.ShardId diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStore.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStore.scala index 3ae8699d24a..6d90078074e 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStore.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStore.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding.internal import org.apache.pekko + import pekko.actor.Props import pekko.annotation.InternalApi import pekko.cluster.sharding.ShardRegion.EntityId diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntityStarter.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntityStarter.scala index 88d4a797291..500c4e50675 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntityStarter.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/RememberEntityStarter.scala @@ -17,6 +17,7 @@ import scala.collection.immutable.Set import scala.concurrent.ExecutionContext import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/jfr/Events.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/jfr/Events.scala index 73b7a102615..8d614e01c79 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/jfr/Events.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/jfr/Events.scala @@ -13,10 +13,10 @@ package org.apache.pekko.cluster.sharding.internal.jfr -import jdk.jfr.{ Category, Event, Label, StackTrace, Timespan } - import org.apache.pekko.annotation.InternalApi +import jdk.jfr.{ Category, Event, Label, StackTrace, Timespan } + // requires jdk.jfr (available since JDK 9, project baseline is Java 17) /** INTERNAL API */ diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala index 01254975a68..08df24d6bf2 100644 --- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala +++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala @@ -23,6 +23,7 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Address import pekko.actor.ExtendedActorSystem diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GlobalRegistry.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GlobalRegistry.scala index 3302041a063..ae02164f3c5 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GlobalRegistry.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GlobalRegistry.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sbr import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GremlinController.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GremlinController.scala index 2c30e0647ae..0dc87d8a3d4 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GremlinController.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/GremlinController.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sbr import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/RandomizedBrainResolverIntegrationSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/RandomizedBrainResolverIntegrationSpec.scala index a0380d157fa..3c10a5c5801 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/RandomizedBrainResolverIntegrationSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/RandomizedBrainResolverIntegrationSpec.scala @@ -18,6 +18,12 @@ import scala.concurrent.duration._ import scala.util.Random import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.MemberStatus @@ -36,11 +42,6 @@ import pekko.testkit.TestKit import pekko.testkit.TestProbe import pekko.util.Timeout -import org.scalatest.BeforeAndAfterEach - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /* * Depends on Pekko private classes so needs to be in this package */ diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SbrTestLeaseActor.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SbrTestLeaseActor.scala index ee397cc1c09..7bd8eff98e9 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SbrTestLeaseActor.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SbrTestLeaseActor.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverIntegrationSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverIntegrationSpec.scala index 986ca2b9690..7975c3baf4d 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverIntegrationSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverIntegrationSpec.scala @@ -17,6 +17,13 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory +import com.typesafe.config.ConfigValueFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.ClusterSettings.DataCenter @@ -38,12 +45,6 @@ import pekko.testkit.TestKit import pekko.testkit.TestProbe import pekko.util.Timeout -import org.scalatest.BeforeAndAfterEach - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory -import com.typesafe.config.ConfigValueFactory - /* * Depends on Pekko private classes so needs to be in this package */ diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowning2Spec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowning2Spec.scala index 2da7b6d4e70..68e9c5ed6ed 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowning2Spec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowning2Spec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowningSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowningSpec.scala index 6c19bb2c2b2..87d17f1d970 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowningSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardCoordinatorDowningSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCoordinatorRoleSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCoordinatorRoleSpec.scala index e4fd8737ac4..84356c7643c 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCoordinatorRoleSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCoordinatorRoleSpec.scala @@ -16,15 +16,16 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.PoisonPill import pekko.actor.Props import pekko.cluster.sharding.MultiNodeClusterShardingSpec.EntityActor import pekko.testkit._ -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - class ClusterShardingCoordinatorRoleSpecConfig( mode: String, rememberEntities: Boolean, diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCustomShardAllocationSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCustomShardAllocationSpec.scala index 0dd4c88bed9..9e01beba8af 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCustomShardAllocationSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingCustomShardAllocationSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy import pekko.pattern.ask diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingFailureSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingFailureSpec.scala index b6f29aedb6a..6ae889b847a 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingFailureSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingFailureSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.cluster.sharding.ShardRegion.Passivate import pekko.cluster.sharding.ShardRegion.StartEntity diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStateSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStateSpec.scala index b6d1e23ae03..53d39cb8e49 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStateSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStateSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.ClusterEvent.CurrentClusterState import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object ClusterShardingGetStateSpec { import MultiNodeClusterShardingSpec.PingPongActor diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStatsSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStatsSpec.scala index 5702b2cdd0f..abd62c94079 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStatsSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGetStatsSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.MemberStatus import pekko.testkit.TestDuration import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object ClusterShardingGetStatsSpec { import MultiNodeClusterShardingSpec.PingPongActor diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownOldestSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownOldestSpec.scala index 67308ed37af..fc86155e3f7 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownOldestSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownOldestSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy import pekko.remote.testconductor.RoleName diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownSpec.scala index 651910cc89c..59891dd36a4 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingGracefulShutdownSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import org.apache.pekko import org.apache.pekko.Done + import pekko.actor._ import pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy import pekko.cluster.sharding.ShardRegion.{ CurrentRegions, GracefulShutdown } diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeavingSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeavingSpec.scala index 0db94cd150d..86f44c25031 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeavingSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeavingSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Props } import pekko.cluster.MemberStatus import pekko.serialization.jackson.CborSerializable diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingMinMembersSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingMinMembersSpec.scala index 668a3b582c9..434e7a591c7 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingMinMembersSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingMinMembersSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.cluster.MemberStatus import pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy import pekko.cluster.sharding.ShardRegion.{ ClusterShardingStats, GetClusterShardingStats } diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingQueriesSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingQueriesSpec.scala index 7fb37f33baa..8d7bfd8bae8 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingQueriesSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingQueriesSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.Props -import pekko.testkit.TestProbe import org.scalatest.concurrent.ScalaFutures import com.typesafe.config.ConfigFactory +import pekko.actor.Props +import pekko.testkit.TestProbe + object ClusterShardingQueriesSpec { import MultiNodeClusterShardingSpec.PingPongActor diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRegistrationCoordinatedShutdownSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRegistrationCoordinatedShutdownSpec.scala index 63bd09dee23..c1e0416f932 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRegistrationCoordinatedShutdownSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRegistrationCoordinatedShutdownSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.Done import pekko.actor._ import pekko.cluster.MemberStatus diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesNewExtractorSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesNewExtractorSpec.scala index 53d344a0d96..ac8ebea7ab1 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesNewExtractorSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesNewExtractorSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.{ Cluster, MemberStatus } import pekko.persistence.journal.leveldb.SharedLeveldbJournal import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterShardingRememberEntitiesNewExtractorSpec { final case class Started(ref: ActorRef) diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesSpec.scala index 8d46a92911d..a695976c770 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.{ Cluster, MemberStatus } import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterShardingRememberEntitiesSpec { val extractEntityId: ShardRegion.ExtractEntityId = { diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRolePartitioningSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRolePartitioningSpec.scala index 65e16bd4dc7..9826dd86f65 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRolePartitioningSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRolePartitioningSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko -import pekko.cluster.sharding.ShardRegion.{ ClusterShardingStats, GetClusterShardingStats } -import pekko.testkit._ import com.typesafe.config.{ Config, ConfigFactory } +import pekko.cluster.sharding.ShardRegion.{ ClusterShardingStats, GetClusterShardingStats } +import pekko.testkit._ + // Tests the case where cluster roles are used with cluster.min-nr-of-members, no per role min set // with 5 node cluster, 2 roles: 3 nodes role R1, 2 nodes role R2 // See https://github.com/akka/akka/issues/28177#issuecomment-555013145 diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSingleShardPerEntitySpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSingleShardPerEntitySpec.scala index bef6f9a3619..977bddb1310 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSingleShardPerEntitySpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSingleShardPerEntitySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.remote.testconductor.RoleName import pekko.remote.transport.ThrottlerTransportAdapter.Direction diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSpec.scala index b939a1b4c93..04a0ea7a8e5 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingSpec.scala @@ -17,6 +17,9 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.ddata.{ Replicator, ReplicatorSettings } @@ -32,8 +35,6 @@ import pekko.remote.testconductor.RoleName import pekko.testkit._ import pekko.testkit.TestEvent.Mute -import com.typesafe.config.ConfigFactory - object ClusterShardingSpec { // #counter-actor case object Increment diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ExternalShardAllocationSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ExternalShardAllocationSpec.scala index 6413c822232..44406b8f279 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ExternalShardAllocationSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ExternalShardAllocationSpec.scala @@ -16,6 +16,10 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.time.Span + import pekko.actor.{ Actor, ActorLogging, Address, Props } import pekko.cluster.Cluster import pekko.cluster.sharding.ExternalShardAllocationSpec.GiveMeYourHome.{ Get, Home } @@ -23,9 +27,6 @@ import pekko.cluster.sharding.external.{ ExternalShardAllocation, ExternalShardA import pekko.serialization.jackson.CborSerializable import pekko.testkit.{ ImplicitSender, TestProbe } -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.time.Span - object ExternalShardAllocationSpecConfig extends MultiNodeClusterShardingConfig(additionalConfig = """ pekko.cluster.sharding { diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiDcClusterShardingSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiDcClusterShardingSpec.scala index c7a9c62da31..54b58cd16f3 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiDcClusterShardingSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiDcClusterShardingSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorRef, Address, Props } import pekko.cluster.{ Cluster, MemberStatus } import pekko.cluster.sharding.ShardRegion.{ CurrentRegions, GetCurrentRegions } @@ -23,8 +26,6 @@ import pekko.remote.testconductor.RoleName import pekko.serialization.jackson.CborSerializable import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object MultiDcClusterShardingSpec { sealed trait EntityMsg extends CborSerializable { def id: String diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala index 8db34c68395..f6fda8e4256 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster.sharding import java.lang.reflect.Modifier import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.cluster.MultiNodeClusterSpec import pekko.persistence.journal.leveldb.SharedLeveldbJournal import pekko.remote.testkit.MultiNodeConfig -import com.typesafe.config.{ Config, ConfigFactory } - object MultiNodeClusterShardingConfig { private[sharding] def testNameFromCallStack(classToStartFrom: Class[?]): String = { diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingSpec.scala index 8b12b62fd8f..63a09a2deac 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingSpec.scala @@ -18,9 +18,10 @@ import java.io.File import scala.annotation.nowarn import scala.concurrent.duration._ +import org.apache.pekko + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.actor.{ Actor, ActorIdentity, ActorLogging, ActorRef, ActorSystem, Identify, PoisonPill, Props } import pekko.cluster.MultiNodeClusterSpec import pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy diff --git a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/RollingUpdateShardAllocationSpec.scala b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/RollingUpdateShardAllocationSpec.scala index 46b5f9ee275..633f9cd47c6 100644 --- a/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/RollingUpdateShardAllocationSpec.scala +++ b/cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/RollingUpdateShardAllocationSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.Address @@ -25,8 +28,6 @@ import pekko.cluster.MemberStatus.Up import pekko.serialization.jackson.CborSerializable import pekko.testkit.ImplicitSender -import com.typesafe.config.ConfigFactory - object RollingUpdateShardAllocationSpecConfig extends MultiNodeClusterShardingConfig( additionalConfig = """ diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheckSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheckSpec.scala index a6880305366..3838db8ab78 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheckSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheckSpec.scala @@ -16,16 +16,17 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.MemberStatus import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe import pekko.testkit.WithLogCapturing -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - object ClusterShardingHealthCheckSpec { val config = ConfigFactory.parseString(""" pekko.loglevel = DEBUG diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingInternalsSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingInternalsSpec.scala index 7a56163758c..7bec724402c 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingInternalsSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingInternalsSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, ExtendedActorSystem, NoSerializationVerificationNeeded, PoisonPill, Props } import pekko.cluster.ClusterSettings.DataCenter import pekko.cluster.sharding.ShardCoordinator.Internal.ShardStopped diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeaseSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeaseSpec.scala index 659b8709746..55938154a13 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeaseSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingLeaseSpec.scala @@ -18,6 +18,9 @@ import scala.util.Success import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.Props import pekko.cluster.{ Cluster, MemberStatus } import pekko.cluster.sharding.ShardRegion.StartEntity @@ -26,8 +29,6 @@ import pekko.coordination.lease.TestLeaseExt import pekko.testkit.{ ImplicitSender, PekkoSpec, WithLogCapturing } import pekko.testkit.TestActors.EchoActor -import com.typesafe.config.{ Config, ConfigFactory } - object ClusterShardingLeaseSpec { val config = ConfigFactory.parseString(""" pekko.loglevel = DEBUG diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettingsSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettingsSpec.scala index b194c5ecf45..e8927202d4b 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettingsSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettingsSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.{ PekkoSpec, TestKit } import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ActorSystem +import pekko.testkit.{ PekkoSpec, TestKit } + class ClusterShardingSettingsSpec extends AnyWordSpec with Matchers { def settings(conf: String): ClusterShardingSettings = { diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConcurrentStartupShardingSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConcurrentStartupShardingSpec.scala index ea8ae11bb42..609abd7f68a 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConcurrentStartupShardingSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConcurrentStartupShardingSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategySpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategySpec.scala index d65a35dda22..ccf2b794acc 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategySpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ConsistentHashingShardAllocationStrategySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.collection.immutable.SortedSet import org.apache.pekko + import pekko.actor.ActorPath import pekko.actor.ActorRef import pekko.actor.ActorRefProvider diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/CoordinatedShutdownShardingSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/CoordinatedShutdownShardingSpec.scala index 7cdb857d029..cc704fd8b3a 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/CoordinatedShutdownShardingSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/CoordinatedShutdownShardingSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.Done import pekko.actor.ActorSystem import pekko.actor.CoordinatedShutdown diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/DeprecatedLeastShardAllocationStrategySpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/DeprecatedLeastShardAllocationStrategySpec.scala index 88e6c3d5243..3d0aa954297 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/DeprecatedLeastShardAllocationStrategySpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/DeprecatedLeastShardAllocationStrategySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding import scala.collection.immutable.SortedSet import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Address import pekko.cluster.ClusterEvent.CurrentClusterState diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntitiesSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntitiesSpec.scala index 964b4cdf354..e7b43cfa3e8 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntitiesSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntitiesSpec.scala @@ -13,6 +13,10 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.ActorRef import pekko.cluster.sharding import pekko.cluster.sharding.Shard.Active @@ -24,9 +28,6 @@ import pekko.cluster.sharding.Shard.RememberingStop import pekko.event.NoLogging import pekko.util.OptionVal -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class EntitiesSpec extends AnyWordSpec with Matchers { private def newEntities(rememberingEntities: Boolean) = diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntityTerminationSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntityTerminationSpec.scala index d9c45886749..4c1565ad148 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntityTerminationSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/EntityTerminationSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.Props import pekko.cluster.Cluster @@ -24,8 +27,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec import pekko.testkit.WithLogCapturing -import com.typesafe.config.ConfigFactory - /** * Verifies that the automatic restart on terminate/crash that is in place for remember entities does not apply * when remember entities is not enabled diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/GetShardTypeNamesSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/GetShardTypeNamesSpec.scala index dcd85514769..3af67f45162 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/GetShardTypeNamesSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/GetShardTypeNamesSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko + import pekko.actor.Props import pekko.cluster.Cluster import pekko.testkit.PekkoSpec diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckShardingSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckShardingSpec.scala index 6ca482663b8..78799046426 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckShardingSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckShardingSpec.scala @@ -17,13 +17,14 @@ import scala.collection.{ immutable => im } import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.ActorSystem import pekko.cluster.{ Cluster, ClusterReadView } import pekko.testkit.{ LongRunningTest, PekkoSpec } import pekko.testkit.WithLogCapturing -import com.typesafe.config.{ Config, ConfigFactory } - class JoinConfigCompatCheckShardingSpec extends PekkoSpec() with WithLogCapturing { def initCluster(system: ActorSystem): ClusterReadView = { diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategyRandomizedSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategyRandomizedSpec.scala index 68e398318ac..6c6977e9a53 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategyRandomizedSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategyRandomizedSpec.scala @@ -19,6 +19,7 @@ import scala.collection.immutable.SortedSet import scala.util.Random import org.apache.pekko + import pekko.actor.ActorRef import pekko.cluster.ClusterEvent import pekko.cluster.ClusterEvent.CurrentClusterState diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategySpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategySpec.scala index 50a5535ab49..710cdb21161 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategySpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/LeastShardAllocationStrategySpec.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.collection.immutable.SortedSet import org.apache.pekko + import pekko.actor.ActorPath import pekko.actor.ActorRef import pekko.actor.ActorRefProvider diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/PersistentShardingMigrationSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/PersistentShardingMigrationSpec.scala index 6d7c4ced175..35095ca6a57 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/PersistentShardingMigrationSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/PersistentShardingMigrationSpec.scala @@ -18,14 +18,15 @@ import java.util.UUID import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.{ ActorRef, ActorSystem, Props } import pekko.cluster.{ Cluster, MemberStatus } import pekko.cluster.sharding.ShardRegion.CurrentRegions import pekko.persistence.PersistentActor import pekko.testkit.{ ImplicitSender, PekkoSpec, TestProbe } -import com.typesafe.config.{ Config, ConfigFactory } - /** * Test migration from old persistent shard coordinator with remembered * entities to using a ddatabacked shard coordinator with an event sourced diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ProxyShardingSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ProxyShardingSpec.scala index 87649ca904b..fd8c4e035fa 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ProxyShardingSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ProxyShardingSpec.scala @@ -14,10 +14,11 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.Await -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.testkit.PekkoSpec import pekko.testkit.TestActors diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesAndStartEntitySpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesAndStartEntitySpec.scala index 431537c964e..0a3a151696d 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesAndStartEntitySpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesAndStartEntitySpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.PoisonPill @@ -30,10 +35,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec import pekko.testkit.WithLogCapturing -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object RememberEntitiesAndStartEntitySpec { class EntityActor extends Actor { override def receive: Receive = { diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesBatchedUpdatesSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesBatchedUpdatesSpec.scala index 9cf7d65077f..f652958e97a 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesBatchedUpdatesSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesBatchedUpdatesSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko -import pekko.actor.{ Actor, ActorLogging, ActorRef, Props } -import pekko.cluster.{ Cluster, MemberStatus } -import pekko.testkit.{ ImplicitSender, PekkoSpec, TestProbe } import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor.{ Actor, ActorLogging, ActorRef, Props } +import pekko.cluster.{ Cluster, MemberStatus } +import pekko.testkit.{ ImplicitSender, PekkoSpec, TestProbe } + object RememberEntitiesBatchedUpdatesSpec { case class EntityEnvelope(id: Int, msg: Any) diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesFailureSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesFailureSpec.scala index 336d666d3c9..51c39e0200e 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesFailureSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesFailureSpec.scala @@ -19,6 +19,11 @@ import scala.concurrent.duration._ import org.apache.pekko import org.apache.pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.{ Actor, ActorLogging, ActorRef, Props, Timers } import pekko.cluster.Cluster @@ -32,10 +37,6 @@ import pekko.testkit.TestException import pekko.testkit.TestProbe import pekko.testkit.WithLogCapturing -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object RememberEntitiesFailureSpec { val config = ConfigFactory.parseString(s""" pekko.loglevel = DEBUG diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesShardIdExtractorChangeSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesShardIdExtractorChangeSpec.scala index 2419ae053d2..5f44158556f 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesShardIdExtractorChangeSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RememberEntitiesShardIdExtractorChangeSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import java.util.UUID import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Props @@ -26,8 +29,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - /** * Covers that remembered entities is correctly migrated when used and the shard id extractor * is changed so that entities should live on other shards after a full restart of the cluster. diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingDataSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingDataSpec.scala index a6ec3d8b662..f76558f52d7 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingDataSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingDataSpec.scala @@ -19,9 +19,10 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Success +import org.apache.pekko + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.actor.ActorRef import pekko.actor.Props import pekko.cluster.Cluster diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardRegionSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardRegionSpec.scala index 93fde80e903..979bfcf9c84 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardRegionSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardRegionSpec.scala @@ -17,9 +17,12 @@ import java.io.File import scala.concurrent.{ ExecutionContext, Future } +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.Done import pekko.actor.{ Actor, ActorLogging, ActorRef, ActorSystem, PoisonPill, Props } import pekko.cluster.{ Cluster, MemberStatus } @@ -29,8 +32,6 @@ import pekko.stream.scaladsl.{ Sink, Source } import pekko.testkit.{ DeadLettersFilter, PekkoSpec, TestProbe, WithLogCapturing } import pekko.testkit.TestEvent.Mute -import com.typesafe.config.ConfigFactory - object ShardRegionSpec { val host = "127.0.0.1" val tempConfig = diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardWithLeaseSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardWithLeaseSpec.scala index 800d1ffcf90..b854bf82be7 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardWithLeaseSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardWithLeaseSpec.scala @@ -19,6 +19,7 @@ import scala.util.Success import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.Props diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardingQueriesSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardingQueriesSpec.scala index 01dd8006cb3..e160ddf745e 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardingQueriesSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/ShardingQueriesSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sharding import org.apache.pekko + import pekko.cluster.sharding.Shard.{ CurrentShardState, ShardStats } import pekko.cluster.sharding.ShardRegion.ShardState import pekko.cluster.sharding.ShardingQueries.ShardsQueryResult diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StartEntitySpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StartEntitySpec.scala index 96684ff6b1a..04e311bce6c 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StartEntitySpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StartEntitySpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props @@ -25,8 +28,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec import pekko.testkit.WithLogCapturing -import com.typesafe.config.ConfigFactory - /** * Covers some corner cases around sending triggering an entity with StartEntity */ diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StopShardsSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StopShardsSpec.scala index b842993b5c8..992c733b40f 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StopShardsSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/StopShardsSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef @@ -33,8 +36,6 @@ import pekko.testkit.TestEvent.Mute import pekko.testkit.TestProbe import pekko.testkit.WithLogCapturing -import com.typesafe.config.ConfigFactory - object StopShardsSpec { def config = diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/SupervisionSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/SupervisionSpec.scala index f51ff09da78..d9fc07c5a96 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/SupervisionSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/SupervisionSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorLogging, ActorRef, PoisonPill, Props } import pekko.cluster.Cluster import pekko.cluster.sharding.ShardRegion.Passivate @@ -24,8 +27,6 @@ import pekko.testkit.{ ImplicitSender, PekkoSpec } import pekko.testkit.EventFilter import pekko.testkit.WithLogCapturing -import com.typesafe.config.ConfigFactory - object SupervisionSpec { val config = ConfigFactory.parseString(""" diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategySpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategySpec.scala index a21a14cc60a..b1ff848ca45 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategySpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.external import scala.concurrent.duration._ import org.apache.pekko + import pekko.cluster.sharding.external.ExternalShardAllocationStrategy.GetShardLocation import pekko.cluster.sharding.external.ExternalShardAllocationStrategy.GetShardLocationResponse import pekko.cluster.sharding.external.ExternalShardAllocationStrategy.GetShardLocations diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesShardStoreSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesShardStoreSpec.scala index a1c02374490..212ee9e74ed 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesShardStoreSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesShardStoreSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster.sharding.internal import java.util.UUID import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.Props import pekko.cluster.{ Cluster, MemberStatus } import pekko.cluster.ddata.{ Replicator, ReplicatorSettings } @@ -23,10 +28,6 @@ import pekko.cluster.sharding.ClusterShardingSettings import pekko.cluster.sharding.ShardRegion.ShardId import pekko.testkit.{ ImplicitSender, PekkoSpec, WithLogCapturing } -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - /** * Covers the interaction between the shard and the remember entities store */ diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStarterSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStarterSpec.scala index 99b9ab40d65..8d7785f1455 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStarterSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/internal/RememberEntitiesStarterSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding.internal import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.sharding.ClusterShardingSettings import pekko.cluster.sharding.Shard import pekko.cluster.sharding.ShardRegion @@ -23,8 +26,6 @@ import pekko.cluster.sharding.ShardRegion.ShardId import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - class RememberEntitiesStarterSpec extends PekkoSpec { var shardIdCounter = 1 diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/EntityPassivationSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/EntityPassivationSpec.scala index 7ef0d613e6e..be5bb81df93 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/EntityPassivationSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/EntityPassivationSpec.scala @@ -16,6 +16,12 @@ package org.apache.pekko.cluster.sharding.passivation import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.Eventually + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props @@ -28,11 +34,6 @@ import pekko.testkit.TestProbe import pekko.testkit.WithLogCapturing import pekko.util.Clock -import org.scalatest.concurrent.Eventually - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object EntityPassivationSpec { val config: Config = ConfigFactory.parseString(""" diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/AccessPattern.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/AccessPattern.scala index 16b18e9be40..e7ac7db2711 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/AccessPattern.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/AccessPattern.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.passivation.simulator import java.nio.file.Paths import org.apache.pekko + import pekko.NotUsed import pekko.cluster.sharding.ShardRegion.EntityId import pekko.stream.scaladsl._ diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/Simulator.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/Simulator.scala index bd826355602..8f5747e7ff4 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/Simulator.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/Simulator.scala @@ -21,6 +21,9 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.actor.ActorSystem import pekko.cluster.sharding.internal.ActiveEntities @@ -47,8 +50,6 @@ import pekko.stream.scaladsl.Source import pekko.util.Clock import pekko.util.OptionVal -import com.typesafe.config.ConfigFactory - /** * Simulator for testing the efficiency of passivation strategies. * For access pattern, can read cache replacement policy traces or generate synthetic events. diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/SimulatorSettings.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/SimulatorSettings.scala index 53a32df5eff..b831f0133e8 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/SimulatorSettings.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/passivation/simulator/SimulatorSettings.scala @@ -17,11 +17,12 @@ import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.japi.Util.immutableSeq -import pekko.util.Helpers.toRootLowerCase import com.typesafe.config.Config +import pekko.japi.Util.immutableSeq +import pekko.util.Helpers.toRootLowerCase + final case class SimulatorSettings(runs: immutable.Seq[SimulatorSettings.RunSettings], printDetailedStats: Boolean) object SimulatorSettings { diff --git a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializerSpec.scala b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializerSpec.scala index e4b5a790f5b..353e7622210 100644 --- a/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializerSpec.scala +++ b/cluster-sharding/src/test/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializerSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.protobuf import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Address import pekko.actor.ExtendedActorSystem import pekko.actor.Props diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala index 8e787a14bf4..f0741198c10 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala @@ -22,6 +22,9 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorLogging @@ -52,8 +55,6 @@ import pekko.routing.ConsistentHash import pekko.routing.MurmurHash import pekko.util.MessageBuffer -import com.typesafe.config.Config - @deprecated( "Use Pekko gRPC instead, see https://pekko.apache.org/docs/pekko/current/cluster-client.html#migration-to-pekko-grpc", since = "Akka 2.6.0") diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializer.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializer.scala index 8babe630ad3..457fefdf5a1 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializer.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializer.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.cluster.client.ClusterReceptionist import pekko.cluster.client.protobuf.msg.{ ClusterClientMessages => cm } diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediator.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediator.scala index 11dadf53fb6..fbd085a57f3 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediator.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediator.scala @@ -24,6 +24,9 @@ import scala.collection.immutable.TreeMap import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.DoNotInherit import pekko.cluster.Cluster @@ -40,8 +43,6 @@ import pekko.routing.Router import pekko.routing.RouterEnvelope import pekko.routing.RoutingLogic -import com.typesafe.config.Config - object DistributedPubSubSettings { /** diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/PerGroupingBuffer.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/PerGroupingBuffer.scala index 8f0bae2913f..9c1cbcc1216 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/PerGroupingBuffer.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/PerGroupingBuffer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.pubsub import org.apache.pekko + import pekko.actor.ActorRef import pekko.util.{ MessageBuffer, MessageBufferMap } diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala index b578c1f31cf..97310be5aae 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala @@ -22,6 +22,7 @@ import scala.collection.immutable.TreeMap import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.{ Address, ExtendedActorSystem } import pekko.actor.ActorRef import pekko.cluster.pubsub.DistributedPubSubMediator._ diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala index 6727f883aa4..40af44d595d 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala @@ -21,6 +21,9 @@ import scala.jdk.DurationConverters._ import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.Done import pekko.PekkoException import pekko.actor.Actor @@ -50,8 +53,6 @@ import pekko.pattern.ask import pekko.pattern.pipe import pekko.util.Timeout -import com.typesafe.config.Config - object ClusterSingletonManagerSettings { /** diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala index ba001c38a41..176d8a16c4c 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala @@ -17,6 +17,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.actor.NoSerializationVerificationNeeded import pekko.actor.RootActorPath @@ -32,8 +35,6 @@ import pekko.dispatch.Dispatchers import pekko.event.Logging import pekko.util.MessageBuffer -import com.typesafe.config.Config - object ClusterSingletonProxySettings { /** diff --git a/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializer.scala b/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializer.scala index 7a1be9ee0be..bf833f0c4a0 100644 --- a/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializer.scala +++ b/cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.singleton.protobuf import java.io.NotSerializableException import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.cluster.singleton.ClusterSingletonManager.Internal.HandOverDone import pekko.cluster.singleton.ClusterSingletonManager.Internal.HandOverInProgress diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientHandoverSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientHandoverSpec.scala index 35de79f37e1..64a2d688c55 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientHandoverSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientHandoverSpec.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorPath, ActorRef } import pekko.cluster.{ Cluster, MultiNodeClusterSpec } import pekko.remote.testconductor.RoleName import pekko.remote.testkit.{ MultiNodeConfig, STMultiNodeSpec } import pekko.testkit.{ ImplicitSender, TestActors } -import com.typesafe.config.ConfigFactory - object ClusterClientHandoverSpec extends MultiNodeConfig { val client = role("client") val first = role("first") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientSpec.scala index 3ec43fa0914..873bbe0c627 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorPath import pekko.actor.ActorRef @@ -36,8 +39,6 @@ import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ import pekko.util.Timeout -import com.typesafe.config.ConfigFactory - object ClusterClientSpec extends MultiNodeConfig { val client = role("client") val first = role("first") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientStopSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientStopSpec.scala index 548a8e797e1..74eb3cc501f 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientStopSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/client/ClusterClientStopSpec.scala @@ -17,6 +17,9 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, Props } import pekko.cluster.Cluster import pekko.cluster.pubsub.{ DistributedPubSub, DistributedPubSubMediator } @@ -24,8 +27,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec, STMultiNodeSpec } import pekko.testkit.{ EventFilter, ImplicitSender } -import com.typesafe.config.ConfigFactory - object ClusterClientStopSpec extends MultiNodeConfig { val client = role("client") val first = role("first") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorSpec.scala index 4c07ccdc12d..7984c25577b 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.pubsub import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef @@ -30,8 +33,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object DistributedPubSubMediatorSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubRestartSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubRestartSpec.scala index edebf5cc5aa..cd9c3a83ed1 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubRestartSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubRestartSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -31,8 +34,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object DistributedPubSubRestartSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerChaosSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerChaosSpec.scala index 2c28cf8b672..b4c7488f87b 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerChaosSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerChaosSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSelection @@ -31,8 +34,6 @@ import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ import pekko.testkit.TestEvent._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerChaosSpec extends MultiNodeConfig { val controller = role("controller") val first = role("first") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerDownedSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerDownedSpec.scala index db0bfd67606..d970d14ce66 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerDownedSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerDownedSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.PoisonPill @@ -29,8 +32,6 @@ import pekko.remote.testkit.STMultiNodeSpec import pekko.remote.transport.ThrottlerTransportAdapter import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerDownedSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaseSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaseSpec.scala index 386b88f984c..01437ae886d 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaseSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaseSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorIdentity, ActorLogging, ActorRef, Address, Identify, PoisonPill, Props } import pekko.cluster._ import pekko.cluster.MemberStatus.Up @@ -26,8 +29,6 @@ import pekko.coordination.lease.TestLeaseActorClientExt import pekko.remote.testkit.{ MultiNodeConfig, STMultiNodeSpec } import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerLeaseSpec extends MultiNodeConfig { val controller = role("controller") val first = role("first") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeave2Spec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeave2Spec.scala index 580d36ce89e..34dd9e29442 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeave2Spec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeave2Spec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorLogging @@ -31,8 +34,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerLeave2Spec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaveSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaveSpec.scala index f77bd3cc6b9..c7fdbcb0b0c 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaveSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerLeaveSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props @@ -27,8 +30,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerLeaveSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerPreparingForShutdownSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerPreparingForShutdownSpec.scala index b0e8a8dcbc4..066db84196f 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerPreparingForShutdownSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerPreparingForShutdownSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerPreparingForShutdownSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerSpec.scala index 0969b573ea9..8c2fd4cf462 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorLogging @@ -34,8 +37,6 @@ import pekko.serialization.jackson.CborSerializable import pekko.testkit._ import pekko.testkit.TestEvent._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerSpec extends MultiNodeConfig { val controller = role("controller") val observer = role("observer") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerStartupSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerStartupSpec.scala index 9ca8b6f2fd5..f50c767c329 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerStartupSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerStartupSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.PoisonPill @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterSingletonManagerStartupSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/MultiDcSingletonManagerSpec.scala b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/MultiDcSingletonManagerSpec.scala index 0b2806cd602..b7c76336b88 100644 --- a/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/MultiDcSingletonManagerSpec.scala +++ b/cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/MultiDcSingletonManagerSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorLogging, Address, PoisonPill, Props } import pekko.cluster.Cluster import pekko.cluster.ClusterSettings @@ -23,8 +26,6 @@ import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec, STMultiNodeSpec } import pekko.serialization.jackson.CborSerializable import pekko.testkit.ImplicitSender -import com.typesafe.config.ConfigFactory - object MultiDcSingletonManagerSpec extends MultiNodeConfig { val controller = role("controller") val first = role("first") diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializerSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializerSpec.scala index 7f2e37cea5d..065bbdca6b8 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializerSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializerSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.client.protobuf import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.cluster.client.ClusterReceptionist.Internal._ import pekko.testkit.PekkoSpec diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorDeadLettersSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorDeadLettersSpec.scala index e82794083b6..b5e4352e4ab 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorDeadLettersSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorDeadLettersSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.pubsub import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.DeadLetter import pekko.cluster.pubsub.DistributedPubSubMediator.{ Subscribe, _ } import pekko.testkit._ diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorRouterSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorRouterSpec.scala index 36fd0003279..e8bb599b8a6 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorRouterSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorRouterSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.cluster.pubsub import org.apache.pekko -import pekko.actor.ActorRef -import pekko.routing.{ ConsistentHashingRoutingLogic, RouterEnvelope } -import pekko.testkit._ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor.ActorRef +import pekko.routing.{ ConsistentHashingRoutingLogic, RouterEnvelope } +import pekko.testkit._ + case class WrappedMessage(msg: String) extends RouterEnvelope { override def message = msg } diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializerSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializerSpec.scala index 1e03402eaea..975862888bd 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializerSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializerSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.pubsub.protobuf import scala.collection.immutable.TreeMap import org.apache.pekko + import pekko.actor.{ Address, ExtendedActorSystem } import pekko.actor.Props import pekko.cluster.pubsub.DistributedPubSubMediator._ diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeaseSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeaseSpec.scala index c0eafdfa64e..ebcfcbd2975 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeaseSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeaseSpec.scala @@ -20,6 +20,9 @@ import scala.concurrent.duration._ import scala.util.Success import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef @@ -34,8 +37,6 @@ import pekko.testkit.PekkoSpec import pekko.testkit.TestException import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - class ImportantSingleton(lifeCycleProbe: ActorRef) extends Actor with ActorLogging { override def preStart(): Unit = { diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeavingSpeedSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeavingSpeedSpec.scala index 82a19e606d3..f453ad4df86 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeavingSpeedSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonLeavingSpeedSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSystem @@ -28,8 +31,6 @@ import pekko.cluster.singleton.ClusterSingletonLeavingSpeedSpec.TheSingleton import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object ClusterSingletonLeavingSpeedSpec { object TheSingleton { diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxySpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxySpec.scala index 97da3bc9e07..e76f190b15d 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxySpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxySpec.scala @@ -16,9 +16,6 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor._ -import pekko.cluster.Cluster -import pekko.testkit.{ TestKit, TestProbe } import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -26,6 +23,10 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.cluster.Cluster +import pekko.testkit.{ TestKit, TestProbe } + class ClusterSingletonProxySpec extends AnyWordSpecLike with Matchers with BeforeAndAfterAll { import ClusterSingletonProxySpec._ diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestart2Spec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestart2Spec.scala index 9e213c2a327..4c74a66f081 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestart2Spec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestart2Spec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorSystem import pekko.actor.PoisonPill @@ -26,8 +29,6 @@ import pekko.cluster.UniqueAddress import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object ClusterSingletonRestart2Spec { def singletonActorProps: Props = Props(new Singleton) diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestartSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestartSpec.scala index 2804d36c71a..22ec85fa4f4 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestartSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/ClusterSingletonRestartSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.singleton import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.PoisonPill import pekko.cluster.Cluster @@ -24,8 +27,6 @@ import pekko.testkit.PekkoSpec import pekko.testkit.TestActors import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - class ClusterSingletonRestartSpec extends PekkoSpec(""" pekko.loglevel = INFO diff --git a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializerSpec.scala b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializerSpec.scala index 8d8b8e1ed9b..e66845b40ea 100644 --- a/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializerSpec.scala +++ b/cluster-tools/src/test/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.singleton.protobuf import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.cluster.singleton.ClusterSingletonManager.Internal.HandOverDone import pekko.cluster.singleton.ClusterSingletonManager.Internal.HandOverInProgress diff --git a/cluster-typed/src/main/scala-2.13/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistProtocol.scala b/cluster-typed/src/main/scala-2.13/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistProtocol.scala index ecb02231df5..498370a8143 100644 --- a/cluster-typed/src/main/scala-2.13/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistProtocol.scala +++ b/cluster-typed/src/main/scala-2.13/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistProtocol.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.typed.internal.receptionist import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.internal.receptionist.{ AbstractServiceKey, ReceptionistMessages } import pekko.annotation.InternalApi diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/internal/ReplicatorBehavior.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/internal/ReplicatorBehavior.scala index 24debd520da..ae7d6f480f7 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/internal/ReplicatorBehavior.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/internal/ReplicatorBehavior.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.Terminated diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/DistributedData.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/DistributedData.scala index 33799cb01ee..e57b4837a82 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/DistributedData.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/DistributedData.scala @@ -18,6 +18,7 @@ import java.util.function.{ Function => JFunction } import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/Replicator.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/Replicator.scala index c6b536a5d10..de1ccd6dd35 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/Replicator.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/Replicator.scala @@ -19,6 +19,7 @@ import java.util.function.{ Function => JFunction } import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.DeadLetterSuppression import pekko.actor.NoSerializationVerificationNeeded import pekko.actor.typed.ActorRef diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala index 8fbaa0f835a..ca5735814f3 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala @@ -22,6 +22,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.javadsl.ActorContext import pekko.cluster.ddata.Key diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorSettings.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorSettings.scala index d6bbda36471..6c9961efc8e 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorSettings.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorSettings.scala @@ -14,12 +14,13 @@ package org.apache.pekko.cluster.ddata.typed.javadsl import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.adapter._ import pekko.cluster.{ ddata => dd } -import com.typesafe.config.Config - object ReplicatorSettings { /** diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/DistributedData.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/DistributedData.scala index 74819d18f6e..63ce38b74b0 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/DistributedData.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/DistributedData.scala @@ -17,6 +17,9 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + +import org.slf4j.LoggerFactory + import pekko.actor.ExtendedActorSystem import pekko.actor.typed.{ ActorRef, ActorSystem, Extension, ExtensionId, Props } import pekko.actor.typed.Behavior @@ -28,8 +31,6 @@ import pekko.cluster.Cluster import pekko.cluster.ddata.ReplicatedData import pekko.cluster.ddata.SelfUniqueAddress -import org.slf4j.LoggerFactory - object DistributedData extends ExtensionId[DistributedData] { def get(system: ActorSystem[?]): DistributedData = apply(system) diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/Replicator.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/Replicator.scala index 190c44c37ff..d34dd35a9f1 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/Replicator.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/Replicator.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata.typed.scaladsl import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.cluster.{ ddata => dd } diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala index e30ba2a1fb7..144f9ce9626 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala @@ -18,6 +18,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.scaladsl.ActorContext import pekko.cluster.ddata.Key diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala index f3718c7dfaa..290a1e270d0 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSettings.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata.typed.scaladsl import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.adapter._ import pekko.annotation.InternalApi import pekko.cluster.{ ddata => dd } -import com.typesafe.config.Config - /** * @see [[pekko.cluster.ddata.ReplicatorSettings]]. */ diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/package.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/package.scala index 206f6e76e5b..f628c7a9112 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/package.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/package.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.ddata.typed import org.apache.pekko + import pekko.cluster.{ ddata => dd } package object scaladsl { diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/Cluster.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/Cluster.scala index 3ce70078630..63da8aae3ea 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/Cluster.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/Cluster.scala @@ -19,6 +19,7 @@ import scala.collection.immutable import scala.concurrent.Future import org.apache.pekko + import pekko.actor.Address import pekko.actor.typed.{ ActorRef, ActorSystem, Extension, ExtensionId } import pekko.actor.typed.ExtensionSetup diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/ClusterSingleton.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/ClusterSingleton.scala index 1a3b122a6c0..bc88ec714e8 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/ClusterSingleton.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/ClusterSingleton.scala @@ -17,6 +17,9 @@ import scala.concurrent.duration.{ Duration, FiniteDuration, _ } import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed._ import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.cluster.ClusterSettings.DataCenter @@ -27,8 +30,6 @@ import pekko.cluster.singleton.{ import pekko.cluster.typed.internal.AdaptedClusterSingletonImpl import pekko.coordination.lease.LeaseUsageSettings -import com.typesafe.config.Config - object ClusterSingletonSettings { def apply(system: ActorSystem[?]): ClusterSingletonSettings = fromConfig(system.settings.config.getConfig("pekko.cluster")) diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterImpl.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterImpl.scala index 7d8974e0934..7577d65aa1b 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterImpl.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.typed.internal import org.apache.pekko + import pekko.actor.typed.{ ActorRef, ActorSystem, Terminated } import pekko.actor.typed.Behavior import pekko.actor.typed.Props diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterSingletonImpl.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterSingletonImpl.scala index 032400e67d8..cdc4ff8efc0 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterSingletonImpl.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterSingletonImpl.scala @@ -17,6 +17,7 @@ import java.util.concurrent.ConcurrentHashMap import java.util.function.{ Function => JFunction } import org.apache.pekko + import pekko.actor.{ ExtendedActorSystem, InvalidActorNameException } import pekko.actor.typed.{ ActorRef, ActorSystem, Behavior } import pekko.actor.typed.internal.{ PoisonPill, PoisonPillInterceptor } diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializer.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializer.scala index a915bed84d4..04c2b81ef56 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializer.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.typed.internal import java.io.NotSerializableException import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.actor.typed.ActorRefResolver import pekko.actor.typed.internal.pubsub.TopicImpl diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala index 218aef6e96c..50099955704 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala @@ -18,6 +18,7 @@ import java.io.NotSerializableException import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRefResolver import pekko.actor.typed.delivery.ConsumerController import pekko.actor.typed.delivery.DurableProducerQueue diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala index 474d82ee948..157bc3c98ee 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.typed.internal.receptionist import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Address import pekko.actor.typed.{ ActorRef, Behavior } import pekko.actor.typed.internal.receptionist.{ diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala index e2475e1f5d6..d312f5169b4 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala @@ -14,11 +14,12 @@ package org.apache.pekko.cluster.typed.internal.receptionist import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker, Valid } import com.typesafe.config.Config +import pekko.annotation.InternalApi +import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker, Valid } + /** * INTERNAL API * diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSettings.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSettings.scala index c775cf8b847..45563d6d470 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSettings.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSettings.scala @@ -17,6 +17,9 @@ import scala.concurrent.duration._ import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.annotation.InternalApi import pekko.cluster.ddata.Key.KeyId @@ -25,8 +28,6 @@ import pekko.cluster.ddata.Replicator.WriteConsistency import pekko.cluster.ddata.ReplicatorSettings import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - /** * Internal API */ diff --git a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/Registry.scala b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/Registry.scala index 4693a550ff7..4c9c2aeffc9 100644 --- a/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/Registry.scala +++ b/cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/Registry.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.typed.internal.receptionist import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.internal.receptionist.AbstractServiceKey import pekko.actor.typed.receptionist.ServiceKey diff --git a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/ChunkLargeMessageSpec.scala b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/ChunkLargeMessageSpec.scala index 4567555a23a..2c98bc0d80b 100644 --- a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/ChunkLargeMessageSpec.scala +++ b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/ChunkLargeMessageSpec.scala @@ -16,9 +16,12 @@ package org.apache.pekko.cluster.typed import scala.concurrent.duration._ import scala.util.Random +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.HdrHistogram.Histogram -import org.apache.pekko import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -31,8 +34,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable -import com.typesafe.config.ConfigFactory - object ChunkLargeMessageSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcClusterSingletonSpec.scala b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcClusterSingletonSpec.scala index 4637f1fe950..7411ca84707 100644 --- a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcClusterSingletonSpec.scala +++ b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcClusterSingletonSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.typed import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.scaladsl.adapter._ import pekko.cluster.{ MemberStatus, MultiNodeClusterSpec } import pekko.remote.testconductor.RoleName import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec } -import com.typesafe.config.ConfigFactory - object MultiDcClusterSingletonSpecConfig extends MultiNodeConfig { val first: RoleName = role("first") val second = role("second") diff --git a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcPinger.scala b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcPinger.scala index 3156b9399a2..29c3f9a88cd 100644 --- a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcPinger.scala +++ b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiDcPinger.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.typed import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.Behaviors diff --git a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiNodeTypedClusterSpec.scala b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiNodeTypedClusterSpec.scala index d65f925e889..f3798e25b3d 100644 --- a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiNodeTypedClusterSpec.scala +++ b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/MultiNodeTypedClusterSpec.scala @@ -21,6 +21,10 @@ import scala.concurrent.duration._ import scala.language.implicitConversions import org.apache.pekko + +import org.scalatest.Suite +import org.scalatest.matchers.should.Matchers + import pekko.actor.ActorIdentity import pekko.actor.Address import pekko.actor.Identify @@ -40,9 +44,6 @@ import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit.WatchedByCoroner import pekko.util.Timeout -import org.scalatest.Suite -import org.scalatest.matchers.should.Matchers - trait MultiNodeTypedClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoroner with Matchers { self: MultiNodeSpec => diff --git a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/PubSubSpec.scala b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/PubSubSpec.scala index d3459fdebe7..065047022d1 100644 --- a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/PubSubSpec.scala +++ b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/PubSubSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster.typed import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorRef import pekko.actor.typed.pubsub.Topic @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable -import com.typesafe.config.ConfigFactory - object PubSubSpecConfig extends MultiNodeConfig { val first: RoleName = role("first") val second = role("second") diff --git a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/internal/ClusterReceptionistUnreachabilitySpec.scala b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/internal/ClusterReceptionistUnreachabilitySpec.scala index 3ea3eb1401b..eed04e11660 100644 --- a/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/internal/ClusterReceptionistUnreachabilitySpec.scala +++ b/cluster-typed/src/multi-jvm/scala/org/apache/pekko/cluster/typed/internal/ClusterReceptionistUnreachabilitySpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.typed.internal import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.receptionist.Receptionist import pekko.actor.typed.receptionist.ServiceKey @@ -29,8 +32,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.remote.transport.ThrottlerTransportAdapter.Direction -import com.typesafe.config.ConfigFactory - object ClusterReceptionistUnreachabilitySpecConfig extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorCompileOnlyTest.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorCompileOnlyTest.scala index 8f6b50455af..594a2431da8 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorCompileOnlyTest.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorCompileOnlyTest.scala @@ -17,6 +17,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Scheduler import pekko.cluster.ddata.GCounter diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala index 2bdf781b536..842980242ca 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorSpec.scala @@ -14,11 +14,12 @@ package org.apache.pekko.cluster.ddata.typed.scaladsl import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import org.scalatest.wordspec.AnyWordSpecLike +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit + class ReplicatorSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "Replicator" must { "have the prefixed replicator name" in { diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorRefIgnoreSerializationSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorRefIgnoreSerializationSpec.scala index 72df6731f58..54d111f8aa6 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorRefIgnoreSerializationSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorRefIgnoreSerializationSpec.scala @@ -14,11 +14,6 @@ package org.apache.pekko.cluster.typed import org.apache.pekko -import pekko.{ actor => classic } -import pekko.actor.{ ExtendedActorSystem, IgnoreActorRef } -import pekko.actor.typed.{ ActorRef, ActorRefResolver, ActorSystem } -import pekko.actor.typed.scaladsl.Behaviors -import pekko.actor.typed.scaladsl.adapter._ import org.scalatest.BeforeAndAfterAll import org.scalatest.concurrent.ScalaFutures @@ -27,6 +22,12 @@ import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.{ actor => classic } +import pekko.actor.{ ExtendedActorSystem, IgnoreActorRef } +import pekko.actor.typed.{ ActorRef, ActorRefResolver, ActorSystem } +import pekko.actor.typed.scaladsl.Behaviors +import pekko.actor.typed.scaladsl.adapter._ + class ActorRefIgnoreSerializationSpec extends AnyWordSpec with ScalaFutures with Matchers with BeforeAndAfterAll { private var system1: ActorSystem[String] = _ diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorSystemSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorSystemSpec.scala index ae5e9d66dab..f3ee9eaab6a 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorSystemSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ActorSystemSpec.scala @@ -20,6 +20,16 @@ import scala.concurrent.Promise import scala.util.control.NonFatal import org.apache.pekko + +import org.scalatest._ +import org.scalatest.concurrent.Eventually +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.matchers.should.Matchers +import org.scalatest.time.Span +import org.scalatest.wordspec.AnyWordSpec + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.CoordinatedShutdown import pekko.actor.ExtendedActorSystem @@ -36,15 +46,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ import pekko.serialization.SerializerWithStringManifest -import org.scalatest._ -import org.scalatest.concurrent.Eventually -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.matchers.should.Matchers -import org.scalatest.time.Span -import org.scalatest.wordspec.AnyWordSpec - -import com.typesafe.config.ConfigFactory - object ActorSystemSpec { class TestSerializer(system: ExtendedActorSystem) extends SerializerWithStringManifest { diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterActorLoggingSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterActorLoggingSpec.scala index be00ec61982..407158c1361 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterActorLoggingSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterActorLoggingSpec.scala @@ -14,6 +14,12 @@ package org.apache.pekko.cluster.typed import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.ExtendedActorSystem import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -21,11 +27,6 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.internal.ActorMdc import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ClusterActorLoggingSpec { def config = ConfigFactory.parseString(""" pekko.actor.provider = cluster diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterApiSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterApiSpec.scala index 1fa3167452a..577f2b13561 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterApiSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterApiSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.cluster.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl.ActorTestKit @@ -24,10 +29,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.cluster.ClusterEvent._ import pekko.cluster.MemberStatus -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ClusterApiSpec { val config = ConfigFactory.parseString(""" diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonApiSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonApiSpec.scala index d094c6ee280..fa6016ac680 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonApiSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonApiSpec.scala @@ -17,6 +17,11 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -26,10 +31,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ClusterSingletonApiSpec { val config = ConfigFactory.parseString(s""" diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonPoisonPillSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonPoisonPillSpec.scala index be93a5e84e1..4b92ceaa4e8 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonPoisonPillSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/ClusterSingletonPoisonPillSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.typed import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe } import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -25,8 +28,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.actor.typed.scaladsl.adapter._ import pekko.cluster.typed.ClusterSingletonPoisonPillSpec.GetSelf -import org.scalatest.wordspec.AnyWordSpecLike - object ClusterSingletonPoisonPillSpec { final case class GetSelf(replyTo: ActorRef[ActorRef[Any]]) diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/GroupRouterSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/GroupRouterSpec.scala index 5eba65cfcaf..bfa29d8a26e 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/GroupRouterSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/GroupRouterSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster.typed import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.ActorRef @@ -28,10 +33,6 @@ import pekko.actor.typed.scaladsl.GroupRouter import pekko.actor.typed.scaladsl.Routers import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object GroupRouterSpec { def config = ConfigFactory.parseString(s""" pekko { diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteContextAskSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteContextAskSpec.scala index f978b6e8bb7..1d21d24f951 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteContextAskSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteContextAskSpec.scala @@ -18,6 +18,11 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -30,10 +35,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.serialization.jackson.CborSerializable import pekko.util.Timeout -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object RemoteContextAskSpec { def config = ConfigFactory.parseString(s""" pekko { diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteDeployNotAllowedSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteDeployNotAllowedSpec.scala index b58083968a1..de4676776f6 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteDeployNotAllowedSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteDeployNotAllowedSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.cluster.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.ActorTestKit import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -21,10 +26,6 @@ import pekko.actor.testkit.typed.scaladsl.TestProbe import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.Behaviors -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object RemoteDeployNotAllowedSpec { def config = ConfigFactory.parseString(s""" pekko { diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteMessageSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteMessageSpec.scala index 69d5205d695..5e461f6fd0c 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteMessageSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/RemoteMessageSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.typed import scala.concurrent.Promise import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.{ ActorSystem => ClassicActorSystem } import pekko.actor.typed.ActorRef @@ -25,8 +28,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.serialization.jackson.CborSerializable import pekko.testkit.PekkoSpec -import com.typesafe.config.ConfigFactory - object RemoteMessageSpec { def config = ConfigFactory.parseString(s""" pekko { diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializerSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializerSpec.scala index 9c16d3fb433..bfe362ac561 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializerSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/PekkoClusterTypedSerializerSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster.typed.internal import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.ExtendedActorSystem import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -22,8 +25,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.cluster.typed.internal.receptionist.ClusterReceptionist import pekko.serialization.SerializationExtension -import org.scalatest.wordspec.AnyWordSpecLike - class PekkoClusterTypedSerializerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { val ref = spawn(Behaviors.empty[String]) diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializerSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializerSpec.scala index 87d0573f250..1db2871eafc 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializerSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializerSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster.typed.internal.delivery import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.ExtendedActorSystem import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -27,8 +30,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.serialization.SerializationExtension import pekko.util.ByteString -import org.scalatest.wordspec.AnyWordSpecLike - class ReliableDeliverySerializerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { private val classicSystem = system.toClassic diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala index 88ce7f1a0eb..9c26e8c43cd 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistSpec.scala @@ -19,6 +19,13 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + +import com.typesafe.config.ConfigFactory + import pekko.actor.RootActorPath import pekko.actor.testkit.typed.FishingOutcome import pekko.actor.testkit.typed.scaladsl.ActorTestKit @@ -39,12 +46,6 @@ import pekko.serialization.jackson.CborSerializable import pekko.testkit.GHExcludeAeronTest import pekko.testkit.LongRunningTest -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - -import com.typesafe.config.ConfigFactory - object ClusterReceptionistSpec { val config = ConfigFactory.parseString(s""" pekko.loglevel = DEBUG # issue #24960 diff --git a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistStateSpec.scala b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistStateSpec.scala index dd748193616..585f617876a 100644 --- a/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistStateSpec.scala +++ b/cluster-typed/src/test/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionistStateSpec.scala @@ -13,10 +13,14 @@ package org.apache.pekko.cluster.typed.internal.receptionist -import scala.concurrent.duration._ import scala.concurrent.duration.Deadline +import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.Address import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.internal.receptionist.AbstractServiceKey @@ -25,9 +29,6 @@ import pekko.cluster.UniqueAddress import pekko.cluster.typed.internal.receptionist.ClusterReceptionistProtocol.SubscriptionsKV import pekko.util.TypedMultiMap -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - class ClusterReceptionistStateSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with Matchers { val SomeService = ServiceKey[Int]("boy-oh-boy!") diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/Cluster.scala b/cluster/src/main/scala/org/apache/pekko/cluster/Cluster.scala index 4555dca23ed..65a74719e9e 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/Cluster.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/Cluster.scala @@ -20,14 +20,17 @@ import java.util.concurrent.atomic.AtomicBoolean import scala.annotation.varargs import scala.collection.immutable -import scala.concurrent.{ Await, ExecutionContext } import scala.concurrent.Future import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext } import scala.util.Failure import scala.util.Success import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.ConfigurationException import pekko.actor._ import pekko.annotation.InternalApi @@ -43,8 +46,6 @@ import pekko.remote.{ UniqueAddress => _, _ } import pekko.util.Helpers.toRootLowerCase import pekko.util.Version -import com.typesafe.config.{ Config, ConfigFactory } - /** * Cluster Extension Id and factory for creating Cluster extension. */ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterActorRefProvider.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterActorRefProvider.scala index 63d746c51e6..5c13d45bd01 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterActorRefProvider.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterActorRefProvider.scala @@ -16,6 +16,10 @@ package org.apache.pekko.cluster import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.ConfigurationException import pekko.actor.ActorPath import pekko.actor.ActorRef @@ -38,9 +42,6 @@ import pekko.remote.routing.RemoteRouterConfig import pekko.routing.Group import pekko.routing.Pool -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * INTERNAL API * diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala index 081b8c42163..5d08f5cbbfb 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala @@ -23,6 +23,9 @@ import scala.util.Success import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.Done import pekko.actor._ import pekko.actor.SupervisorStrategy.Stop @@ -36,8 +39,6 @@ import pekko.remote.{ QuarantinedEvent => ClassicQuarantinedEvent, RemoteSetting import pekko.remote.artery.QuarantinedEvent import pekko.util.{ Timeout, Version } -import com.typesafe.config.Config - /** * Base trait for all cluster messages. All ClusterMessage's are serializable. */ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala index 48559f31955..c9dab1879e2 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala @@ -20,6 +20,7 @@ import scala.jdk.CollectionConverters._ import scala.runtime.AbstractFunction5 import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Address } import pekko.actor.DeadLetterSuppression import pekko.annotation.{ DoNotInherit, InternalApi } diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala index e75a23fe959..36445b7da5c 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorPath import pekko.actor.ActorSelection diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterJmx.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterJmx.scala index cb79701f1ab..33b16ad70c4 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterJmx.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterJmx.scala @@ -20,6 +20,7 @@ import javax.management.ObjectName import javax.management.StandardMBean import org.apache.pekko + import pekko.actor.AddressFromURIString import pekko.event.LoggingAdapter diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterLogMarker.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterLogMarker.scala index 7aabcbfba45..379d32681de 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterLogMarker.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterLogMarker.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.actor.Address import pekko.annotation.ApiMayChange import pekko.annotation.InternalApi diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterReadView.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterReadView.scala index 0d265faeee3..28676a3426d 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterReadView.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterReadView.scala @@ -19,6 +19,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.collection.immutable import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Address diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterRemoteWatcher.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterRemoteWatcher.scala index a5b5bc0d753..d9502e6a5c9 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterRemoteWatcher.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterRemoteWatcher.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor._ import pekko.cluster.ClusterEvent.CurrentClusterState import pekko.cluster.ClusterEvent.MemberEvent diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterSettings.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterSettings.scala index ac38a911fcc..464bae5d91a 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ClusterSettings.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ClusterSettings.scala @@ -18,15 +18,16 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigObject + import pekko.actor.Address import pekko.actor.AddressFromURIString import pekko.annotation.InternalApi -import pekko.util.Helpers.{ toRootLowerCase, ConfigOps, Requiring } +import pekko.util.Helpers.{ ConfigOps, Requiring, toRootLowerCase } import pekko.util.Version -import com.typesafe.config.Config -import com.typesafe.config.ConfigObject - object ClusterSettings { type DataCenter = String diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala b/cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala index 9f1cd95a60e..bfe1e497651 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala @@ -18,10 +18,11 @@ package org.apache.pekko.cluster import org.apache.pekko -import pekko.annotation.InternalApi import com.typesafe.config.{ Config, ConfigValue, ConfigValueFactory, ConfigValueType } +import pekko.annotation.InternalApi + @InternalApi private[cluster] object ConfigUtil { diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/CoordinatedShutdownLeave.scala b/cluster/src/main/scala/org/apache/pekko/cluster/CoordinatedShutdownLeave.scala index ddb34545e9f..dd758628e9c 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/CoordinatedShutdownLeave.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/CoordinatedShutdownLeave.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.Done import pekko.actor.Actor import pekko.actor.ActorRef diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala b/cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala index fde60828f0f..d5a9bb849c5 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala @@ -17,6 +17,7 @@ import scala.collection.SortedSet import scala.collection.immutable import org.apache.pekko + import pekko.actor.{ Actor, ActorSelection, Address, NoSerializationVerificationNeeded } import pekko.annotation.InternalApi import pekko.cluster.ClusterEvent._ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/DowningProvider.scala b/cluster/src/main/scala/org/apache/pekko/cluster/DowningProvider.scala index c33f50ee386..4bcc470a033 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/DowningProvider.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/DowningProvider.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.ConfigurationException import pekko.actor.{ ActorSystem, ExtendedActorSystem, Props } diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala b/cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala index 1326c944124..511fe28a691 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala @@ -19,11 +19,11 @@ import java.security.MessageDigest import scala.collection.immutable import scala.concurrent.duration.Deadline +import org.apache.pekko.annotation.InternalApi + import ClusterSettings.DataCenter import MemberStatus._ -import org.apache.pekko.annotation.InternalApi - /** * INTERNAL API */ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatCheckCluster.scala b/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatCheckCluster.scala index 97f55b65ac2..d2be28454b3 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatCheckCluster.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatCheckCluster.scala @@ -16,10 +16,11 @@ package org.apache.pekko.cluster import scala.collection.{ immutable => im } import org.apache.pekko -import pekko.annotation.InternalApi import com.typesafe.config.Config +import pekko.annotation.InternalApi + /** * INTERNAL API */ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatChecker.scala b/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatChecker.scala index 5e5f354e5de..8a0711ce2e5 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatChecker.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/JoinConfigCompatChecker.scala @@ -17,11 +17,12 @@ import scala.collection.{ immutable => im } import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.annotation.{ DoNotInherit, InternalApi } import com.typesafe.config.{ Config, ConfigFactory, ConfigValue } +import pekko.actor.ExtendedActorSystem +import pekko.annotation.{ DoNotInherit, InternalApi } + abstract class JoinConfigCompatChecker { /** The configuration keys that are required for this checker */ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/Member.scala b/cluster/src/main/scala/org/apache/pekko/cluster/Member.scala index a741f89fbe5..665c429fda4 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/Member.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/Member.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.runtime.AbstractFunction2 import org.apache.pekko + import pekko.actor.Address import pekko.annotation.InternalApi import pekko.cluster.ClusterSettings.DataCenter diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala b/cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala index 02662adf0d4..536a3575642 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala @@ -21,6 +21,7 @@ import scala.collection.immutable import scala.util.Random import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.ClusterSettings.DataCenter import pekko.cluster.MemberStatus._ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/Reachability.scala b/cluster/src/main/scala/org/apache/pekko/cluster/Reachability.scala index c2816da4f99..db078610f17 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/Reachability.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/Reachability.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/SeedNodeProcess.scala b/cluster/src/main/scala/org/apache/pekko/cluster/SeedNodeProcess.scala index 9656b14020e..888a7ba9c47 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/SeedNodeProcess.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/SeedNodeProcess.scala @@ -18,6 +18,7 @@ import scala.collection.immutable import scala.concurrent.duration.{ Deadline, _ } import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Address, CoordinatedShutdown, ReceiveTimeout } import pekko.annotation.{ InternalApi, InternalStableApi } diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala b/cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala index d25e4d620c9..a2aefc6bdfb 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala @@ -21,6 +21,9 @@ import scala.concurrent.duration.Deadline import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory, ConfigRenderOptions } + import pekko.actor.{ Address, ExtendedActorSystem } import pekko.annotation.InternalApi import pekko.cluster._ @@ -34,8 +37,6 @@ import pekko.routing.Pool import pekko.serialization._ import pekko.util.Version -import com.typesafe.config.{ Config, ConfigFactory, ConfigRenderOptions } - /** * INTERNAL API */ diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala b/cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala index f499c8801a0..ccc47d95c42 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala @@ -20,6 +20,10 @@ import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.Cluster import pekko.cluster.ClusterEvent._ @@ -40,9 +44,6 @@ import pekko.routing.RouterPoolActor import pekko.routing.RoutingLogic import pekko.util.HashCode -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object ClusterRouterGroupSettings { @varargs diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala index 8f781cb27e3..679e8d58f66 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.Address import pekko.annotation.InternalApi import pekko.annotation.InternalStableApi diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala index ce1e9f21d47..0c68a288ee5 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala @@ -20,6 +20,7 @@ import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Address import pekko.actor.ExtendedActorSystem diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverProvider.scala b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverProvider.scala index d922ce1dfb8..ab8f98a4534 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverProvider.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverProvider.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.Props import pekko.cluster.Cluster diff --git a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSettings.scala b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSettings.scala index 32370b4e596..bbce1d2123a 100644 --- a/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSettings.scala +++ b/cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSettings.scala @@ -18,12 +18,13 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration._ import org.apache.pekko -import pekko.ConfigurationException -import pekko.annotation.InternalApi -import pekko.util.Helpers.{ toRootLowerCase, Requiring } import com.typesafe.config.Config +import pekko.ConfigurationException +import pekko.annotation.InternalApi +import pekko.util.Helpers.{ Requiring, toRootLowerCase } + /** * INTERNAL API */ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/AttemptSysMsgRedeliverySpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/AttemptSysMsgRedeliverySpec.scala index 9bfce953cf5..9e0e6e98ff7 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/AttemptSysMsgRedeliverySpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/AttemptSysMsgRedeliverySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUnreachableSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUnreachableSpec.scala index da55c3231ef..18b781f334b 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUnreachableSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUnreachableSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUpSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUpSpec.scala index 8c869bb8e8d..64540c62c17 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUpSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClientDowningNodeThatIsUpSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterAccrualFailureDetectorSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterAccrualFailureDetectorSpec.scala index a3fc9d844a7..22019d612ab 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterAccrualFailureDetectorSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterAccrualFailureDetectorSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterAccrualFailureDetectorMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterDeathWatchSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterDeathWatchSpec.scala index f02f7e7cb97..758c251ace5 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterDeathWatchSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterDeathWatchSpec.scala @@ -19,6 +19,11 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.MultiNodeClusterSpec.EndActor import pekko.remote.RemoteActorRef @@ -27,10 +32,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ import pekko.testkit.TestEvent._ -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - object ClusterDeathWatchMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterShutdownSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterShutdownSpec.scala index a2193c1c9e5..052151622b1 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterShutdownSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterShutdownSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko -import pekko.cluster.MemberStatus.Removed -import pekko.remote.testkit.MultiNodeConfig import org.scalatest.concurrent.Eventually +import pekko.cluster.MemberStatus.Removed +import pekko.remote.testkit.MultiNodeConfig + object ClusterShutdownSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterWatcherNoClusterWatcheeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterWatcherNoClusterWatcheeSpec.scala index 20209e6d269..8fe3dbad3e0 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterWatcherNoClusterWatcheeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ClusterWatcherNoClusterWatcheeSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -30,10 +35,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.testkit.ImplicitSender import pekko.testkit.TestProbe -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - class ClusterWatcherNoClusterWatcheeConfig(val useUnsafe: Boolean, artery: Boolean) extends MultiNodeConfig { val clustered = role("clustered") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ConvergenceSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ConvergenceSpec.scala index 79aff6f0629..17b58cc60a1 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ConvergenceSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/ConvergenceSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - final case class ConvergenceMultiNodeConfig(failureDetectorPuppet: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DeterministicOldestWhenJoiningSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DeterministicOldestWhenJoiningSpec.scala index 9feb8341445..f49603bd759 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DeterministicOldestWhenJoiningSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DeterministicOldestWhenJoiningSpec.scala @@ -17,14 +17,15 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.cluster.ClusterEvent.CurrentClusterState import pekko.cluster.ClusterEvent.MemberUp import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object DeterministicOldestWhenJoiningMultiJvmSpec extends MultiNodeConfig { val seed1 = role("seed1") val seed2 = role("seed2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DisallowJoinOfTwoClustersSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DisallowJoinOfTwoClustersSpec.scala index 16fce678c58..4d32add691b 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DisallowJoinOfTwoClustersSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DisallowJoinOfTwoClustersSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DowningWhenOtherHasQuarantinedThisActorSystemSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DowningWhenOtherHasQuarantinedThisActorSystemSpec.scala index 0e882f2bd9f..314d9fc4d3d 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DowningWhenOtherHasQuarantinedThisActorSystemSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/DowningWhenOtherHasQuarantinedThisActorSystemSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.Identify import pekko.actor.RootActorPath @@ -25,8 +28,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter import pekko.testkit.LongRunningTest -import com.typesafe.config.ConfigFactory - object DowningWhenOtherHasQuarantinedThisActorSystemSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialHeartbeatSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialHeartbeatSpec.scala index 3a315c524d4..fa21f9dcff0 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialHeartbeatSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialHeartbeatSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.ClusterEvent.CurrentClusterState import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object InitialHeartbeatMultiJvmSpec extends MultiNodeConfig { val controller = role("controller") val first = role("first") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialMembersOfNewDcSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialMembersOfNewDcSpec.scala index 3a27cbc54cb..ecddcba0941 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialMembersOfNewDcSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/InitialMembersOfNewDcSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko -import pekko.remote.testkit._ -import pekko.testkit.ImplicitSender import com.typesafe.config.ConfigFactory +import pekko.remote.testkit._ +import pekko.testkit.ImplicitSender + object InitialMembersOfNewDcSpec extends MultiNodeConfig { commonConfig(ConfigFactory.parseString(s""" pekko.actor.provider = cluster diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinInProgressSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinInProgressSpec.scala index 3b84163653c..00ad0b8b54f 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinInProgressSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinInProgressSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko -import pekko.remote.testkit.MultiNodeConfig -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.remote.testkit.MultiNodeConfig +import pekko.testkit._ + object JoinInProgressMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinSeedNodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinSeedNodeSpec.scala index d4cc583baae..637661e4169 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinSeedNodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/JoinSeedNodeSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ import pekko.util.Version -import com.typesafe.config.ConfigFactory - object JoinSeedNodeMultiJvmSpec extends MultiNodeConfig { val seed1 = role("seed1") val seed2 = role("seed2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LargeMessageClusterSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LargeMessageClusterSpec.scala index 756b17ee66a..a643c9c66d7 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LargeMessageClusterSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LargeMessageClusterSpec.scala @@ -20,6 +20,9 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorIdentity import pekko.actor.ActorRef import pekko.actor.ExtendedActorSystem @@ -32,8 +35,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.serialization.SerializerWithStringManifest import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object LargeMessageClusterMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningAllOtherNodesSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningAllOtherNodesSpec.scala index 3f051422b45..9e4e410e2ff 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningAllOtherNodesSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningAllOtherNodesSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko -import pekko.remote.testkit.MultiNodeConfig -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.remote.testkit.MultiNodeConfig +import pekko.testkit._ + object LeaderDowningAllOtherNodesMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala index 717875de820..bf19d7e3df1 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko -import pekko.remote.testkit.MultiNodeConfig -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.remote.testkit.MultiNodeConfig +import pekko.testkit._ + final case class LeaderDowningNodeThatIsUnreachableMultiNodeConfig(failureDetectorPuppet: Boolean) extends MultiNodeConfig { val first = role("first") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderElectionSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderElectionSpec.scala index 44595913df1..0e8a7327901 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderElectionSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderElectionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderLeavingSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderLeavingSpec.scala index 836657b4512..9396de35191 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderLeavingSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/LeaderLeavingSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.Deploy import pekko.actor.Props @@ -23,8 +26,6 @@ import pekko.cluster.MemberStatus._ import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object LeaderLeavingMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MBeanSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MBeanSpec.scala index 51f485ba9f2..024cd1d7bbd 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MBeanSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MBeanSpec.scala @@ -20,11 +20,12 @@ import javax.management.ObjectName import scala.concurrent.duration._ import org.apache.pekko -import pekko.remote.testkit.MultiNodeConfig -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.remote.testkit.MultiNodeConfig +import pekko.testkit._ + object MBeanMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MemberWeaklyUpSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MemberWeaklyUpSpec.scala index 49f8f5ecefc..3618bffecad 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MemberWeaklyUpSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MemberWeaklyUpSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.MemberStatus.WeaklyUp import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object MemberWeaklyUpSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerExitingSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerExitingSpec.scala index eb86f48471c..0a4745828f5 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerExitingSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerExitingSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Deploy import pekko.actor.Props diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerUpSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerUpSpec.scala index 11d4e033c43..060a264ecf7 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerUpSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MembershipChangeListenerUpSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Deploy import pekko.actor.Props diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MinMembersBeforeUpSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MinMembersBeforeUpSpec.scala index 160ee6eb0c8..ada0598c0db 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MinMembersBeforeUpSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MinMembersBeforeUpSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.MemberStatus._ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object MinMembersBeforeUpMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcClusterSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcClusterSpec.scala index 63fe5c12570..ebd2fa03686 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcClusterSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcClusterSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.MemberStatus.Up import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction -import com.typesafe.config.ConfigFactory - class MultiDcSpecConfig(crossDcConnections: Int = 5) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcHeartbeatTakingOverSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcHeartbeatTakingOverSpec.scala index 558b6f5d274..a4da4e3892a 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcHeartbeatTakingOverSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcHeartbeatTakingOverSpec.scala @@ -18,6 +18,9 @@ import scala.collection.immutable.SortedSet import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.ActorSelection import pekko.annotation.InternalApi @@ -25,8 +28,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object MultiDcHeartbeatTakingOverSpecMultiJvmSpec extends MultiNodeConfig { val first = role("first") // alpha val second = role("second") // alpha diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoin2Spec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoin2Spec.scala index 91f7328155d..47edb414d60 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoin2Spec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoin2Spec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.cluster.ClusterEvent.InitialStateAsEvents import pekko.cluster.ClusterEvent.MemberUp import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - // Similar to MultiDcJoinSpec, but slightly different scenario object MultiDcJoin2MultiJvmSpec extends MultiNodeConfig { val first = role("first") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoinSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoinSpec.scala index 19042e401ab..c3ab0dff361 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoinSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcJoinSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.ClusterEvent.InitialStateAsEvents import pekko.cluster.ClusterEvent.MemberUp import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - // reproducer for issue #29280 object MultiDcJoinMultiJvmSpec extends MultiNodeConfig { val first = role("first") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSplitBrainSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSplitBrainSpec.scala index 1eaa7c10e5e..c10e6d5a5d6 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSplitBrainSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSplitBrainSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.cluster.ClusterEvent._ import pekko.remote.testconductor.RoleName @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object MultiDcSplitBrainMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSunnyWeatherSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSunnyWeatherSpec.scala index 03e344007a0..395a9a68822 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSunnyWeatherSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiDcSunnyWeatherSpec.scala @@ -18,14 +18,15 @@ import scala.collection.immutable.SortedSet import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object MultiDcSunnyWeatherMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiNodeClusterSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiNodeClusterSpec.scala index 353206fd5cd..22e37156bc1 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiNodeClusterSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiNodeClusterSpec.scala @@ -21,6 +21,12 @@ import scala.concurrent.duration._ import scala.language.implicitConversions import org.apache.pekko + +import org.scalatest.exceptions.TestCanceledException +import org.scalatest.{ Canceled, Outcome, Suite } + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.{ Actor, ActorRef, ActorSystem, Address, Deploy, PoisonPill, Props, RootActorPath } import pekko.cluster.ClusterEvent.{ MemberEvent, MemberRemoved } import pekko.event.Logging.ErrorLevel @@ -32,11 +38,6 @@ import pekko.serialization.jackson.CborSerializable import pekko.testkit._ import pekko.testkit.TestEvent._ -import org.scalatest.{ Canceled, Outcome, Suite } -import org.scalatest.exceptions.TestCanceledException - -import com.typesafe.config.{ Config, ConfigFactory } - object MultiNodeClusterSpec { def clusterConfigWithFailureDetectorPuppet: Config = diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeChurnSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeChurnSpec.scala index 6b5c83c31d0..615ee9252af 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeChurnSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeChurnSpec.scala @@ -17,6 +17,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.event.Logging.Info import pekko.remote.RARP @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ import pekko.testkit.TestKit -import com.typesafe.config.ConfigFactory - object NodeChurnMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeDowningAndBeingRemovedSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeDowningAndBeingRemovedSpec.scala index 061961a58f7..e4c5d68c1ba 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeDowningAndBeingRemovedSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeDowningAndBeingRemovedSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko -import pekko.remote.testkit.MultiNodeConfig -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.remote.testkit.MultiNodeConfig +import pekko.testkit._ + object NodeDowningAndBeingRemovedMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingAndBeingRemovedSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingAndBeingRemovedSpec.scala index 17c6751d2ae..3161b205337 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingAndBeingRemovedSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingAndBeingRemovedSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingSpec.scala index d6e4678944f..5af05354932 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeLeavingAndExitingSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Deploy import pekko.actor.Props diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeMembershipSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeMembershipSpec.scala index fbca908773f..d620ac1c186 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeMembershipSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeMembershipSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeUpSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeUpSpec.scala index 478a97fd14c..9550db20fc6 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeUpSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/NodeUpSpec.scala @@ -19,6 +19,7 @@ import scala.collection.immutable.SortedSet import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Props import pekko.remote.testkit.MultiNodeConfig diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/QuickRestartSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/QuickRestartSpec.scala index a3ef92b0407..fa5028f5ae7 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/QuickRestartSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/QuickRestartSpec.scala @@ -19,12 +19,13 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorSystem, Address } import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec } import pekko.testkit._ -import com.typesafe.config.ConfigFactory - // This test was a reproducer for issue #20639 object QuickRestartMultiJvmSpec extends MultiNodeConfig { val first = role("first") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RemoteFeaturesWithClusterSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RemoteFeaturesWithClusterSpec.scala index e5066528f12..0ae58636b15 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RemoteFeaturesWithClusterSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RemoteFeaturesWithClusterSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.cluster import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.AddressFromURIString @@ -28,10 +33,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit.ImplicitSender -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - class ClusterRemoteFeaturesConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartFirstSeedNodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartFirstSeedNodeSpec.scala index f503a1f6059..d88fb30da41 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartFirstSeedNodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartFirstSeedNodeSpec.scala @@ -17,6 +17,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorSystem import pekko.actor.Address @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RestartFirstSeedNodeMultiJvmSpec extends MultiNodeConfig { val seed1 = role("seed1") val seed2 = role("seed2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode2Spec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode2Spec.scala index 3f5a54d24ed..e4f5050dbc0 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode2Spec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode2Spec.scala @@ -17,6 +17,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorSystem import pekko.actor.Address @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RestartNode2SpecMultiJvmSpec extends MultiNodeConfig { val seed1 = role("seed1") val seed2 = role("seed2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode3Spec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode3Spec.scala index cd910f0e9c1..bcff3a870a4 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode3Spec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNode3Spec.scala @@ -17,6 +17,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorSystem import pekko.actor.Address @@ -29,8 +32,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RestartNode3MultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNodeSpec.scala index c8997547417..cec2b166774 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/RestartNodeSpec.scala @@ -17,6 +17,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.Actor import pekko.actor.ActorIdentity @@ -33,8 +36,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RestartNodeMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SharedMediaDriverSupport.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SharedMediaDriverSupport.scala index d4c89fa51af..4fc3a41a2c1 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SharedMediaDriverSupport.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SharedMediaDriverSupport.scala @@ -20,12 +20,15 @@ import java.util.function.Consumer import scala.annotation.tailrec import scala.util.control.NonFatal +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import io.aeron.CommonContext import io.aeron.driver.MediaDriver import io.aeron.driver.ThreadingMode import org.agrona.IoUtil -import org.apache.pekko import pekko.remote.RemoteSettings import pekko.remote.artery.ArterySettings import pekko.remote.artery.ArterySettings.AeronUpd @@ -33,8 +36,6 @@ import pekko.remote.artery.aeron.TaskRunner import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec -import com.typesafe.config.ConfigFactory - object SharedMediaDriverSupport { private val mediaDriver = new AtomicReference[Option[MediaDriver]](None) diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SingletonClusterSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SingletonClusterSpec.scala index 514a82ba750..706f765778c 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SingletonClusterSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SingletonClusterSpec.scala @@ -17,12 +17,13 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - final case class SingletonClusterMultiNodeConfig(failureDetectorPuppet: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainQuarantineSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainQuarantineSpec.scala index 8a83c680c5f..f9f6989a273 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainQuarantineSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainQuarantineSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.Identify import pekko.actor.RootActorPath @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter import pekko.testkit.LongRunningTest -import com.typesafe.config.ConfigFactory - object SplitBrainQuarantineSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainSpec.scala index 23daa5fe812..bc55e2911f2 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SplitBrainSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - final case class SplitBrainMultiNodeConfig(failureDetectorPuppet: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StreamRefSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StreamRefSpec.scala index 6037e8d0e65..70035cf517a 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StreamRefSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StreamRefSpec.scala @@ -20,6 +20,9 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.{ Actor, ActorIdentity, ActorLogging, ActorRef, Identify, Props } import pekko.remote.testkit.MultiNodeConfig @@ -37,8 +40,6 @@ import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object StreamRefSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StressSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StressSpec.scala index 85c787cfa3b..f869840320e 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StressSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/StressSpec.scala @@ -20,6 +20,12 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorLogging @@ -48,11 +54,6 @@ import pekko.testkit.TestEvent._ import pekko.util.Helpers.ConfigOps import pekko.util.Helpers.Requiring -import org.scalatest.BeforeAndAfterEach - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * This test is intended to be used as long running stress test * of cluster membership features. Number of nodes and duration of diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SunnyWeatherSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SunnyWeatherSpec.scala index 635fb3a0074..f2b60981d2e 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SunnyWeatherSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SunnyWeatherSpec.scala @@ -18,13 +18,14 @@ import java.util.concurrent.atomic.AtomicReference import scala.collection.immutable.SortedSet import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.Props import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object SunnyWeatherMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SurviveNetworkInstabilitySpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SurviveNetworkInstabilitySpec.scala index ef1d35c6054..36da0657e55 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SurviveNetworkInstabilitySpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SurviveNetworkInstabilitySpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Address @@ -32,8 +35,6 @@ import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.serialization.jackson.CborSerializable import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object SurviveNetworkInstabilityMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/TransitionSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/TransitionSpec.scala index eb5da1690ab..9993bafd4ad 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/TransitionSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/TransitionSpec.scala @@ -13,18 +13,18 @@ package org.apache.pekko.cluster +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import InternalClusterAction._ import MemberStatus._ import language.implicitConversions - -import org.apache.pekko import pekko.actor.Address import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object TransitionMultiJvmSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/UnreachableNodeJoinsAgainSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/UnreachableNodeJoinsAgainSpec.scala index f7935362380..7a251cb0c1a 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/UnreachableNodeJoinsAgainSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/UnreachableNodeJoinsAgainSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.ExtendedActorSystem import pekko.actor.Props @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object UnreachableNodeJoinsAgainMultiNodeConfig extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingGroupSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingGroupSpec.scala index 088a79b18d1..a261090bdc6 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingGroupSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingGroupSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.routing import scala.concurrent.Await import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Props } import pekko.cluster.MultiNodeClusterSpec import pekko.pattern.ask diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingRouterSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingRouterSpec.scala index ee1aa281f62..2df27961580 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingRouterSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterConsistentHashingRouterSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.routing import scala.concurrent.Await import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Address @@ -32,8 +35,6 @@ import pekko.routing.GetRoutees import pekko.routing.Routees import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterConsistentHashingRouterMultiJvmSpec extends MultiNodeConfig { class Echo extends Actor { diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterRoundRobinSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterRoundRobinSpec.scala index bc6288e3ef6..da3fb575c06 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterRoundRobinSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/ClusterRoundRobinSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Address @@ -35,8 +38,6 @@ import pekko.routing.RoutedActorRef import pekko.routing.Routees import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterRoundRobinMultiJvmSpec extends MultiNodeConfig { class SomeActor(routeeType: RouteeType) extends Actor { diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/UseRoleIgnoredSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/UseRoleIgnoredSpec.scala index 4f2e0dd1d2e..e40cac97515 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/UseRoleIgnoredSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/routing/UseRoleIgnoredSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.cluster.MultiNodeClusterSpec import pekko.pattern.ask @@ -29,8 +32,6 @@ import pekko.testkit._ import pekko.testkit.DefaultTimeout import pekko.testkit.ImplicitSender -import com.typesafe.config.ConfigFactory - object UseRoleIgnoredMultiJvmSpec extends MultiNodeConfig { class SomeActor(routeeType: RouteeType) extends Actor with ActorLogging { diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllIndirectlyConnected5NodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllIndirectlyConnected5NodeSpec.scala index 6933a74571c..89bb6bf4e47 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllIndirectlyConnected5NodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllIndirectlyConnected5NodeSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.sbr import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.MemberStatus import pekko.cluster.MultiNodeClusterSpec import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter -import com.typesafe.config.ConfigFactory - object DownAllIndirectlyConnected5NodeSpec extends MultiNodeConfig { val node1 = role("node1") val node2 = role("node2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllUnstable5NodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllUnstable5NodeSpec.scala index 4bc82800cc7..8307c34532f 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllUnstable5NodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/DownAllUnstable5NodeSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.sbr import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.MemberStatus import pekko.cluster.MultiNodeClusterSpec import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter -import com.typesafe.config.ConfigFactory - object DownAllUnstable5NodeSpec extends MultiNodeConfig { val node1 = role("node1") val node2 = role("node2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected3NodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected3NodeSpec.scala index 0e99cecaa25..3c7375420d6 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected3NodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected3NodeSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.sbr import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.MemberStatus import pekko.cluster.MultiNodeClusterSpec import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter -import com.typesafe.config.ConfigFactory - object IndirectlyConnected3NodeSpec extends MultiNodeConfig { val node1 = role("node1") val node2 = role("node2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected5NodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected5NodeSpec.scala index 6369e11f4dd..5cd7dbc7ff7 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected5NodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/IndirectlyConnected5NodeSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.cluster.sbr import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.MemberStatus import pekko.cluster.MultiNodeClusterSpec import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter -import com.typesafe.config.ConfigFactory - object IndirectlyConnected5NodeSpec extends MultiNodeConfig { val node1 = role("node1") val node2 = role("node2") diff --git a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/LeaseMajority5NodeSpec.scala b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/LeaseMajority5NodeSpec.scala index a06a205d2fb..699045e50fb 100644 --- a/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/LeaseMajority5NodeSpec.scala +++ b/cluster/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/LeaseMajority5NodeSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.MemberStatus import pekko.cluster.MultiNodeClusterSpec import pekko.coordination.lease.TestLease @@ -25,8 +28,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter -import com.typesafe.config.ConfigFactory - object LeaseMajority5NodeSpec extends MultiNodeConfig { val node1 = role("node1") val node2 = role("node2") diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterConfigSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterConfigSpec.scala index e19c65361c4..7eaea93e36d 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterConfigSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterConfigSpec.scala @@ -17,6 +17,9 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.dispatch.Dispatchers import pekko.remote.PhiAccrualFailureDetector @@ -24,8 +27,6 @@ import pekko.testkit.PekkoSpec import pekko.util.Helpers.ConfigOps import pekko.util.Version -import com.typesafe.config.ConfigFactory - @nowarn class ClusterConfigSpec extends PekkoSpec { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeathWatchNotificationSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeathWatchNotificationSpec.scala index 0d2b86f2e63..2b643cafb8b 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeathWatchNotificationSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeathWatchNotificationSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.artery.ArteryMultiNodeSpec import pekko.remote.artery.ArterySpecSupport import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ClusterDeathWatchNotificationSpec { val config = ConfigFactory.parseString(s""" diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeployerSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeployerSpec.scala index b86a4650a30..492a7ab4c1a 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeployerSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDeployerSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.cluster import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.cluster.routing.ClusterRouterGroup import pekko.cluster.routing.ClusterRouterGroupSettings @@ -22,8 +25,6 @@ import pekko.cluster.routing.ClusterRouterPoolSettings import pekko.routing._ import pekko.testkit._ -import com.typesafe.config._ - object ClusterDeployerSpec { val deployerConf = ConfigFactory.parseString( """ diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDomainEventPublisherSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDomainEventPublisherSpec.scala index ca3955727fa..c67224c00f0 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDomainEventPublisherSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterDomainEventPublisherSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster import scala.collection.immutable.SortedSet import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.actor.ActorRef import pekko.actor.Address import pekko.actor.PoisonPill @@ -29,8 +32,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import org.scalatest.BeforeAndAfterEach - object ClusterDomainEventPublisherSpec { val config = """ pekko.actor.provider = "cluster" diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatReceiverSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatReceiverSpec.scala index a11e28c10df..2fe5cc4fe2e 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatReceiverSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatReceiverSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.cluster.ClusterHeartbeatSender.{ Heartbeat, HeartbeatRsp } import pekko.testkit.{ ImplicitSender, PekkoSpec } diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderSpec.scala index c5c6b6ecb42..4e05e721da4 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.actor.{ ActorSelection, Address, Props } import pekko.cluster.ClusterEvent.{ CurrentClusterState, MemberUp } import pekko.cluster.ClusterHeartbeatSender.Heartbeat diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderStateSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderStateSpec.scala index 91b0fc1b7a4..8aa75c3044a 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderStateSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterHeartbeatSenderStateSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import java.util.concurrent.ThreadLocalRandom import org.apache.pekko -import pekko.actor.Address -import pekko.remote.DefaultFailureDetectorRegistry -import pekko.remote.FailureDetector import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.remote.DefaultFailureDetectorRegistry +import pekko.remote.FailureDetector + object ClusterHeartbeatSenderStateSpec { class FailureDetectorStub extends FailureDetector { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterLogSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterLogSpec.scala index 2c392814884..a961470cef4 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterLogSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterLogSpec.scala @@ -14,11 +14,12 @@ package org.apache.pekko.cluster import org.apache.pekko -import pekko.actor.{ Address, ExtendedActorSystem } -import pekko.testkit.{ EventFilter, ImplicitSender, PekkoSpec } import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.{ Address, ExtendedActorSystem } +import pekko.testkit.{ EventFilter, ImplicitSender, PekkoSpec } + object ClusterLogSpec { val config = """ pekko.cluster { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterSpec.scala index 7f67537809e..2cd1bef0f05 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterSpec.scala @@ -20,6 +20,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.Address import pekko.actor.CoordinatedShutdown @@ -37,8 +40,6 @@ import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe import pekko.util.Version -import com.typesafe.config.ConfigFactory - object ClusterSpec { val config = """ pekko.cluster { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterTestKit.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterTestKit.scala index 34c8ce7db20..ae6fcad23c0 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ClusterTestKit.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ClusterTestKit.scala @@ -17,11 +17,12 @@ import scala.concurrent.duration._ import scala.util.Random import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.{ PekkoSpec, TestKitBase } import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.ActorSystem +import pekko.testkit.{ PekkoSpec, TestKitBase } + /** * Builds on TestKitBase to provide some extra utilities to run cluster test. * diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ConfigUtilSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ConfigUtilSpec.scala index c756f458988..1e7060cad3e 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ConfigUtilSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ConfigUtilSpec.scala @@ -18,10 +18,11 @@ package org.apache.pekko.cluster import org.apache.pekko -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.testkit.PekkoSpec + class ConfigUtilSpec extends PekkoSpec { val pekkoSbrClass = "org.apache.pekko.cluster.sbr.SplitBrainResolverProvider" diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/CrossDcHeartbeatSenderSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/CrossDcHeartbeatSenderSpec.scala index 415ab838321..a5b8985bcd3 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/CrossDcHeartbeatSenderSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/CrossDcHeartbeatSenderSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.collection.immutable.SortedSet import org.apache.pekko + import pekko.actor.ActorSelection import pekko.actor.Address import pekko.actor.Props diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/DowningProviderSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/DowningProviderSpec.scala index 8bcdb142d61..04c45c3fee8 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/DowningProviderSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/DowningProviderSpec.scala @@ -20,17 +20,18 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko -import pekko.ConfigurationException -import pekko.actor.ActorSystem -import pekko.actor.Props -import pekko.testkit.TestKit.awaitCond -import pekko.testkit.TestKit.shutdownActorSystem import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.ConfigurationException +import pekko.actor.ActorSystem +import pekko.actor.Props +import pekko.testkit.TestKit.awaitCond +import pekko.testkit.TestKit.shutdownActorSystem + class FailingDowningProvider(@nowarn("msg=never used") system: ActorSystem) extends DowningProvider { override val downRemovalMargin: FiniteDuration = 20.seconds override def downingActorProps: Option[Props] = { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/FailureDetectorPuppet.scala b/cluster/src/test/scala/org/apache/pekko/cluster/FailureDetectorPuppet.scala index eb1eb1934b8..b443890ec62 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/FailureDetectorPuppet.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/FailureDetectorPuppet.scala @@ -18,11 +18,12 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.nowarn import org.apache.pekko -import pekko.event.EventStream -import pekko.remote.FailureDetector import com.typesafe.config.Config +import pekko.event.EventStream +import pekko.remote.FailureDetector + /** * User controllable "puppet" failure detector. */ diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/GossipSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/GossipSpec.scala index 7dd03d942c5..8002ddab3a0 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/GossipSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/GossipSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.collection.immutable.SortedSet import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.ClusterSettings.DefaultDataCenter -import pekko.cluster.Gossip.vclockName import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.ClusterSettings.DefaultDataCenter +import pekko.cluster.Gossip.vclockName + class GossipSpec extends AnyWordSpec with Matchers { import MemberStatus._ diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/GossipTargetSelectorSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/GossipTargetSelectorSpec.scala index 85ebf1210ee..b062831e984 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/GossipTargetSelectorSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/GossipTargetSelectorSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster import scala.collection.immutable.SortedSet import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.ClusterSettings.DataCenter -import pekko.cluster.MemberStatus.Up import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.ClusterSettings.DataCenter +import pekko.cluster.MemberStatus.Up + class GossipTargetSelectorSpec extends AnyWordSpec with Matchers { val aDc1 = TestMember(Address("pekko", "sys", "a", 7355), Up, Set.empty, dataCenter = "dc1") diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckClusterSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckClusterSpec.scala index 3c33283ec91..46de5cfb4d7 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckClusterSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckClusterSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.cluster import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.testkit.PekkoSpec import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import pekko.actor.ExtendedActorSystem +import pekko.testkit.PekkoSpec + class JoinConfigCompatCheckClusterSpec extends PekkoSpec { private val extSystem = system.asInstanceOf[ExtendedActorSystem] diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckerRollingUpdateSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckerRollingUpdateSpec.scala index 1338df82ae6..dab276fe2c0 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckerRollingUpdateSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/JoinConfigCompatCheckerRollingUpdateSpec.scala @@ -17,11 +17,12 @@ import scala.collection.{ immutable => im } import scala.concurrent.duration._ import org.apache.pekko -import pekko.testkit.GHExcludeAeronTest -import pekko.testkit.LongRunningTest import com.typesafe.config.{ Config, ConfigFactory } +import pekko.testkit.GHExcludeAeronTest +import pekko.testkit.LongRunningTest + object JoinConfigCompatCheckerRollingUpdateSpec { val baseConfig = ConfigFactory.parseString(s""" diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/MemberOrderingSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/MemberOrderingSpec.scala index ca370cf6d7a..07c65ffd7a5 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/MemberOrderingSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/MemberOrderingSpec.scala @@ -17,13 +17,14 @@ import scala.collection.immutable.SortedSet import scala.util.Random import org.apache.pekko -import pekko.actor.Address -import pekko.actor.AddressFromURIString -import pekko.util.Version import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.actor.AddressFromURIString +import pekko.util.Version + class MemberOrderingSpec extends AnyWordSpec with Matchers { import Member.addressOrdering import Member.ordering diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/MembershipStateSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/MembershipStateSpec.scala index 578fafecc99..b49866deed5 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/MembershipStateSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/MembershipStateSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.cluster import scala.collection.immutable.SortedSet import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.MemberStatus.Up import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.MemberStatus.Up + class MembershipStateSpec extends AnyWordSpec with Matchers { // DC-a is in reverse age order val a1 = TestMember(Address("pekko", "sys", "a4", 7355), Up, 1, "dc-a") diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/MixedProtocolClusterSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/MixedProtocolClusterSpec.scala index 8a69642f49f..a116a6321e1 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/MixedProtocolClusterSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/MixedProtocolClusterSpec.scala @@ -17,11 +17,13 @@ package org.apache.pekko.cluster +import scala.concurrent.duration._ + import org.apache.pekko -import pekko.testkit.{ LongRunningTest, PekkoSpec } import com.typesafe.config.{ Config, ConfigFactory } -import scala.concurrent.duration._ + +import pekko.testkit.{ LongRunningTest, PekkoSpec } object MixedProtocolClusterSpec { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ResetSystemMessageSeqNrSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ResetSystemMessageSeqNrSpec.scala index 6af93ebb932..2c2d1e5c2d8 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ResetSystemMessageSeqNrSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ResetSystemMessageSeqNrSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorIdentity import pekko.actor.Identify import pekko.actor.PoisonPill diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/ShutdownAfterJoinSeedNodesSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/ShutdownAfterJoinSeedNodesSpec.scala index e81b9ed452b..62434966d9b 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/ShutdownAfterJoinSeedNodesSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/ShutdownAfterJoinSeedNodesSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.Address import pekko.testkit._ diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/StartupWithOneThreadSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/StartupWithOneThreadSpec.scala index 06fad73a5a0..da3d97f69d3 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/StartupWithOneThreadSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/StartupWithOneThreadSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.Address diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/TestMember.scala b/cluster/src/test/scala/org/apache/pekko/cluster/TestMember.scala index 5ae4a40391e..af32d74ca49 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/TestMember.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/TestMember.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster import org.apache.pekko + import pekko.actor.Address import pekko.util.Version diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializerSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializerSpec.scala index 2e9f6952952..f8965099e52 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializerSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializerSpec.scala @@ -15,9 +15,11 @@ package org.apache.pekko.cluster.protobuf import scala.annotation.nowarn -import collection.immutable.SortedSet - import org.apache.pekko + +import com.typesafe.config.ConfigFactory + +import collection.immutable.SortedSet import pekko.actor.{ Address, ExtendedActorSystem } import pekko.cluster._ import pekko.cluster.InternalClusterAction.CompatibleConfig @@ -26,8 +28,6 @@ import pekko.routing.RoundRobinPool import pekko.testkit.PekkoSpec import pekko.util.Version -import com.typesafe.config.ConfigFactory - @nowarn class ClusterMessageSerializerSpec extends PekkoSpec("pekko.actor.provider = cluster") { diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/routing/ClusterRouterSupervisorSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/routing/ClusterRouterSupervisorSpec.scala index 52fcb0933e3..1e48cc2ed56 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/routing/ClusterRouterSupervisorSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/routing/ClusterRouterSupervisorSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.routing import org.apache.pekko + import pekko.actor._ import pekko.actor.OneForOneStrategy import pekko.routing.RoundRobinPool diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSpec.scala index 605a63c0ace..e5553d38777 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/sbr/SplitBrainResolverSpec.scala @@ -17,6 +17,11 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.Eventually + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.Address import pekko.actor.ExtendedActorSystem @@ -40,10 +45,6 @@ import pekko.coordination.lease.TimeoutSettings import pekko.testkit.EventFilter import pekko.testkit.PekkoSpec -import org.scalatest.concurrent.Eventually - -import com.typesafe.config.ConfigFactory - object SplitBrainResolverSpec { final case class DownCalled(address: Address) diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/sbr/TestAddresses.scala b/cluster/src/test/scala/org/apache/pekko/cluster/sbr/TestAddresses.scala index 1f71ed78fec..9c97a90f0c2 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/sbr/TestAddresses.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/sbr/TestAddresses.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.sbr import org.apache.pekko + import pekko.actor.Address import pekko.cluster.ClusterSettings import pekko.cluster.Member diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDown.scala b/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDown.scala index 80a25fea996..531ee421807 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDown.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDown.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorSystem diff --git a/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDownSpec.scala b/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDownSpec.scala index d8fd36f4241..24ff551ed3c 100644 --- a/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDownSpec.scala +++ b/cluster/src/test/scala/org/apache/pekko/cluster/testkit/AutoDownSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.testkit import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Address import pekko.actor.Props diff --git a/coordination/src/main/scala/org/apache/pekko/coordination/lease/LeaseUsageSettings.scala b/coordination/src/main/scala/org/apache/pekko/coordination/lease/LeaseUsageSettings.scala index 8fbae9a8eb6..ffcb2b5fb61 100644 --- a/coordination/src/main/scala/org/apache/pekko/coordination/lease/LeaseUsageSettings.scala +++ b/coordination/src/main/scala/org/apache/pekko/coordination/lease/LeaseUsageSettings.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.util.PrettyDuration._ final class LeaseUsageSettings private[pekko] (val leaseImplementation: String, diff --git a/coordination/src/main/scala/org/apache/pekko/coordination/lease/internal/LeaseAdapter.scala b/coordination/src/main/scala/org/apache/pekko/coordination/lease/internal/LeaseAdapter.scala index 56a2da803c8..cbd657fa64c 100644 --- a/coordination/src/main/scala/org/apache/pekko/coordination/lease/internal/LeaseAdapter.scala +++ b/coordination/src/main/scala/org/apache/pekko/coordination/lease/internal/LeaseAdapter.scala @@ -23,6 +23,7 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.coordination.lease.LeaseSettings import pekko.coordination.lease.javadsl.{ Lease => JavaLease } diff --git a/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/Lease.scala b/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/Lease.scala index 6665cb0f6eb..508c5472267 100644 --- a/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/Lease.scala +++ b/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/Lease.scala @@ -17,6 +17,7 @@ import java.util.Optional import java.util.concurrent.CompletionStage import org.apache.pekko + import pekko.coordination.lease.LeaseSettings abstract class Lease() { diff --git a/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/LeaseProvider.scala b/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/LeaseProvider.scala index 47e42fcfd89..106d6a4ea0f 100644 --- a/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/LeaseProvider.scala +++ b/coordination/src/main/scala/org/apache/pekko/coordination/lease/javadsl/LeaseProvider.scala @@ -16,6 +16,7 @@ package org.apache.pekko.coordination.lease.javadsl import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import pekko.actor.ClassicActorSystemProvider import pekko.coordination.lease.internal.LeaseAdapter diff --git a/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/Lease.scala b/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/Lease.scala index 7b382060ec3..7a29fec6db2 100644 --- a/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/Lease.scala +++ b/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/Lease.scala @@ -16,6 +16,7 @@ package org.apache.pekko.coordination.lease.scaladsl import scala.concurrent.Future import org.apache.pekko + import pekko.coordination.lease.LeaseSettings abstract class Lease(val settings: LeaseSettings) { diff --git a/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProvider.scala b/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProvider.scala index ddf770a7fbf..7b66a0eaaeb 100644 --- a/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProvider.scala +++ b/coordination/src/main/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProvider.scala @@ -21,6 +21,7 @@ import scala.reflect.ClassTag import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem diff --git a/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLease.scala b/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLease.scala index 71b218b696a..7edd3a64c2f 100644 --- a/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLease.scala +++ b/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLease.scala @@ -21,6 +21,9 @@ import scala.concurrent.Promise import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem @@ -31,8 +34,6 @@ import pekko.coordination.lease.scaladsl.Lease import pekko.event.Logging import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object TestLeaseExt extends ExtensionId[TestLeaseExt] with ExtensionIdProvider { override def get(system: ActorSystem): TestLeaseExt = super.get(system) override def get(system: ClassicActorSystemProvider): TestLeaseExt = super.get(system) diff --git a/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLeaseActor.scala b/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLeaseActor.scala index 9eda263a8c4..d92b1f4e285 100644 --- a/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLeaseActor.scala +++ b/coordination/src/test/scala/org/apache/pekko/coordination/lease/TestLeaseActor.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/coordination/src/test/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProviderSpec.scala b/coordination/src/test/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProviderSpec.scala index 2114e39a880..25ecea60920 100644 --- a/coordination/src/test/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProviderSpec.scala +++ b/coordination/src/test/scala/org/apache/pekko/coordination/lease/scaladsl/LeaseProviderSpec.scala @@ -17,12 +17,13 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ExtendedActorSystem import pekko.coordination.lease.LeaseSettings import pekko.testkit.{ EventFilter, PekkoSpec } -import com.typesafe.config.ConfigFactory - object LeaseProviderSpec { class LeaseA(settings: LeaseSettings) extends Lease(settings) { override def acquire(): Future[Boolean] = Future.successful(false) diff --git a/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala b/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala index bbe48f59b3b..8e2b74964c8 100644 --- a/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala +++ b/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala @@ -19,6 +19,7 @@ import java.util.function.{ Function => JFunction } import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalApi diff --git a/discovery/src/main/scala/org/apache/pekko/discovery/ServiceDiscovery.scala b/discovery/src/main/scala/org/apache/pekko/discovery/ServiceDiscovery.scala index a6eeda88305..df9234d293e 100644 --- a/discovery/src/main/scala/org/apache/pekko/discovery/ServiceDiscovery.scala +++ b/discovery/src/main/scala/org/apache/pekko/discovery/ServiceDiscovery.scala @@ -26,6 +26,7 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.actor.{ DeadLetterSuppression, NoSerializationVerificationNeeded } import pekko.util.HashCode diff --git a/discovery/src/main/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscovery.scala b/discovery/src/main/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscovery.scala index 011f38bb009..c51680fe052 100644 --- a/discovery/src/main/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscovery.scala +++ b/discovery/src/main/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscovery.scala @@ -19,6 +19,9 @@ import scala.jdk.CollectionConverters._ import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.discovery.{ Discovery, Lookup, ServiceDiscovery } @@ -28,8 +31,6 @@ import pekko.dispatch.MessageDispatcher import pekko.event.Logging import pekko.util.Helpers.Requiring -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/discovery/src/main/scala/org/apache/pekko/discovery/config/ConfigServiceDiscovery.scala b/discovery/src/main/scala/org/apache/pekko/discovery/config/ConfigServiceDiscovery.scala index 0c67c167a41..753aca97cc8 100644 --- a/discovery/src/main/scala/org/apache/pekko/discovery/config/ConfigServiceDiscovery.scala +++ b/discovery/src/main/scala/org/apache/pekko/discovery/config/ConfigServiceDiscovery.scala @@ -18,14 +18,15 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigUtil } + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.discovery.{ Lookup, ServiceDiscovery } import pekko.discovery.ServiceDiscovery.{ Resolved, ResolvedTarget } import pekko.event.Logging -import com.typesafe.config.{ Config, ConfigUtil } - /** * INTERNAL API */ diff --git a/discovery/src/main/scala/org/apache/pekko/discovery/dns/DnsServiceDiscovery.scala b/discovery/src/main/scala/org/apache/pekko/discovery/dns/DnsServiceDiscovery.scala index 77823417cbb..1428c3badbb 100644 --- a/discovery/src/main/scala/org/apache/pekko/discovery/dns/DnsServiceDiscovery.scala +++ b/discovery/src/main/scala/org/apache/pekko/discovery/dns/DnsServiceDiscovery.scala @@ -17,12 +17,13 @@ import java.net.InetAddress import scala.collection.{ immutable => im } import scala.concurrent.Future -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi diff --git a/discovery/src/test/scala/org/apache/pekko/discovery/DiscoveryConfigurationSpec.scala b/discovery/src/test/scala/org/apache/pekko/discovery/DiscoveryConfigurationSpec.scala index 7cedaf46bf9..de5f27a0773 100644 --- a/discovery/src/test/scala/org/apache/pekko/discovery/DiscoveryConfigurationSpec.scala +++ b/discovery/src/test/scala/org/apache/pekko/discovery/DiscoveryConfigurationSpec.scala @@ -17,15 +17,16 @@ import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.discovery.ServiceDiscovery.Resolved -import pekko.testkit.TestKit import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ActorSystem +import pekko.discovery.ServiceDiscovery.Resolved +import pekko.testkit.TestKit + class DiscoveryConfigurationSpec extends AnyWordSpec with Matchers { "ServiceDiscovery" should { diff --git a/discovery/src/test/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscoverySpec.scala b/discovery/src/test/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscoverySpec.scala index 43fd74ab817..a72f5d45662 100644 --- a/discovery/src/test/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscoverySpec.scala +++ b/discovery/src/test/scala/org/apache/pekko/discovery/aggregate/AggregateServiceDiscoverySpec.scala @@ -19,10 +19,6 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.{ ActorSystem, ExtendedActorSystem } -import pekko.discovery.{ Discovery, Lookup, ServiceDiscovery } -import pekko.discovery.ServiceDiscovery.{ Resolved, ResolvedTarget } -import pekko.testkit.TestKit import org.scalatest.BeforeAndAfterAll import org.scalatest.concurrent.ScalaFutures @@ -31,6 +27,11 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.{ ActorSystem, ExtendedActorSystem } +import pekko.discovery.{ Discovery, Lookup, ServiceDiscovery } +import pekko.discovery.ServiceDiscovery.{ Resolved, ResolvedTarget } +import pekko.testkit.TestKit + class StubbedServiceDiscovery(@nowarn("msg=never used") system: ExtendedActorSystem) extends ServiceDiscovery { override def lookup(query: Lookup, resolveTimeout: FiniteDuration): Future[Resolved] = { diff --git a/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServiceDiscoverySpec.scala b/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServiceDiscoverySpec.scala index 7a462f6f6a7..a49dc4e1d75 100644 --- a/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServiceDiscoverySpec.scala +++ b/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServiceDiscoverySpec.scala @@ -17,10 +17,6 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.discovery.Discovery -import pekko.discovery.ServiceDiscovery.ResolvedTarget -import pekko.testkit.TestKit import org.scalatest.BeforeAndAfterAll import org.scalatest.concurrent.ScalaFutures @@ -29,6 +25,11 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.ActorSystem +import pekko.discovery.Discovery +import pekko.discovery.ServiceDiscovery.ResolvedTarget +import pekko.testkit.TestKit + object ConfigServiceDiscoverySpec { val config: Config = ConfigFactory.parseString(""" diff --git a/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServicesParserSpec.scala b/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServicesParserSpec.scala index 9a32594fdf3..79784ac3480 100644 --- a/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServicesParserSpec.scala +++ b/discovery/src/test/scala/org/apache/pekko/discovery/config/ConfigServicesParserSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.discovery.config import scala.collection.immutable import org.apache.pekko -import pekko.discovery.ServiceDiscovery.{ Resolved, ResolvedTarget } -import pekko.discovery.config.ConfigServicesParserSpec._ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.{ Config, ConfigFactory } +import pekko.discovery.ServiceDiscovery.{ Resolved, ResolvedTarget } +import pekko.discovery.config.ConfigServicesParserSpec._ + object ConfigServicesParserSpec { val exampleConfig: Config = ConfigFactory.parseString(""" services { diff --git a/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsDiscoverySpec.scala b/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsDiscoverySpec.scala index 75f22052309..8e7b6014033 100644 --- a/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsDiscoverySpec.scala +++ b/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsDiscoverySpec.scala @@ -18,6 +18,9 @@ import java.net.InetAddress import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.discovery.{ Discovery, Lookup } import pekko.discovery.ServiceDiscovery @@ -25,8 +28,6 @@ import pekko.discovery.ServiceDiscovery.ResolvedTarget import pekko.io.dns.DockerBindDnsService import pekko.testkit.{ SocketUtil, TestKit } -import com.typesafe.config.ConfigFactory - object DnsDiscoverySpec { val config = ConfigFactory.parseString(s""" diff --git a/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsServiceDiscoverySpec.scala b/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsServiceDiscoverySpec.scala index d5a1c0e2159..aa99e735cb4 100644 --- a/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsServiceDiscoverySpec.scala +++ b/discovery/src/test/scala/org/apache/pekko/discovery/dns/DnsServiceDiscoverySpec.scala @@ -19,6 +19,11 @@ import scala.collection.{ immutable => im } import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.ActorRef import pekko.actor.ExtendedActorSystem import pekko.discovery @@ -30,10 +35,6 @@ import pekko.io.dns.CachePolicy.Ttl import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - class DnsServiceDiscoverySpec extends PekkoSpec with AnyWordSpecLike with Matchers with ScalaFutures { "DnsServiceDiscovery" must { diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelector.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelector.scala index 89083fcbe10..f4b6a2d26e3 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelector.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelector.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata import scala.collection.immutable.TreeMap import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.cluster.ddata.Key.KeyId diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DistributedData.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DistributedData.scala index 4e5f3dd540c..603c9e952ca 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DistributedData.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DistributedData.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DurableStore.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DurableStore.scala index 40cf63a3597..aa3c5a08732 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DurableStore.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DurableStore.scala @@ -22,13 +22,16 @@ import scala.jdk.CollectionConverters._ import scala.util.Try import scala.util.control.NonFatal +import org.apache.pekko + +import com.typesafe.config.Config + import org.lmdbjava.Dbi import org.lmdbjava.DbiFlags import org.lmdbjava.Env import org.lmdbjava.EnvFlags import org.lmdbjava.Txn -import org.apache.pekko import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef @@ -45,8 +48,6 @@ import pekko.util.ByteString import pekko.util.OptionVal import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - /** * An actor implementing the durable store for the Distributed Data `Replicator` * has to implement the protocol with the messages defined here. diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala index eb7d229b1f8..8fe9a78dcab 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata import java.math.BigInteger import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala index b95439beab6..5f9b384f123 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORMap.ZeroTag diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala index d9f4b341aed..2b827a6ba61 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.util.HashCode diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala index db9a5e4499c..675e70e3807 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORMap.ZeroTag diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala index 9068ee4249f..f8d77f85e7b 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORMap._ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala index 37510f72673..4d35b5b0882 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala @@ -36,6 +36,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.util.HashCode diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala index 8873db8e624..87f8f1f5851 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata import java.math.BigInteger import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress import pekko.util.HashCode diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala index 7293264ceaa..3d6805c514c 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata import java.math.BigInteger import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.Cluster import pekko.cluster.UniqueAddress diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PayloadSizeAggregator.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PayloadSizeAggregator.scala index f548e45272c..0fe93ae1a39 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PayloadSizeAggregator.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PayloadSizeAggregator.scala @@ -14,6 +14,7 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.ddata.Key.KeyId import pekko.event.LoggingAdapter diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PruningState.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PruningState.scala index 36300b0d14e..5930c034317 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PruningState.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PruningState.scala @@ -16,6 +16,7 @@ package org.apache.pekko.cluster.ddata import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.Address import pekko.annotation.InternalApi import pekko.cluster.Member diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ReplicatedData.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ReplicatedData.scala index 5fa1c9e2d28..d7501d1e51f 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ReplicatedData.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ReplicatedData.scala @@ -18,6 +18,7 @@ import java.util.Optional import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.cluster.UniqueAddress /** diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala index 45f80f152c9..1d5b7952dd1 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala @@ -14,18 +14,18 @@ package org.apache.pekko.cluster.ddata import java.security.MessageDigest -import java.util.{ Locale, Optional } import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.TimeUnit import java.util.function.{ Function => JFunction } +import java.util.{ Locale, Optional } import scala.annotation.nowarn import scala.annotation.varargs import scala.collection.immutable import scala.collection.immutable.TreeSet import scala.collection.mutable -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import scala.util.Failure import scala.util.Success @@ -34,6 +34,9 @@ import scala.util.control.NoStackTrace import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Actor import pekko.actor.ActorInitializationException import pekko.actor.ActorLogging @@ -68,8 +71,6 @@ import pekko.serialization.SerializationExtension import pekko.util.ByteString import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - object ReplicatorSettings { /** diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala index ce6e47c8c36..7102f3feda3 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.collection.immutable.TreeMap import org.apache.pekko + import pekko.annotation.InternalApi import pekko.cluster.UniqueAddress diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala index 39619435ed2..5bc0a73289f 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala @@ -13,12 +13,12 @@ package org.apache.pekko.cluster.ddata.protobuf -import java.{ lang => jl } import java.io.NotSerializableException import java.util import java.util.ArrayList import java.util.Collections import java.util.Comparator +import java.{ lang => jl } import scala.annotation.nowarn import scala.annotation.tailrec @@ -26,6 +26,7 @@ import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ExtendedActorSystem import pekko.cluster.ddata._ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala index 0840b6ad0b3..a1edbbf1b86 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala @@ -19,12 +19,13 @@ import java.util.concurrent.atomic.AtomicInteger import scala.annotation.tailrec import scala.collection.immutable -import scala.concurrent.duration._ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.Address import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala index b14cf6eb2de..b9e65f50ee8 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala @@ -21,6 +21,7 @@ import scala.collection.immutable.TreeMap import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Address import pekko.actor.ExtendedActorSystem diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurableDataSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurableDataSpec.scala index e051f785ed8..d6b424f470e 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurableDataSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurableDataSpec.scala @@ -18,6 +18,11 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.CancelAfterFailure + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSystem @@ -28,10 +33,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import org.scalatest.CancelAfterFailure - -import com.typesafe.config.ConfigFactory - final case class DurableDataSpecConfig(writeBehind: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurablePruningSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurablePruningSpec.scala index 8a3da0184e3..631cf184632 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurablePruningSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/DurablePruningSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.ddata import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.cluster.Cluster @@ -25,8 +28,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object DurablePruningSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/JepsenInspiredInsertSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/JepsenInspiredInsertSpec.scala index d2cd97926ee..ba74000e66c 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/JepsenInspiredInsertSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/JepsenInspiredInsertSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.ThreadLocalRandom import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig @@ -25,8 +28,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object JepsenInspiredInsertSpec extends MultiNodeConfig { val controller = role("controller") val n1 = role("n1") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/PerformanceSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/PerformanceSpec.scala index b36bc121343..9f71c1abcd9 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/PerformanceSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/PerformanceSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Deploy @@ -27,8 +30,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object PerformanceSpec extends MultiNodeConfig { val n1 = role("n1") val n2 = role("n2") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorChaosSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorChaosSpec.scala index 64a5185c6cd..d9144b0b25f 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorChaosSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorChaosSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.ddata import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig @@ -23,8 +26,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ReplicatorChaosSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorDeltaSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorDeltaSpec.scala index c488c38e80a..085cb99c7f4 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorDeltaSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorDeltaSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.ThreadLocalRandom import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.ddata.Replicator._ import pekko.remote.testconductor.RoleName @@ -26,8 +29,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.serialization.jackson.CborSerializable import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ReplicatorDeltaSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorGossipSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorGossipSpec.scala index 50d4d885580..fd946ebab11 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorGossipSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorGossipSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.duration._ import scala.util.Random import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Dropped import pekko.cluster.Cluster import pekko.remote.testconductor.RoleName @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ReplicatorGossipSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorMapDeltaSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorMapDeltaSpec.scala index 061c5a4f3a5..03bea97a3b0 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorMapDeltaSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorMapDeltaSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.ThreadLocalRandom import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.ddata.Replicator._ import pekko.event.Logging.Error @@ -26,8 +29,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ReplicatorMapDeltaSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorORSetDeltaSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorORSetDeltaSpec.scala index bdb7a59db2a..b9f5b703cea 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorORSetDeltaSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorORSetDeltaSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.ddata import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig @@ -23,8 +26,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ReplicatorORSetDeltaSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorPruningSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorPruningSpec.scala index 477ce85b431..cef7b969f94 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorPruningSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorPruningSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.cluster.ddata import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.cluster.ClusterEvent.InitialStateAsEvents import pekko.cluster.ClusterEvent.MemberUp @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.MultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object ReplicatorPruningSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorSpec.scala b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorSpec.scala index d6dbb5b3816..691639598cb 100644 --- a/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorSpec.scala +++ b/distributed-data/src/multi-jvm/scala/org/apache/pekko/cluster/ddata/ReplicatorSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.cluster.Cluster import pekko.pattern.ask import pekko.remote.testconductor.RoleName @@ -26,8 +29,6 @@ import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ import pekko.util.Timeout -import com.typesafe.config.ConfigFactory - object ReplicatorSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DataEnvelopeSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DataEnvelopeSpec.scala index 7879ee501c5..c03b82e8dc7 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DataEnvelopeSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DataEnvelopeSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Internal.DataEnvelope import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Internal.DataEnvelope + class DataEnvelopeSpec extends AnyWordSpec with Matchers { import PruningState._ diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelectorSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelectorSpec.scala index c3afff16617..74cfa939341 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelectorSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelectorSpec.scala @@ -13,9 +13,13 @@ package org.apache.pekko.cluster.ddata +import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import org.scalactic.TypeCheckedTripleEquals -import org.apache.pekko import pekko.actor.Address import pekko.cluster.UniqueAddress import pekko.cluster.ddata.Key.KeyId @@ -24,9 +28,6 @@ import pekko.cluster.ddata.Replicator.Internal.Delta import pekko.cluster.ddata.Replicator.Internal.DeltaPropagation import pekko.cluster.ddata.Replicator.Internal.DeltaPropagation.NoDeltaPlaceholder -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - object DeltaPropagationSelectorSpec { class TestSelector(val selfUniqueAddress: UniqueAddress, override val allNodes: Vector[UniqueAddress]) extends DeltaPropagationSelector { diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/GCounterSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/GCounterSpec.scala index 398dcb76ad1..9fa59a99ddd 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/GCounterSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/GCounterSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class GCounterSpec extends AnyWordSpec with Matchers { val node1 = UniqueAddress(Address("pekko", "Sys", "localhost", 7354), 1L) val node2 = UniqueAddress(node1.address.copy(port = Some(7355)), 2L) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWMapSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWMapSpec.scala index 7e5fc41eb75..5417e4c1c22 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWMapSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWMapSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class LWWMapSpec extends AnyWordSpec with Matchers { import LWWRegister.defaultClock diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWRegisterSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWRegisterSpec.scala index d75e4377f98..67164ac45dd 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWRegisterSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LWWRegisterSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class LWWRegisterSpec extends AnyWordSpec with Matchers { import LWWRegister.defaultClock diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LocalConcurrencySpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LocalConcurrencySpec.scala index 15803d8b2e1..88da11862e4 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LocalConcurrencySpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LocalConcurrencySpec.scala @@ -14,12 +14,6 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Actor -import pekko.actor.ActorSystem -import pekko.actor.Props -import pekko.actor.Stash -import pekko.testkit.ImplicitSender -import pekko.testkit.TestKit import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -27,6 +21,13 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor.Actor +import pekko.actor.ActorSystem +import pekko.actor.Props +import pekko.actor.Stash +import pekko.testkit.ImplicitSender +import pekko.testkit.TestKit + object LocalConcurrencySpec { final case class Add(s: String) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LotsOfDataBot.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LotsOfDataBot.scala index c88fd80f14c..b87933ed1df 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LotsOfDataBot.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/LotsOfDataBot.scala @@ -18,13 +18,14 @@ import java.util.concurrent.ThreadLocalRandom import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorSystem import pekko.actor.Props -import com.typesafe.config.ConfigFactory - /** * This "sample" simulates lots of data entries, and can be used for * optimizing replication (e.g. catch-up when adding more nodes). diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMapSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMapSpec.scala index 152840c726b..0c387912197 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMapSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMapSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.Address import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORSet.AddDeltaOp import pekko.cluster.ddata.Replicator.Changed -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class ORMapSpec extends AnyWordSpec with Matchers { val node1 = UniqueAddress(Address("pekko", "Sys", "localhost", 7354), 1L) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMultiMapSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMultiMapSpec.scala index e8c8b343b6f..01a35ce8990 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMultiMapSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORMultiMapSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class ORMultiMapSpec extends AnyWordSpec with Matchers { val node1 = UniqueAddress(Address("pekko", "Sys", "localhost", 7354), 1L) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORSetSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORSetSpec.scala index d56f02db717..d4825f18b8f 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORSetSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ORSetSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.cluster.ddata import scala.collection.immutable.TreeMap import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class ORSetSpec extends AnyWordSpec with Matchers { val node1 = UniqueAddress(Address("pekko", "Sys", "localhost", 7354), 1L) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterMapSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterMapSpec.scala index 57ad7fde6a4..9b719ece146 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterMapSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterMapSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class PNCounterMapSpec extends AnyWordSpec with Matchers { val node1 = UniqueAddress(Address("pekko", "Sys", "localhost", 7354), 1L) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterSpec.scala index f46ddd3e3ca..68036cfb537 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PNCounterSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.cluster.ddata.Replicator.Changed import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.cluster.ddata.Replicator.Changed + class PNCounterSpec extends AnyWordSpec with Matchers { val node1 = UniqueAddress(Address("pekko", "Sys", "localhost", 7354), 1L) val node2 = UniqueAddress(node1.address.copy(port = Some(7355)), 2L) diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PruningStateSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PruningStateSpec.scala index be3b714d5d1..1d2d7174346 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PruningStateSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/PruningStateSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.Address -import pekko.cluster.UniqueAddress import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import pekko.actor.Address +import pekko.cluster.UniqueAddress + class PruningStateSpec extends AnyWordSpec with Matchers { import PruningState._ diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ReplicatorWildcardSubscriptionSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ReplicatorWildcardSubscriptionSpec.scala index 2c87aaacc8e..14ee18885a7 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ReplicatorWildcardSubscriptionSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/ReplicatorWildcardSubscriptionSpec.scala @@ -16,11 +16,6 @@ package org.apache.pekko.cluster.ddata import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.cluster.ddata.Replicator._ -import pekko.testkit.ImplicitSender -import pekko.testkit.TestKit -import pekko.testkit.TestProbe import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -28,6 +23,12 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor.ActorSystem +import pekko.cluster.ddata.Replicator._ +import pekko.testkit.ImplicitSender +import pekko.testkit.TestKit +import pekko.testkit.TestProbe + object ReplicatorWildcardSubscriptionSpec { val config = ConfigFactory.parseString(""" pekko.actor.provider = "cluster" diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/VersionVectorSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/VersionVectorSpec.scala index c8c726979ca..ebca9baa0e1 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/VersionVectorSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/VersionVectorSpec.scala @@ -14,15 +14,16 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.actor.Address -import pekko.cluster.UniqueAddress -import pekko.testkit.TestKit import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike +import pekko.actor.ActorSystem +import pekko.actor.Address +import pekko.cluster.UniqueAddress +import pekko.testkit.TestKit + class VersionVectorSpec extends TestKit(ActorSystem("VersionVectorSpec")) with AnyWordSpecLike diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/WriteAggregatorSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/WriteAggregatorSpec.scala index 1ee5cf7f6e0..bff8ee0825e 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/WriteAggregatorSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/WriteAggregatorSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorSelection diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializerSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializerSpec.scala index 3c9043c8b0a..4b99022dd09 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializerSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializerSpec.scala @@ -14,6 +14,13 @@ package org.apache.pekko.cluster.ddata.protobuf import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorIdentity import pekko.actor.ActorRef import pekko.actor.ActorSystem @@ -30,12 +37,6 @@ import pekko.remote.RARP import pekko.testkit.TestActors import pekko.testkit.TestKit -import org.scalatest.BeforeAndAfterAll -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - class ReplicatedDataSerializerSpec extends TestKit( ActorSystem( diff --git a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializerSpec.scala b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializerSpec.scala index 6f7c24e0e50..3d0d7b45b15 100644 --- a/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializerSpec.scala +++ b/distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializerSpec.scala @@ -17,6 +17,13 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.Address import pekko.actor.ExtendedActorSystem @@ -37,12 +44,6 @@ import pekko.remote.RARP import pekko.testkit.TestKit import pekko.util.ByteString -import org.scalatest.BeforeAndAfterAll -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - class ReplicatorMessageSerializerSpec extends TestKit( ActorSystem( diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala index a29af4ae9e8..2ebad8f2ce4 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala @@ -23,9 +23,12 @@ import scala.concurrent.duration._ import scala.reflect.classTag import scala.util.control.NoStackTrace -import RemoteConnection.getAddrString - import org.apache.pekko + +import io.netty.channel.ChannelHandler.Sharable +import io.netty.channel.{ Channel, ChannelHandlerContext, ChannelInboundHandlerAdapter } + +import RemoteConnection.getAddrString import pekko.ConfigurationException import pekko.PekkoException import pekko.actor.{ @@ -47,9 +50,6 @@ import pekko.pattern.ask import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.util.Timeout -import io.netty.channel.{ Channel, ChannelHandlerContext, ChannelInboundHandlerAdapter } -import io.netty.channel.ChannelHandler.Sharable - /** * The conductor is the one orchestrating the test: it governs the * `Controller`’s port to which all diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala index ae2d0a38adf..28ade4e3ec5 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala @@ -15,17 +15,17 @@ package org.apache.pekko.remote.testconductor import scala.concurrent.duration._ -import language.implicitConversions - import org.apache.pekko + +import io.netty.channel.ChannelHandlerContext +import io.netty.handler.codec.{ MessageToMessageDecoder, MessageToMessageEncoder } + +import language.implicitConversions import pekko.actor.Address import pekko.remote.testconductor.{ TestConductorProtocol => TCP } import pekko.remote.testconductor.TestConductorProtocol.BarrierOp import pekko.remote.transport.ThrottlerTransportAdapter.Direction -import io.netty.channel.ChannelHandlerContext -import io.netty.handler.codec.{ MessageToMessageDecoder, MessageToMessageEncoder } - final case class RoleName(name: String) private[pekko] final case class ToClient(msg: ClientOp with NetworkOp) diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Extension.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Extension.scala index 9fead03ea59..3b4948304c4 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Extension.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Extension.scala @@ -14,14 +14,15 @@ package org.apache.pekko.remote.testconductor import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ ActorContext, ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import pekko.actor.ClassicActorSystemProvider import pekko.dispatch.ThreadPoolConfig import pekko.remote.RemoteActorRefProvider import pekko.util.Timeout -import com.typesafe.config.Config - /** * Access to the [[pekko.remote.testconductor.TestConductorExt]] extension: * diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala index 7645c56e9d4..10090ae1b85 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala @@ -19,25 +19,26 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.nowarn import scala.collection.immutable -import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future } import scala.reflect.classTag -import scala.util.{ Failure, Success, Try } import scala.util.control.NoStackTrace import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + +import io.netty.channel.ChannelHandler.Sharable +import io.netty.channel.{ Channel, ChannelHandlerContext, ChannelInboundHandlerAdapter } + import pekko.actor._ import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.event.{ Logging, LoggingAdapter } -import pekko.pattern.{ ask, AskTimeoutException } +import pekko.pattern.{ AskTimeoutException, ask } import pekko.remote.testconductor.RemoteConnection.getAddrString import pekko.remote.transport.ThrottlerTransportAdapter.{ Blackhole, SetThrottle, TokenBucket, Unthrottled } import pekko.util.Timeout -import io.netty.channel.{ Channel, ChannelHandlerContext, ChannelInboundHandlerAdapter } -import io.netty.channel.ChannelHandler.Sharable - object Player { final class Waiter extends Actor with RequiresMessageQueue[UnboundedMessageQueueSemantics] { diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/RemoteConnection.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/RemoteConnection.scala index ae9504934bd..9908acf5e44 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/RemoteConnection.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/RemoteConnection.scala @@ -19,13 +19,11 @@ import java.util.concurrent.TimeUnit import scala.util.control.NonFatal import org.apache.pekko -import pekko.protobufv3.internal.Message -import pekko.util.Helpers import io.netty.bootstrap.{ Bootstrap, ServerBootstrap } import io.netty.buffer.{ ByteBuf, ByteBufUtil } -import io.netty.channel._ import io.netty.channel.ChannelHandler.Sharable +import io.netty.channel._ import io.netty.channel.nio.NioIoHandler import io.netty.channel.socket.SocketChannel import io.netty.channel.socket.nio.{ NioServerSocketChannel, NioSocketChannel } @@ -36,6 +34,9 @@ import io.netty.handler.codec.{ MessageToMessageEncoder } +import pekko.protobufv3.internal.Message +import pekko.util.Helpers + /** * INTERNAL API. */ diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/MultiNodeSpec.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/MultiNodeSpec.scala index cb14584c5e0..a0ef6383881 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/MultiNodeSpec.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/MultiNodeSpec.scala @@ -16,13 +16,17 @@ package org.apache.pekko.remote.testkit import java.net.{ InetAddress, InetSocketAddress } import scala.collection.immutable -import scala.concurrent.{ Await, Awaitable } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Awaitable } import scala.util.control.NonFatal -import language.implicitConversions - import org.apache.pekko + +import io.netty.channel.ChannelException + +import com.typesafe.config.{ Config, ConfigFactory, ConfigObject } + +import language.implicitConversions import pekko.actor._ import pekko.actor.RootActorPath import pekko.event.{ Logging, LoggingAdapter } @@ -34,10 +38,6 @@ import pekko.testkit.TestEvent._ import pekko.testkit.TestKit import pekko.util.Timeout -import io.netty.channel.ChannelException - -import com.typesafe.config.{ Config, ConfigFactory, ConfigObject } - /** * Configure the role names and participants of the test, including configuration settings. */ diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/PerfFlamesSupport.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/PerfFlamesSupport.scala index 1154263c1c1..e1e01bcefd6 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/PerfFlamesSupport.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testkit/PerfFlamesSupport.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.remote.testconductor.RoleName /** diff --git a/osgi/src/main/scala/org/apache/pekko/osgi/ActorSystemActivator.scala b/osgi/src/main/scala/org/apache/pekko/osgi/ActorSystemActivator.scala index d246a8bfe6a..9bbf4394b86 100644 --- a/osgi/src/main/scala/org/apache/pekko/osgi/ActorSystemActivator.scala +++ b/osgi/src/main/scala/org/apache/pekko/osgi/ActorSystemActivator.scala @@ -17,14 +17,15 @@ import java.util.{ Dictionary, Properties } import scala.annotation.nowarn +import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import org.osgi.framework._ import org.osgi.service.log.LogService -import org.apache.pekko import pekko.actor.{ ActorRefFactory, ActorSystem } -import com.typesafe.config.{ Config, ConfigFactory } - /** * Abstract bundle activator implementation to bootstrap and configure an actor system in an * OSGi environment. It also provides a convenience method to register the actor system in diff --git a/osgi/src/main/scala/org/apache/pekko/osgi/BundleDelegatingClassLoader.scala b/osgi/src/main/scala/org/apache/pekko/osgi/BundleDelegatingClassLoader.scala index baf32fef869..bb3bda78f21 100644 --- a/osgi/src/main/scala/org/apache/pekko/osgi/BundleDelegatingClassLoader.scala +++ b/osgi/src/main/scala/org/apache/pekko/osgi/BundleDelegatingClassLoader.scala @@ -22,8 +22,8 @@ import scala.util.Failure import scala.util.Success import scala.util.Try -import org.osgi.framework.{ Bundle, BundleContext } import org.osgi.framework.wiring.{ BundleRevision, BundleWire, BundleWiring } +import org.osgi.framework.{ Bundle, BundleContext } /* * Companion object to create bundle delegating ClassLoader instances diff --git a/osgi/src/main/scala/org/apache/pekko/osgi/DefaultOSGiLogger.scala b/osgi/src/main/scala/org/apache/pekko/osgi/DefaultOSGiLogger.scala index 2c96fb71a33..cf07fabbba6 100644 --- a/osgi/src/main/scala/org/apache/pekko/osgi/DefaultOSGiLogger.scala +++ b/osgi/src/main/scala/org/apache/pekko/osgi/DefaultOSGiLogger.scala @@ -13,9 +13,10 @@ package org.apache.pekko.osgi +import org.apache.pekko + import org.osgi.service.log.LogService -import org.apache.pekko import pekko.event.Logging import pekko.event.Logging.{ DefaultLogger, LogEvent } import pekko.event.Logging.Error.NoCause diff --git a/osgi/src/main/scala/org/apache/pekko/osgi/OsgiActorSystemFactory.scala b/osgi/src/main/scala/org/apache/pekko/osgi/OsgiActorSystemFactory.scala index 475be03f127..9dbbfcdcbaf 100644 --- a/osgi/src/main/scala/org/apache/pekko/osgi/OsgiActorSystemFactory.scala +++ b/osgi/src/main/scala/org/apache/pekko/osgi/OsgiActorSystemFactory.scala @@ -15,13 +15,14 @@ package org.apache.pekko.osgi import scala.annotation.nowarn -import org.osgi.framework.BundleContext - import org.apache.pekko -import pekko.actor.ActorSystem import com.typesafe.config.{ Config, ConfigFactory } +import org.osgi.framework.BundleContext + +import pekko.actor.ActorSystem + /** * Factory class to create ActorSystem implementations in an OSGi environment. This mainly involves dealing with * bundle classloaders appropriately to ensure that configuration files and classes get loaded properly diff --git a/osgi/src/test/scala/org/apache/pekko/osgi/ActorSystemActivatorTest.scala b/osgi/src/test/scala/org/apache/pekko/osgi/ActorSystemActivatorTest.scala index 9ea5d3f924b..6c4e7f46a30 100644 --- a/osgi/src/test/scala/org/apache/pekko/osgi/ActorSystemActivatorTest.scala +++ b/osgi/src/test/scala/org/apache/pekko/osgi/ActorSystemActivatorTest.scala @@ -17,19 +17,20 @@ import scala.collection.immutable import scala.concurrent.Await import scala.concurrent.duration._ -import PojoSRTestSupport.bundle +import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import de.kalpatec.pojosr.framework.launch.BundleDescriptor + +import PojoSRTestSupport.bundle import test.{ PingPongActorSystemActivator, RuntimeNameActorSystemActivator, TestActivators } import test.PingPong._ - -import org.apache.pekko import pekko.actor.ActorSystem import pekko.pattern.ask import pekko.util.Timeout -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - /** * Test cases for [[pekko.osgi.ActorSystemActivator]] in 2 different scenarios: * - no name configured for [[pekko.actor.ActorSystem]] diff --git a/osgi/src/test/scala/org/apache/pekko/osgi/PojoSRTestSupport.scala b/osgi/src/test/scala/org/apache/pekko/osgi/PojoSRTestSupport.scala index 49f45d5b99d..076ec3509f9 100644 --- a/osgi/src/test/scala/org/apache/pekko/osgi/PojoSRTestSupport.scala +++ b/osgi/src/test/scala/org/apache/pekko/osgi/PojoSRTestSupport.scala @@ -15,8 +15,8 @@ package org.apache.pekko.osgi import java.io._ import java.net.URL -import java.util.{ Date, HashMap, ServiceLoader, UUID } import java.util.jar.JarInputStream +import java.util.{ Date, HashMap, ServiceLoader, UUID } import scala.annotation.{ nowarn, tailrec } import scala.collection.immutable @@ -24,12 +24,12 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag +import org.scalatest.{ BeforeAndAfterAll, Suite } + import de.kalpatec.pojosr.framework.launch.{ BundleDescriptor, ClasspathScanner, PojoServiceRegistryFactory } import org.apache.commons.io.IOUtils.copy import org.osgi.framework._ -import org.scalatest.{ BeforeAndAfterAll, Suite } - /** * Trait that provides support for building pekko-osgi tests using PojoSR */ diff --git a/osgi/src/test/scala/org/apache/pekko/osgi/test/TestActivators.scala b/osgi/src/test/scala/org/apache/pekko/osgi/test/TestActivators.scala index 30449ca4444..e744c72fe8d 100644 --- a/osgi/src/test/scala/org/apache/pekko/osgi/test/TestActivators.scala +++ b/osgi/src/test/scala/org/apache/pekko/osgi/test/TestActivators.scala @@ -13,10 +13,11 @@ package org.apache.pekko.osgi.test -import PingPong._ +import org.apache.pekko + import org.osgi.framework.BundleContext -import org.apache.pekko +import PingPong._ import pekko.actor.{ ActorSystem, Props } import pekko.osgi.ActorSystemActivator diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/EventEnvelope.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/EventEnvelope.scala index afda07fbdcf..71783ad20ed 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/EventEnvelope.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/EventEnvelope.scala @@ -18,6 +18,7 @@ import java.util.Optional import scala.runtime.AbstractFunction5 import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.HashCode diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/Offset.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/Offset.scala index 95e9b65a20f..b310f6594ff 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/Offset.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/Offset.scala @@ -17,6 +17,7 @@ import java.time.Instant import java.util.UUID import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.util.UUIDComparator diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/PersistenceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/PersistenceQuery.scala index 480b6af00f8..4b64bdbd763 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/PersistenceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/PersistenceQuery.scala @@ -17,13 +17,14 @@ import scala.annotation.nowarn import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.annotation.InternalApi import pekko.persistence.{ PersistencePlugin, PluginProvider } import pekko.persistence.query.scaladsl.ReadJournal -import com.typesafe.config.{ Config, ConfigFactory } - /** * Persistence extension for queries. */ diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/internal/QuerySerializer.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/internal/QuerySerializer.scala index bbd1780560c..584455ebddb 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/internal/QuerySerializer.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/internal/QuerySerializer.scala @@ -22,6 +22,7 @@ import java.util.UUID import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.event.Logging import pekko.persistence.query.NoOffset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByPersistenceIdQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByPersistenceIdQuery.scala index b29d996800c..f1caff6753f 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByPersistenceIdQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByPersistenceIdQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.EventEnvelope import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByTagQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByTagQuery.scala index cccbd0ad09f..5fff9df88f7 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByTagQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentEventsByTagQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.{ EventEnvelope, Offset } import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentPersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentPersistenceIdsQuery.scala index 1579f3a0ee0..fb0969c332a 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentPersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/CurrentPersistenceIdsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStorePagedPersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStorePagedPersistenceIdsQuery.scala index c6fd1473d40..4aab42f509d 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStorePagedPersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStorePagedPersistenceIdsQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.javadsl import java.util.Optional import org.apache.pekko + import pekko.NotUsed import pekko.persistence.state.javadsl.DurableStateStore import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStoreQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStoreQuery.scala index 54a63f259a3..fef9e181918 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStoreQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/DurableStateStoreQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.DurableStateChange import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByPersistenceIdQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByPersistenceIdQuery.scala index 4b65d036ec7..fd22a1062d4 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByPersistenceIdQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByPersistenceIdQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.EventEnvelope import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByTagQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByTagQuery.scala index 2f995eb66d4..bb706f0e0b5 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByTagQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/EventsByTagQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.{ EventEnvelope, Offset } import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PagedPersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PagedPersistenceIdsQuery.scala index f033dd7b487..cd57320738b 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PagedPersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PagedPersistenceIdsQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.javadsl import java.util.Optional import org.apache.pekko + import pekko.NotUsed import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PersistenceIdsQuery.scala index ede4ac7d7a7..afb6bb9fb51 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/javadsl/PersistenceIdsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.javadsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsStage.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsStage.scala index 011853a8b63..0a202b15eee 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsStage.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsStage.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.journal.leveldb import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.Persistence diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/Buffer.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/Buffer.scala index 163007895e6..9782441a499 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/Buffer.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/Buffer.scala @@ -18,6 +18,7 @@ import java.util import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.Outlet import pekko.stream.stage.GraphStageLogic diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala index 614811f9688..2eae25d5b96 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.journal.leveldb import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.JournalProtocol.RecoverySuccess diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala index 4ab38707f67..bec75f6cd22 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.journal.leveldb import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.JournalProtocol.RecoverySuccess diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/LeveldbReadJournalProvider.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/LeveldbReadJournalProvider.scala index b15a4aa6c4e..2e90a394d6b 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/LeveldbReadJournalProvider.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/LeveldbReadJournalProvider.scala @@ -14,11 +14,12 @@ package org.apache.pekko.persistence.query.journal.leveldb import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.persistence.query.ReadJournalProvider import com.typesafe.config.Config +import pekko.actor.ExtendedActorSystem +import pekko.persistence.query.ReadJournalProvider + @deprecated("Use another journal/query implementation", "Akka 2.6.15") class LeveldbReadJournalProvider(system: ExtendedActorSystem, config: Config) extends ReadJournalProvider { diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/javadsl/LeveldbReadJournal.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/javadsl/LeveldbReadJournal.scala index 88fe694faed..6d412a1a447 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/javadsl/LeveldbReadJournal.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/javadsl/LeveldbReadJournal.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.journal.leveldb.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.{ EventEnvelope, Offset } import pekko.persistence.query.javadsl._ diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala index 8d0f01b807d..448d89b5ffa 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala @@ -19,6 +19,9 @@ import java.nio.charset.StandardCharsets import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.NotUsed import pekko.actor.ExtendedActorSystem import pekko.event.Logging @@ -33,8 +36,6 @@ import pekko.persistence.query.scaladsl._ import pekko.persistence.query.scaladsl.ReadJournal import pekko.stream.scaladsl.Source -import com.typesafe.config.Config - /** * Scala API [[pekko.persistence.query.scaladsl.ReadJournal]] implementation for LevelDB. * diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByPersistenceIdQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByPersistenceIdQuery.scala index afd53db72d2..e386f1459a4 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByPersistenceIdQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByPersistenceIdQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.EventEnvelope import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByTagQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByTagQuery.scala index f62a766865d..f23977c1573 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByTagQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentEventsByTagQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.{ EventEnvelope, Offset } import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentPersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentPersistenceIdsQuery.scala index 1f04928b94f..3fc17bffa94 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentPersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/CurrentPersistenceIdsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStorePagedPersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStorePagedPersistenceIdsQuery.scala index dec7bb0dbe4..2a14b2ad51e 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStorePagedPersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStorePagedPersistenceIdsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.state.scaladsl.DurableStateStore import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStoreQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStoreQuery.scala index aae8c84354d..b8d460f7837 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStoreQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/DurableStateStoreQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.DurableStateChange import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByPersistenceIdQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByPersistenceIdQuery.scala index 20a5ec03a46..2026a02ae06 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByPersistenceIdQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByPersistenceIdQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.EventEnvelope import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByTagQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByTagQuery.scala index f98da85703b..b6c8650b0ae 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByTagQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/EventsByTagQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.persistence.query.{ EventEnvelope, Offset } import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PagedPersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PagedPersistenceIdsQuery.scala index 7759e5751f2..382d7dee2f5 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PagedPersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PagedPersistenceIdsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PersistenceIdsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PersistenceIdsQuery.scala index 27ea27f03b3..11a273cdcc2 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PersistenceIdsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/scaladsl/PersistenceIdsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.scaladsl.Source diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventEnvelope.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventEnvelope.scala index 5f8018365a6..bc9a2212990 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventEnvelope.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventEnvelope.scala @@ -13,10 +13,11 @@ package org.apache.pekko.persistence.query.typed -import java.util.{ Set => JSet } import java.util.Optional +import java.util.{ Set => JSet } import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.persistence.query.Offset import pekko.util.HashCode diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventsBySliceFirehoseReadJournalProvider.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventsBySliceFirehoseReadJournalProvider.scala index 19f4e7db517..494b5f1f3dc 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventsBySliceFirehoseReadJournalProvider.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventsBySliceFirehoseReadJournalProvider.scala @@ -12,9 +12,10 @@ */ package org.apache.pekko.persistence.query.typed +import org.apache.pekko + import com.typesafe.config.Config -import org.apache.pekko import pekko.actor.ExtendedActorSystem import pekko.persistence.query.ReadJournalProvider diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala index 94728c13347..3918a827338 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala @@ -13,8 +13,8 @@ package org.apache.pekko.persistence.query.typed.internal -import java.time.{ Duration => JDuration } import java.time.Instant +import java.time.{ Duration => JDuration } import java.util.UUID import java.util.concurrent.ConcurrentHashMap @@ -24,9 +24,10 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import scala.util.control.NoStackTrace +import org.apache.pekko + import com.typesafe.config.Config -import org.apache.pekko import pekko.NotUsed import pekko.actor.ActorSystem import pekko.actor.Cancellable diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala index 88d8f5c2629..e89ec68ff6c 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.javadsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdTypedQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdTypedQuery.scala index 75e57df8156..24b73238fb8 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdTypedQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsByPersistenceIdTypedQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.javadsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceQuery.scala index 553146061b5..234e61a36b7 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala index c7e57636bef..d9187034da9 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/DurableStateStoreBySliceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/DurableStateStoreBySliceQuery.scala index f061a1decbf..0daf0cc521c 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/DurableStateStoreBySliceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/DurableStateStoreBySliceQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventTimestampQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventTimestampQuery.scala index 59ce2c702df..fcb68fefba9 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventTimestampQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventTimestampQuery.scala @@ -18,6 +18,7 @@ import java.util.Optional import java.util.concurrent.CompletionStage import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.persistence.query.javadsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala index ebbe98a6fc0..934b45ba1da 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.javadsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdTypedQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdTypedQuery.scala index 6e925e92d7d..08d7dee618a 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdTypedQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsByPersistenceIdTypedQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.javadsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceFirehoseQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceFirehoseQuery.scala index f08a5426bca..a163a8a3537 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceFirehoseQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceFirehoseQuery.scala @@ -23,6 +23,7 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.NotUsed import pekko.japi.Pair import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceQuery.scala index 190851788a5..82702c0196c 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceStartingFromSnapshotsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceStartingFromSnapshotsQuery.scala index 84e36ccb1d6..2efec8da3f0 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceStartingFromSnapshotsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceStartingFromSnapshotsQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/LoadEventQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/LoadEventQuery.scala index 65f3eaff698..8630ba8cf80 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/LoadEventQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/LoadEventQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.javadsl import java.util.concurrent.CompletionStage import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.persistence.query.javadsl.ReadJournal import pekko.persistence.query.typed.EventEnvelope diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala index d2075bf2ea6..c95afb3df36 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdStartingFromSnapshotQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.scaladsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdTypedQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdTypedQuery.scala index f07776d3864..07bbc5ca24d 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdTypedQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsByPersistenceIdTypedQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.scaladsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceQuery.scala index 4dda4b4315d..f876b263b37 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala index d79f01d8308..f3774f9c10f 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/CurrentEventsBySliceStartingFromSnapshotsQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/DurableStateStoreBySliceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/DurableStateStoreBySliceQuery.scala index fcf49d2355b..ec09eb47390 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/DurableStateStoreBySliceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/DurableStateStoreBySliceQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.DurableStateChange diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventTimestampQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventTimestampQuery.scala index f0280810783..5a9e2bbab07 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventTimestampQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventTimestampQuery.scala @@ -18,6 +18,7 @@ import java.time.Instant import scala.concurrent.Future import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.persistence.query.scaladsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala index e33fe28abff..d2380585834 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdStartingFromSnapshotQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.scaladsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdTypedQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdTypedQuery.scala index 9e05b1751f2..eda2906c048 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdTypedQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsByPersistenceIdTypedQuery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.scaladsl.ReadJournal diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceFirehoseQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceFirehoseQuery.scala index 5eb68e98f70..682cd9254b2 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceFirehoseQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceFirehoseQuery.scala @@ -19,9 +19,10 @@ import scala.annotation.nowarn import scala.collection.immutable import scala.concurrent.Future +import org.apache.pekko + import com.typesafe.config.Config -import org.apache.pekko import pekko.NotUsed import pekko.actor.ExtendedActorSystem import pekko.persistence.Persistence diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceQuery.scala index 7d76b020d72..f54f308cb6d 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceStartingFromSnapshotsQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceStartingFromSnapshotsQuery.scala index cb53fbd02a2..3cfbd674f2d 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceStartingFromSnapshotsQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/EventsBySliceStartingFromSnapshotsQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.persistence.query.Offset diff --git a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/LoadEventQuery.scala b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/LoadEventQuery.scala index 4843eab0d43..8b57ddcdb4e 100644 --- a/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/LoadEventQuery.scala +++ b/persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/scaladsl/LoadEventQuery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.query.typed.scaladsl import scala.concurrent.Future import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.persistence.query.scaladsl.ReadJournal import pekko.persistence.query.typed.EventEnvelope diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/DummyReadJournal.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/DummyReadJournal.scala index 905920cedb1..744ceaf3dd0 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/DummyReadJournal.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/DummyReadJournal.scala @@ -16,12 +16,13 @@ package org.apache.pekko.persistence.query import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.NotUsed import pekko.actor.ExtendedActorSystem import pekko.stream.scaladsl.Source -import com.typesafe.config.{ Config, ConfigFactory } - /** * Use for tests only! * Emits infinite stream of strings (representing queried for events). diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/PersistenceQuerySpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/PersistenceQuerySpec.scala index 6e04f54236d..d5dc20933b1 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/PersistenceQuerySpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/PersistenceQuerySpec.scala @@ -16,8 +16,6 @@ package org.apache.pekko.persistence.query import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.persistence.journal.{ EventSeq, ReadEventAdapter } import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -25,6 +23,9 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.ActorSystem +import pekko.persistence.journal.{ EventSeq, ReadEventAdapter } + class PersistenceQuerySpec extends AnyWordSpecLike with Matchers with BeforeAndAfterAll { val eventAdaptersConfig = diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/TestClock.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/TestClock.scala index 55fcd4fa3cd..31bf6be5746 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/TestClock.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/TestClock.scala @@ -13,11 +13,11 @@ package org.apache.pekko.persistence.query -import java.time.{ Duration => JDuration } import java.time.Clock import java.time.Instant import java.time.ZoneId import java.time.ZoneOffset +import java.time.{ Duration => JDuration } import scala.concurrent.duration.FiniteDuration diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/internal/QuerySerializerSpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/internal/QuerySerializerSpec.scala index 8d0afba57f2..6c298cb4be3 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/internal/QuerySerializerSpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/internal/QuerySerializerSpec.scala @@ -17,6 +17,7 @@ import java.time.Instant import java.util.UUID import org.apache.pekko + import pekko.persistence.query.NoOffset import pekko.persistence.query.Sequence import pekko.persistence.query.TimeBasedUUID diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsSpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsSpec.scala index 20881e1fa2a..26056c6b87e 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsSpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/AllPersistenceIdsSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.persistence.query.PersistenceQuery import pekko.persistence.query.journal.leveldb.scaladsl.LeveldbReadJournal import pekko.persistence.query.scaladsl.PersistenceIdsQuery diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/Cleanup.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/Cleanup.scala index e75c748b107..dc001bfd83e 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/Cleanup.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/Cleanup.scala @@ -15,10 +15,10 @@ package org.apache.pekko.persistence.query.journal.leveldb import java.io.File -import org.apache.commons.io.FileUtils - import org.apache.pekko.testkit.PekkoSpec +import org.apache.commons.io.FileUtils + trait Cleanup { this: PekkoSpec => val storageLocations = List( diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdSpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdSpec.scala index 9398ab7c121..f188c7e451b 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdSpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.persistence.query.EventEnvelope import pekko.persistence.query.PersistenceQuery diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagSpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagSpec.scala index 11c239e9c7f..3ae3ed48a01 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagSpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.persistence.journal.Tagged import pekko.persistence.journal.WriteEventAdapter import pekko.persistence.query.EventEnvelope diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/TestActor.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/TestActor.scala index 29281871809..4ed51b0560f 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/TestActor.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/journal/leveldb/TestActor.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.query.journal.leveldb import org.apache.pekko + import pekko.actor.Props import pekko.persistence.PersistentActor diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/EventEnvelopeSpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/EventEnvelopeSpec.scala index ff482463d6c..db58fd5c124 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/EventEnvelopeSpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/EventEnvelopeSpec.scala @@ -18,6 +18,7 @@ package org.apache.pekko.persistence.query.typed import org.apache.pekko + import pekko.persistence.query.NoOffset import pekko.testkit.PekkoSpec diff --git a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehoseSpec.scala b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehoseSpec.scala index fc96abab8d0..65ce9e3f18c 100644 --- a/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehoseSpec.scala +++ b/persistence-query/src/test/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehoseSpec.scala @@ -17,13 +17,15 @@ import java.time.{ Duration => JDuration } import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger -import scala.concurrent.{ ExecutionContext, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ ExecutionContext, Promise } + +import org.apache.pekko -import com.typesafe.config.ConfigFactory import org.scalatest.concurrent.Eventually -import org.apache.pekko +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.persistence.Persistence import pekko.persistence.query.NoOffset diff --git a/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/PersistencePluginProxySpec.scala b/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/PersistencePluginProxySpec.scala index 3364cfef336..9c52905370b 100644 --- a/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/PersistencePluginProxySpec.scala +++ b/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/PersistencePluginProxySpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.persistence.journal.leveldb import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.persistence._ import pekko.persistence.journal.PersistencePluginProxy import pekko.testkit.{ PekkoSpec, TestProbe } -import com.typesafe.config.ConfigFactory - object PersistencePluginProxySpec { lazy val config = ConfigFactory.parseString(s""" diff --git a/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbJournalSpec.scala b/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbJournalSpec.scala index 7d891bf1efe..a43f902c681 100644 --- a/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbJournalSpec.scala +++ b/persistence-shared/src/test/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbJournalSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.persistence.journal.leveldb import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.persistence._ import pekko.testkit.{ PekkoSpec, TestProbe } -import com.typesafe.config.ConfigFactory - object SharedLeveldbJournalSpec { val config = ConfigFactory.parseString(s""" pekko { diff --git a/persistence-shared/src/test/scala/org/apache/pekko/persistence/serialization/SerializerSpec.scala b/persistence-shared/src/test/scala/org/apache/pekko/persistence/serialization/SerializerSpec.scala index a591ecb4bfc..9bd7f7a606e 100644 --- a/persistence-shared/src/test/scala/org/apache/pekko/persistence/serialization/SerializerSpec.scala +++ b/persistence-shared/src/test/scala/org/apache/pekko/persistence/serialization/SerializerSpec.scala @@ -16,9 +16,12 @@ package org.apache.pekko.persistence.serialization import java.io.NotSerializableException import java.util.UUID +import org.apache.pekko + +import com.typesafe.config._ + import org.apache.commons.codec.binary.Hex.{ decodeHex, encodeHex } -import org.apache.pekko import pekko.actor._ import pekko.persistence._ import pekko.persistence.AtLeastOnceDelivery.{ AtLeastOnceDeliverySnapshot, UnconfirmedDelivery } @@ -26,8 +29,6 @@ import pekko.serialization._ import pekko.testkit._ import pekko.util.ByteString.UTF_8 -import com.typesafe.config._ - object SerializerSpecConfigs { val customSerializers = ConfigFactory.parseString(""" diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/PluginSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/PluginSpec.scala index 3948c17222f..43e6f8802d2 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/PluginSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/PluginSpec.scala @@ -19,8 +19,6 @@ import java.util.concurrent.atomic.AtomicInteger import scala.reflect.ClassTag import org.apache.pekko -import pekko.actor._ -import pekko.testkit._ import org.scalatest._ import org.scalatest.matchers.should.Matchers @@ -28,6 +26,9 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config._ +import pekko.actor._ +import pekko.testkit._ + abstract class PluginSpec(val config: Config) extends TestKitBase with AnyWordSpecLike diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/TestSerializer.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/TestSerializer.scala index dd93ac43819..472a923af01 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/TestSerializer.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/TestSerializer.scala @@ -17,6 +17,7 @@ import java.io.NotSerializableException import java.nio.charset.StandardCharsets import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ExtendedActorSystem import pekko.serialization.Serialization diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalPerfSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalPerfSpec.scala index 7af36d3e380..1871691036b 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalPerfSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalPerfSpec.scala @@ -13,16 +13,17 @@ package org.apache.pekko.persistence.japi.journal -import org.scalactic.source.Position - import org.apache.pekko -import pekko.persistence.CapabilityFlag -import pekko.persistence.journal.JournalPerfSpec import org.scalatest.Informer import com.typesafe.config.Config +import org.scalactic.source.Position + +import pekko.persistence.CapabilityFlag +import pekko.persistence.journal.JournalPerfSpec + /** * JAVA API * diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalSpec.scala index de63e3326bd..1089519a77e 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/journal/JavaJournalSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.persistence.japi.journal import scala.collection.immutable import org.apache.pekko -import pekko.persistence.CapabilityFlag -import pekko.persistence.journal.JournalSpec import org.scalatest.{ Args, ConfigMap, Filter, Status, Suite, TestData } import com.typesafe.config.Config +import pekko.persistence.CapabilityFlag +import pekko.persistence.journal.JournalSpec + /** * JAVA API * diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/snapshot/JavaSnapshotStoreSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/snapshot/JavaSnapshotStoreSpec.scala index fc1b45261a7..fae86c02ede 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/snapshot/JavaSnapshotStoreSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/snapshot/JavaSnapshotStoreSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.persistence.japi.snapshot import scala.collection.immutable import org.apache.pekko -import pekko.persistence.CapabilityFlag -import pekko.persistence.snapshot.SnapshotStoreSpec import org.scalatest.{ Args, ConfigMap, Filter, Status, Suite, TestData } import com.typesafe.config.Config +import pekko.persistence.CapabilityFlag +import pekko.persistence.snapshot.SnapshotStoreSpec + /** * JAVA API * diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/state/JavaDurableStateStoreSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/state/JavaDurableStateStoreSpec.scala index 42801a31c64..c58aa134383 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/state/JavaDurableStateStoreSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/japi/state/JavaDurableStateStoreSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.persistence.japi.state import scala.collection.immutable import org.apache.pekko -import pekko.persistence.CapabilityFlag -import pekko.persistence.state.DurableStateStoreSpec import org.scalatest.{ Args, ConfigMap, Filter, Status, Suite, TestData } import com.typesafe.config.Config +import pekko.persistence.CapabilityFlag +import pekko.persistence.state.DurableStateStoreSpec + /** * JAVA API * diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalPerfSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalPerfSpec.scala index 37eb2820d9f..ab3809012e4 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalPerfSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalPerfSpec.scala @@ -19,6 +19,10 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorLogging import pekko.actor.ActorRef import pekko.actor.Props @@ -30,9 +34,6 @@ import pekko.persistence.journal.JournalPerfSpec.ResetCounter import pekko.serialization.SerializerWithStringManifest import pekko.testkit.TestProbe -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object JournalPerfSpec { class BenchActor(override val persistenceId: String, replyTo: ActorRef, replyAfter: Int) extends PersistentActor diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalSpec.scala index cd7762d7ac0..244c6080889 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/journal/JournalSpec.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.persistence._ import pekko.persistence.JournalProtocol._ import pekko.persistence.scalatest.{ MayVerb, OptionalTests } import pekko.testkit._ -import com.typesafe.config._ - object JournalSpec { val config: Config = ConfigFactory.parseString(s""" pekko.persistence.publish-plugin-commands = on diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/scalatest/MayVerb.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/scalatest/MayVerb.scala index 8ea99a86ef4..d2df0df30ac 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/scalatest/MayVerb.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/scalatest/MayVerb.scala @@ -13,11 +13,11 @@ package org.apache.pekko.persistence.scalatest -import org.scalactic.source.Position - import org.scalatest.exceptions.TestCanceledException import org.scalatest.verbs.StringVerbBlockRegistration +import org.scalactic.source.Position + trait MayVerb { import MayVerb._ diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStoreSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStoreSpec.scala index 464bb84d0b4..afa57c047c0 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStoreSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStoreSpec.scala @@ -16,15 +16,16 @@ package org.apache.pekko.persistence.snapshot import scala.collection.immutable.Seq import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.persistence._ import pekko.persistence.SnapshotProtocol._ import pekko.persistence.scalatest.{ MayVerb, OptionalTests } import pekko.testkit.TestProbe -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SnapshotStoreSpec { val config: Config = ConfigFactory.parseString(s""" pekko.persistence.publish-plugin-commands = on diff --git a/persistence-tck/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreSpec.scala b/persistence-tck/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreSpec.scala index 8ebbaf0fef8..978c3a857c8 100644 --- a/persistence-tck/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreSpec.scala +++ b/persistence-tck/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreSpec.scala @@ -18,15 +18,16 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.persistence._ import pekko.persistence.scalatest.{ MayVerb, OptionalTests } import pekko.persistence.state.scaladsl.DurableStateUpdateStore import pekko.testkit.TestProbe -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableStateStoreSpec { val config: Config = ConfigFactory.parseString(s""" pekko.actor { diff --git a/persistence-tck/src/test/scala/org/apache/pekko/persistence/PluginCleanup.scala b/persistence-tck/src/test/scala/org/apache/pekko/persistence/PluginCleanup.scala index c2750e01ed8..041b03929f9 100644 --- a/persistence-tck/src/test/scala/org/apache/pekko/persistence/PluginCleanup.scala +++ b/persistence-tck/src/test/scala/org/apache/pekko/persistence/PluginCleanup.scala @@ -15,10 +15,10 @@ package org.apache.pekko.persistence import java.io.File -import org.apache.commons.io.FileUtils - import org.scalatest.BeforeAndAfterAll +import org.apache.commons.io.FileUtils + trait PluginCleanup extends BeforeAndAfterAll { self: PluginSpec => val storageLocations = List("pekko.persistence.journal.leveldb.dir", "pekko.persistence.snapshot-store.local.dir").map(s => diff --git a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala index dac1975c466..dd38bebf54b 100644 --- a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala +++ b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.journal.inmem import org.apache.pekko + import pekko.persistence.CapabilityFlag import pekko.persistence.PersistenceSpec import pekko.persistence.journal.JournalSpec diff --git a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalJavaSpec.scala b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalJavaSpec.scala index 89a453b655a..7cc8c95b5b8 100644 --- a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalJavaSpec.scala +++ b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalJavaSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.journal.leveldb import org.apache.pekko + import pekko.persistence.{ PersistenceSpec, PluginCleanup } import pekko.persistence.journal.JournalSpec diff --git a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNativeSpec.scala b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNativeSpec.scala index e535b1eefe6..cf171741a86 100644 --- a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNativeSpec.scala +++ b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNativeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.journal.leveldb import org.apache.pekko + import pekko.persistence.{ PersistenceSpec, PluginCleanup } import pekko.persistence.journal.JournalSpec diff --git a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala index 0a85570f3d5..0f73b9c1339 100644 --- a/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala +++ b/persistence-tck/src/test/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.journal.leveldb import org.apache.pekko + import pekko.persistence.{ PersistenceSpec, PluginCleanup } import pekko.persistence.journal.JournalSpec diff --git a/persistence-tck/src/test/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStoreSpec.scala b/persistence-tck/src/test/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStoreSpec.scala index b3559153dba..dad009c6cc9 100644 --- a/persistence-tck/src/test/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStoreSpec.scala +++ b/persistence-tck/src/test/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStoreSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.persistence.snapshot.local import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.persistence.CapabilityFlag import pekko.persistence.PluginCleanup import pekko.persistence.snapshot.SnapshotStoreSpec -import com.typesafe.config.ConfigFactory - class LocalSnapshotStoreSpec extends SnapshotStoreSpec( config = diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/EventStorage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/EventStorage.scala index e116549fb84..a788654b7cb 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/EventStorage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/EventStorage.scala @@ -20,6 +20,7 @@ import scala.jdk.CollectionConverters._ import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.persistence.PersistentRepr diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala index 549e69cfa78..2f130ba8261 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala @@ -19,6 +19,9 @@ import scala.concurrent.Future import scala.util.Try import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.ActorLogging import pekko.annotation.InternalApi import pekko.persistence._ @@ -28,8 +31,6 @@ import pekko.persistence.snapshot.SnapshotStore import pekko.persistence.testkit.internal.{ InMemStorageExtension, SnapshotStorageEmulatorExtension } import pekko.persistence.testkit.internal.CurrentTime -import com.typesafe.config.{ Config, ConfigFactory } - /** * INTERNAL API * diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/SnapshotStorage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/SnapshotStorage.scala index 6258688da57..3f185507a28 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/SnapshotStorage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/SnapshotStorage.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit import org.apache.pekko + import pekko.actor.Extension import pekko.annotation.InternalApi import pekko.persistence.{ SelectedSnapshot, SnapshotMetadata, SnapshotSelectionCriteria } diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala index 791392446e8..b17ac17c85f 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala @@ -19,6 +19,7 @@ import scala.reflect.ClassTag import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.testkit.typed.scaladsl.ActorTestKit import pekko.actor.testkit.typed.scaladsl.SerializationTestKit import pekko.actor.typed.ActorRef diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/InMemStorageExtension.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/InMemStorageExtension.scala index d529e254f45..d4d5cbb049a 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/InMemStorageExtension.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/InMemStorageExtension.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.internal import java.util.concurrent.ConcurrentHashMap import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem, ExtensionId, ExtensionIdProvider } import pekko.actor.Extension import pekko.annotation.InternalApi diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceInitImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceInitImpl.scala index 7dd2384c1db..058a7f5c69b 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceInitImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceInitImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.internal import java.util.concurrent.TimeUnit import org.apache.pekko + import pekko.actor.ActorLogging import pekko.actor.Props import pekko.annotation.InternalApi diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala index 637d5f2e82e..4904f3af883 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala @@ -22,6 +22,7 @@ import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.internal.BehaviorImpl.DeferredBehavior import pekko.actor.typed.scaladsl.{ AbstractBehavior, ActorContext, Behaviors } diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedEventStorageImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedEventStorageImpl.scala index 75b60cb3264..e3794faa4e3 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedEventStorageImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedEventStorageImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.internal import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem } import pekko.annotation.InternalApi import pekko.persistence.PersistentRepr diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedSnapshotStorageImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedSnapshotStorageImpl.scala index ea7ae5f063b..fd2957d001e 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedSnapshotStorageImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SerializedSnapshotStorageImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.internal import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem } import pekko.annotation.InternalApi import pekko.persistence.SnapshotMetadata diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleEventStorageImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleEventStorageImpl.scala index 13c3e639b90..6e3431da2d6 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleEventStorageImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleEventStorageImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence._ import pekko.persistence.testkit.EventStorage diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleSnapshotStorageImpl.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleSnapshotStorageImpl.scala index 0a01e44ea1a..1698e9a3a55 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleSnapshotStorageImpl.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SimpleSnapshotStorageImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.SnapshotMetadata import pekko.persistence.testkit.SnapshotStorage diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SnapshotStorageEmulatorExtension.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SnapshotStorageEmulatorExtension.scala index 99f92f8d6ed..20eb4a24950 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SnapshotStorageEmulatorExtension.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/SnapshotStorageEmulatorExtension.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.internal import java.util.concurrent.ConcurrentHashMap import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem, ExtensionId, ExtensionIdProvider } import pekko.actor.Extension import pekko.annotation.InternalApi diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/TestKitStorage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/TestKitStorage.scala index 827edd4a53d..fa909210a6b 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/TestKitStorage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/TestKitStorage.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.testkit.ProcessingPolicy diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/EventSourcedBehaviorTestKit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/EventSourcedBehaviorTestKit.scala index f99316a4dd9..1a507138aac 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/EventSourcedBehaviorTestKit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/EventSourcedBehaviorTestKit.scala @@ -13,15 +13,18 @@ package org.apache.pekko.persistence.testkit.javadsl -import java.util.{ List => JList } import java.util.Optional import java.util.function.{ Function => JFunction } +import java.util.{ List => JList } import scala.annotation.varargs import scala.jdk.CollectionConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior @@ -29,8 +32,6 @@ import pekko.annotation.ApiMayChange import pekko.annotation.DoNotInherit import pekko.persistence.testkit.scaladsl -import com.typesafe.config.Config - /** * Testing of [[pekko.persistence.typed.javadsl.EventSourcedBehavior]] implementations. * It supports running one command at a time and you can assert that the synchronously returned result is as expected. diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceInit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceInit.scala index 0b6b5ef349f..08135574d6e 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceInit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceInit.scala @@ -20,6 +20,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.Done import pekko.actor.ClassicActorSystemProvider import pekko.persistence.testkit.scaladsl diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala index b459142cb97..9de50721903 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala @@ -17,9 +17,10 @@ import java.util.{ List, Set } import scala.collection.immutable.{ Set => ScalaSet } +import org.apache.pekko + import org.jspecify.annotations.Nullable -import org.apache.pekko import pekko.actor.testkit.typed.javadsl.BehaviorTestKit import pekko.actor.typed.Behavior import pekko.annotation.DoNotInherit diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceTestKit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceTestKit.scala index 86d526c4e47..8b0be69449e 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceTestKit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceTestKit.scala @@ -21,6 +21,7 @@ import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.ActorSystem import pekko.annotation.ApiMayChange import pekko.persistence.testkit.{ EventStorage, ExpectedFailure, ExpectedRejection, JournalOperation } diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotTestKit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotTestKit.scala index a5bb6b703fb..c4e4c687ebd 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotTestKit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotTestKit.scala @@ -21,6 +21,7 @@ import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.ActorSystem import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/PersistenceTestKitReadJournalProvider.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/PersistenceTestKitReadJournalProvider.scala index c64c315338f..d00b9ebdf9e 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/PersistenceTestKitReadJournalProvider.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/PersistenceTestKitReadJournalProvider.scala @@ -13,11 +13,12 @@ package org.apache.pekko.persistence.testkit.query import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.persistence.query.ReadJournalProvider import com.typesafe.config.Config +import pekko.actor.ExtendedActorSystem +import pekko.persistence.query.ReadJournalProvider + class PersistenceTestKitReadJournalProvider(system: ExtendedActorSystem, config: Config, configPath: String) extends ReadJournalProvider { private val _scaladslReadJournal = diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala index 7a4149e2216..65ce2afa808 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala @@ -13,6 +13,7 @@ package org.apache.pekko.persistence.testkit.query.internal import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.journal.Tagged diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala index b3c94efb783..b83a8a301aa 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala @@ -18,6 +18,7 @@ package org.apache.pekko.persistence.testkit.query.internal import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.Persistence diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala index 301e26433f1..02fa495cd08 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala @@ -18,6 +18,7 @@ package org.apache.pekko.persistence.testkit.query.internal import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.journal.Tagged diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/TypedEventsByPersistenceIdStage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/TypedEventsByPersistenceIdStage.scala index 70698a9f7f9..c5ef79c3137 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/TypedEventsByPersistenceIdStage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/TypedEventsByPersistenceIdStage.scala @@ -17,6 +17,7 @@ import java.time.Instant import java.time.temporal.ChronoUnit import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.persistence.Persistence diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/javadsl/PersistenceTestKitReadJournal.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/javadsl/PersistenceTestKitReadJournal.scala index 15e11df159d..3d77915ffa3 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/javadsl/PersistenceTestKitReadJournal.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/javadsl/PersistenceTestKitReadJournal.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.query.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.japi.Pair import pekko.persistence.query.EventEnvelope diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/scaladsl/PersistenceTestKitReadJournal.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/scaladsl/PersistenceTestKitReadJournal.scala index cfd08ebf980..8bd08096863 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/scaladsl/PersistenceTestKitReadJournal.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/scaladsl/PersistenceTestKitReadJournal.scala @@ -19,6 +19,11 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import org.slf4j.LoggerFactory + +import com.typesafe.config.Config + import pekko.NotUsed import pekko.actor.ExtendedActorSystem import pekko.persistence.Persistence @@ -49,10 +54,6 @@ import pekko.persistence.testkit.query.internal.TypedEventsByPersistenceIdStage import pekko.persistence.typed.PersistenceId import pekko.stream.scaladsl.Source -import org.slf4j.LoggerFactory - -import com.typesafe.config.Config - object PersistenceTestKitReadJournal { val Identifier = "pekko.persistence.testkit.query" } diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKit.scala index d063c5024e9..ca22d644cef 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKit.scala @@ -17,6 +17,10 @@ import scala.collection.immutable import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.ActorTestKit import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem @@ -27,9 +31,6 @@ import pekko.persistence.testkit.PersistenceTestKitPlugin import pekko.persistence.testkit.PersistenceTestKitSnapshotPlugin import pekko.persistence.testkit.internal.EventSourcedBehaviorTestKitImpl -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * Testing of [[pekko.persistence.typed.scaladsl.EventSourcedBehavior]] implementations. * It supports running one command at a time and you can assert that the synchronously returned result is as expected. diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceInit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceInit.scala index 05cef2507f9..2590e30ee88 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceInit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceInit.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.Done import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeBehavior.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeBehavior.scala index bf02b70f354..a84585e8ff8 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeBehavior.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeBehavior.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.testkit.typed.scaladsl.BehaviorTestKit import pekko.actor.typed.Behavior import pekko.annotation.DoNotInherit diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKit.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKit.scala index 20ea868cf83..c483ce2a021 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKit.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKit.scala @@ -18,6 +18,9 @@ import scala.concurrent.duration.FiniteDuration import scala.util.Try import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem @@ -34,8 +37,6 @@ import pekko.persistence.testkit.internal.InMemStorageExtension import pekko.persistence.testkit.internal.SnapshotStorageEmulatorExtension import pekko.testkit.TestProbe -import com.typesafe.config.Config - private[testkit] trait CommonTestKitOps[S, P] extends ClearOps with PolicyOpsTestKit[P] { this: HasStorage[P, S] => diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/TestOps.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/TestOps.scala index 1fd5ab23159..b6873385fbd 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/TestOps.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/TestOps.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration.FiniteDuration import scala.reflect.ClassTag import org.apache.pekko + import pekko.persistence.testkit.{ ExpectedFailure, ExpectedRejection } import pekko.persistence.testkit.ProcessingPolicy.DefaultPolicies import pekko.persistence.testkit.internal.TestKitStorage diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/PersistenceTestKitDurableStateStoreProvider.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/PersistenceTestKitDurableStateStoreProvider.scala index f716becb5e3..3cfb5363588 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/PersistenceTestKitDurableStateStoreProvider.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/PersistenceTestKitDurableStateStoreProvider.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.state import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.persistence.state.DurableStateStoreProvider import pekko.persistence.state.javadsl.{ DurableStateStore => JDurableStateStore } diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/javadsl/PersistenceTestKitDurableStateStore.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/javadsl/PersistenceTestKitDurableStateStore.scala index 51513600b9d..a8802a7d8f0 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/javadsl/PersistenceTestKitDurableStateStore.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/javadsl/PersistenceTestKitDurableStateStore.scala @@ -20,6 +20,7 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.japi.Pair import pekko.persistence.query.DurableStateChange diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala index 414a9f19628..75442dbe5bc 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala @@ -19,6 +19,7 @@ import scala.collection.immutable import scala.concurrent.Future import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.actor.ExtendedActorSystem import pekko.persistence.Persistence diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/CommonUtils.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/CommonUtils.scala index 76f74316c76..6eb50573eba 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/CommonUtils.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/CommonUtils.scala @@ -16,14 +16,15 @@ package org.apache.pekko.persistence.testkit import java.util.UUID import org.apache.pekko -import pekko.actor.{ ActorRef, ActorSystem } -import pekko.persistence._ -import pekko.testkit.TestKitBase import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import pekko.actor.{ ActorRef, ActorSystem } +import pekko.persistence._ +import pekko.testkit.TestKitBase + trait CommonUtils extends AnyWordSpecLike with TestKitBase { protected def randomPid() = UUID.randomUUID().toString diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonSnapshotTests.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonSnapshotTests.scala index 706c27d086f..1d02361d2be 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonSnapshotTests.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonSnapshotTests.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.testkit.javadsl import scala.jdk.CollectionConverters._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers._ + import pekko.actor.Props import pekko.actor.typed.javadsl.Adapter import pekko.japi.Pair @@ -23,8 +26,6 @@ import pekko.persistence._ import pekko.persistence.testkit._ import pekko.testkit.EventFilter -import org.scalatest.matchers.should.Matchers._ - trait CommonSnapshotTests extends JavaDslUtils { final lazy val testKit = new SnapshotTestKit(system) diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonTestKitTests.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonTestKitTests.scala index a88a25bc2f9..ea1d74dc50f 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonTestKitTests.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/CommonTestKitTests.scala @@ -16,14 +16,15 @@ package org.apache.pekko.persistence.testkit.javadsl import scala.jdk.CollectionConverters._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers._ + import pekko.actor.Props import pekko.actor.typed.javadsl.Adapter import pekko.persistence._ import pekko.persistence.testkit._ import pekko.testkit.EventFilter -import org.scalatest.matchers.should.Matchers._ - trait CommonTestKitTests extends JavaDslUtils { final lazy val testKit = new PersistenceTestKit(system) diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/JavaDslUtils.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/JavaDslUtils.scala index ff677c848d4..afc8ea7ceb6 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/JavaDslUtils.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/JavaDslUtils.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.javadsl import java.util import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.persistence.testkit.{ Cmd, CommonUtils, EmptyState, Evt, Passivate, Recovered, Stopped, TestCommand } import pekko.persistence.typed.{ PersistenceId, RecoveryCompleted } diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotNotSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotNotSerializeSpec.scala index 5ca921c7892..19773e50de4 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotNotSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotNotSerializeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.javadsl import org.apache.pekko + import pekko.actor.Props import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotSerializeSpec.scala index 310dc677933..0dee526ca9e 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/SnapshotSerializeSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.javadsl import java.io.NotSerializableException import org.apache.pekko + import pekko.actor.Props import pekko.persistence.SaveSnapshotFailure import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitNotSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitNotSerializeSpec.scala index ff45c4e4a53..7e52495fbcc 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitNotSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitNotSerializeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.javadsl import org.apache.pekko + import pekko.actor.Props import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitSerializeSpec.scala index c1a959a3c85..3ed7a4a137c 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/javadsl/TestKitSerializeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.javadsl import org.apache.pekko + import pekko.actor.Props import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala index 82365c3b156..0255046f946 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsBySlicesSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.testkit.query import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -27,8 +30,6 @@ import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.testBehavior import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal import pekko.stream.scaladsl.Sink -import org.scalatest.wordspec.AnyWordSpecLike - class CurrentEventsBySlicesSpec extends ScalaTestWithActorTestKit(EventsByPersistenceIdSpec.config) with LogCapturing diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala index 120d534acfd..d2d2aab063a 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/CurrentEventsByTagSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.testkit.query import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -25,8 +28,6 @@ import pekko.persistence.testkit.query.EventsByPersistenceIdSpec.testBehavior import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal import pekko.stream.scaladsl.Sink -import org.scalatest.wordspec.AnyWordSpecLike - class CurrentEventsByTagSpec extends ScalaTestWithActorTestKit(EventsByPersistenceIdSpec.config) with LogCapturing diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala index 90f99321a32..1c23a51e1f4 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.persistence.testkit.query import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } import pekko.actor.typed.ActorRef @@ -27,10 +32,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior } import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventsByPersistenceIdSpec { val config = PersistenceTestKitPlugin.config.withFallback( ConfigFactory.parseString(""" diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdTypedSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdTypedSpec.scala index 9a1b56f8bab..3b4a3128e94 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdTypedSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByPersistenceIdTypedSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.testkit.query import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -30,10 +35,6 @@ import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.stream.scaladsl.Sink import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventsByPersistenceIdTypedSpec { val config = PersistenceTestKitPlugin.config.withFallback( ConfigFactory.parseString(""" diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala index 625d10254a7..2b84615991e 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsBySliceSpec.scala @@ -21,6 +21,12 @@ import scala.collection.immutable.Seq import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -38,11 +44,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.BeforeAndAfterEach -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventsBySliceSpec { val config = PersistenceTestKitPlugin.config.withFallback( ConfigFactory.parseString(""" diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala index 5e5959bd80d..00c71a8e6f7 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/query/EventsByTagSpec.scala @@ -21,6 +21,11 @@ import scala.collection.immutable.Seq import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -37,10 +42,6 @@ import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventsByTagSpec { val config = PersistenceTestKitPlugin.config.withFallback( ConfigFactory.parseString(""" diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala index a3e96a69d39..55d2e4a8a06 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.matchers.should.Matchers._ + import pekko.actor.Props import pekko.actor.typed.scaladsl.adapter._ import pekko.persistence._ @@ -21,8 +24,6 @@ import pekko.persistence.testkit._ import pekko.persistence.typed.scaladsl.RetentionCriteria import pekko.testkit.EventFilter -import org.scalatest.matchers.should.Matchers._ - trait CommonSnapshotTests extends ScalaDslUtils { final lazy val testKit = new SnapshotTestKit(system) diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonTestKitTests.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonTestKitTests.scala index e506abe1a37..de1b19fd2e0 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonTestKitTests.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonTestKitTests.scala @@ -14,14 +14,15 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.matchers.should.Matchers._ + import pekko.actor.Props import pekko.actor.typed.scaladsl.adapter._ import pekko.persistence.{ DeleteMessagesFailure, DeleteMessagesSuccess } import pekko.persistence.testkit._ import pekko.testkit.EventFilter -import org.scalatest.matchers.should.Matchers._ - trait CommonTestKitTests extends ScalaDslUtils { final lazy val testKit: PersistenceTestKit = new PersistenceTestKit(system) diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorNoSnapshotTestKitSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorNoSnapshotTestKitSpec.scala index c6b8a8cfc88..cea136363f7 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorNoSnapshotTestKitSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorNoSnapshotTestKitSpec.scala @@ -14,16 +14,17 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.persistence.testkit.PersistenceTestKitPlugin import pekko.persistence.testkit.scaladsl.EventSourcedBehaviorTestKitSpec.TestCounter import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - class EventSourcedBehaviorNoSnapshotTestKitSpec extends ScalaTestWithActorTestKit(ConfigFactory.parseString(""" pekko.persistence.testkit.events.serialize = off diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKitSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKitSpec.scala index 5c8c4781bf5..cca1f7a2b1d 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKitSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/EventSourcedBehaviorTestKitSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.testkit.scaladsl import java.io.NotSerializableException import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -36,8 +39,6 @@ import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.serialization.DisabledJavaSerializer import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - object EventSourcedBehaviorTestKitSpec { object TestCounter { diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/MultipleJournalsSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/MultipleJournalsSpec.scala index 455ae80c802..9f8c5643609 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/MultipleJournalsSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/MultipleJournalsSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -27,10 +32,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.stream.scaladsl.Sink -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object MultipleJournalsSpec { object ListActor { diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeDurableStateSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeDurableStateSpec.scala index c20f447290e..59710b306ab 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeDurableStateSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeDurableStateSpec.scala @@ -14,6 +14,10 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.Done import pekko.actor.typed.{ Behavior, RecipientRef } import pekko.actor.typed.scaladsl.{ ActorContext, Behaviors } @@ -21,9 +25,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.state.RecoveryCompleted import pekko.persistence.typed.state.scaladsl._ -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - object PersistenceProbeDurableStateSpec { object BehaviorUnderTest { sealed trait Command diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeEventSourcedSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeEventSourcedSpec.scala index 781750aef33..62f9560f5b2 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeEventSourcedSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeEventSourcedSpec.scala @@ -14,15 +14,16 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.Done import pekko.actor.typed.{ Behavior, RecipientRef } import pekko.actor.typed.scaladsl.{ ActorContext, Behaviors } import pekko.persistence.typed.{ PersistenceId, RecoveryCompleted } import pekko.persistence.typed.scaladsl._ -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - object PersistenceProbeEventSourcedSpec { object BehaviorUnderTest { sealed trait Command diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKitJournalCompatSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKitJournalCompatSpec.scala index a0eed033b1b..3f2e9e2b480 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKitJournalCompatSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKitJournalCompatSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import java.io.NotSerializableException import org.apache.pekko + import pekko.persistence.CapabilityFlag import pekko.persistence.journal.JournalSpec import pekko.persistence.snapshot.SnapshotStoreSpec diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/RuntimeJournalsSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/RuntimeJournalsSpec.scala index 3c5f18bcd39..ddfe49ff88d 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/RuntimeJournalsSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/RuntimeJournalsSpec.scala @@ -18,6 +18,12 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + +import org.scalatest.Inside +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -39,11 +45,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.persistence.typed.scaladsl.RetentionCriteria -import org.scalatest.Inside -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object RuntimeJournalsSpec { private object Actor { diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/ScalaDslUtils.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/ScalaDslUtils.scala index 54e44371c65..50b8df4cd87 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/ScalaDslUtils.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/ScalaDslUtils.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.persistence.testkit.{ Cmd, diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotNotSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotNotSerializeSpec.scala index 18a3634e865..30b439b00f9 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotNotSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotNotSerializeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + import pekko.actor.Props import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotSerializeSpec.scala index 09a62879a21..7f0b361ea66 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/SnapshotSerializeSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import java.io.NotSerializableException import org.apache.pekko + import pekko.actor.Props import pekko.persistence.SaveSnapshotFailure import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitNotSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitNotSerializeSpec.scala index ca5fdb3e485..e5a6566e8b1 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitNotSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitNotSerializeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + import pekko.actor.Props import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitSerializeSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitSerializeSpec.scala index f6eea4fccef..03ce069ee8d 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitSerializeSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/TestKitSerializeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.testkit.scaladsl import org.apache.pekko + import pekko.actor.Props import pekko.persistence.testkit._ diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreSpec.scala index 5598c30ea28..a4400e51c97 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.testkit.state.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.ExtendedActorSystem import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -22,10 +27,6 @@ import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.stream.scaladsl.Sink import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object PersistenceTestKitDurableStateStoreSpec { val config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(""" diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreTCKSpec.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreTCKSpec.scala index 4eec73e0c4c..3740830f573 100644 --- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreTCKSpec.scala +++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStoreTCKSpec.scala @@ -18,12 +18,13 @@ package org.apache.pekko.persistence.testkit.state.scaladsl import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.persistence.CapabilityFlag import pekko.persistence.state.DurableStateStoreSpec import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin -import com.typesafe.config.ConfigFactory - object PersistenceTestKitDurableStateStoreTCKSpec { val config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(""" pekko.loglevel = DEBUG diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventPublishingSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventPublishingSpec.scala index e503a510782..84c41aa564b 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventPublishingSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventPublishingSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -25,8 +28,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - object EventPublishingSpec { object WowSuchEventSourcingBehavior { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventSourcedBehaviorLoggingSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventSourcedBehaviorLoggingSpec.scala index bca952a8caf..5176298de7e 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventSourcedBehaviorLoggingSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/EventSourcedBehaviorLoggingSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -28,10 +33,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.{ Config, ConfigFactory } - object EventSourcedBehaviorLoggingSpec { object ChattyEventSourcingBehavior { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/MultiJournalReplicationSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/MultiJournalReplicationSpec.scala index 70153f29949..3478f363580 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/MultiJournalReplicationSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/MultiJournalReplicationSpec.scala @@ -16,6 +16,13 @@ package org.apache.pekko.persistence.typed import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -29,12 +36,6 @@ import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing import pekko.stream.scaladsl.Sink -import org.scalatest.concurrent.Eventually -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object MultiJournalReplicationSpec { object Actor { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventPublishingSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventPublishingSpec.scala index 024ab6ddcd2..81607029291 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventPublishingSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventPublishingSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -27,8 +30,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing -import org.scalatest.wordspec.AnyWordSpecLike - object ReplicatedEventPublishingSpec { val EntityType = "EventPublishingSpec" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSpec.scala index 71702f92a6d..7836adebfe9 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSpec.scala @@ -18,6 +18,10 @@ import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -29,9 +33,6 @@ import pekko.persistence.testkit.scaladsl.PersistenceTestKit import pekko.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior, ReplicatedEventSourcing, ReplicationContext } import pekko.serialization.jackson.CborSerializable -import org.scalatest.concurrent.Eventually -import org.scalatest.wordspec.AnyWordSpecLike - object ReplicatedEventSourcingSpec { val AllReplicas = Set(ReplicaId("R1"), ReplicaId("R2"), ReplicaId("R3")) diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingTaggingSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingTaggingSpec.scala index 50257807dbc..c1e6f850b73 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingTaggingSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingTaggingSpec.scala @@ -16,6 +16,10 @@ package org.apache.pekko.persistence.typed import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -31,9 +35,6 @@ import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing import pekko.serialization.jackson.CborSerializable import pekko.stream.scaladsl.Sink -import org.scalatest.concurrent.Eventually -import org.scalatest.wordspec.AnyWordSpecLike - object ReplicatedEventSourcingTaggingSpec { val ReplicaId1 = ReplicaId("R1") diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationBaseSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationBaseSpec.scala index 02415370931..bce209bd61f 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationBaseSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationBaseSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.persistence.typed import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } -import pekko.persistence.testkit.{ PersistenceTestKitPlugin, PersistenceTestKitSnapshotPlugin } import org.scalatest.concurrent.Eventually import org.scalatest.wordspec.AnyWordSpecLike +import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } +import pekko.persistence.testkit.{ PersistenceTestKitPlugin, PersistenceTestKitSnapshotPlugin } + object ReplicationBaseSpec { val R1 = ReplicaId("R1") val R2 = ReplicaId("R2") diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationIllegalAccessSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationIllegalAccessSpec.scala index 5f06dc49908..15be8c5e841 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationIllegalAccessSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationIllegalAccessSpec.scala @@ -14,6 +14,10 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } import pekko.actor.typed.{ ActorRef, Behavior } import pekko.persistence.testkit.PersistenceTestKitPlugin @@ -21,9 +25,6 @@ import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal import pekko.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior, ReplicatedEventSourcing } import pekko.serialization.jackson.CborSerializable -import org.scalatest.concurrent.Eventually -import org.scalatest.wordspec.AnyWordSpecLike - object ReplicationIllegalAccessSpec { val R1 = ReplicaId("R1") diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationSnapshotSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationSnapshotSpec.scala index 7165af9d397..c6e45fd8b6e 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationSnapshotSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/ReplicationSnapshotSpec.scala @@ -15,6 +15,10 @@ package org.apache.pekko.persistence.typed import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit } import pekko.actor.typed.{ ActorRef, Behavior } @@ -24,9 +28,6 @@ import pekko.persistence.testkit.scaladsl.{ PersistenceTestKit, SnapshotTestKit import pekko.persistence.typed.internal.{ ReplicatedPublishedEventMetaData, VersionVector } import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing -import org.scalatest.concurrent.Eventually -import org.scalatest.wordspec.AnyWordSpecLike - object ReplicationSnapshotSpec { import ReplicatedEventSourcingSpec._ diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/CounterSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/CounterSpec.scala index 080666d8b68..7b2e7aff4ec 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/CounterSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/CounterSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.crdt import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/LwwSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/LwwSpec.scala index 5ac29f47c43..f45f8205e8d 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/LwwSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/LwwSpec.scala @@ -17,6 +17,7 @@ import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/ORSetSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/ORSetSpec.scala index 00f96346159..923ee74939e 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/ORSetSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/crdt/ORSetSpec.scala @@ -15,9 +15,9 @@ package org.apache.pekko.persistence.typed.crdt import scala.util.Random -import ORSetSpec.ORSetEntity._ - import org.apache.pekko + +import ORSetSpec.ORSetEntity._ import pekko.actor.typed.{ ActorRef, Behavior } import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal import pekko.persistence.typed.{ ReplicaId, ReplicationBaseSpec } diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/jackson/ReplicatedEventSourcingJacksonSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/jackson/ReplicatedEventSourcingJacksonSpec.scala index c89d83d844b..6e7f0419593 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/jackson/ReplicatedEventSourcingJacksonSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/jackson/ReplicatedEventSourcingJacksonSpec.scala @@ -13,17 +13,18 @@ package org.apache.pekko.persistence.typed.jackson +import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import com.fasterxml.jackson.databind.annotation.{ JsonDeserialize, JsonSerialize } -import org.apache.pekko import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit, SerializationTestKit } import pekko.persistence.typed.ReplicaId import pekko.persistence.typed.crdt.{ Counter, LwwTime, ORSet } import pekko.persistence.typed.jackson.ReplicatedEventSourcingJacksonSpec.{ WithCounter, WithLwwTime, WithOrSet } import pekko.serialization.jackson.{ JsonSerializable, PekkoSerializationDeserializer, PekkoSerializationSerializer } -import org.scalatest.wordspec.AnyWordSpecLike - object ReplicatedEventSourcingJacksonSpec { final case class WithLwwTime(lwwTime: LwwTime) extends JsonSerializable final case class WithOrSet( diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorFailureSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorFailureSpec.scala index 45ca777021b..9f9a1f9519f 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorFailureSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorFailureSpec.scala @@ -19,6 +19,12 @@ import scala.concurrent.duration._ import scala.util.Try import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl._ @@ -37,11 +43,6 @@ import pekko.persistence.typed.RecoveryCompleted import pekko.persistence.typed.RecoveryFailed import pekko.persistence.typed.internal.JournalFailureException -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - class ChaosJournal extends InmemJournal { var counts = Map.empty[String, Int] var failRecovery = true diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorInterceptorSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorInterceptorSpec.scala index e52466b7505..fe23901ed34 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorInterceptorSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorInterceptorSpec.scala @@ -16,6 +16,12 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -25,11 +31,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.testkit.PersistenceTestKitPlugin import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object EventSourcedBehaviorInterceptorSpec { val journalId = "event-sourced-behavior-interceptor-spec" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala index b9e9ae21c4f..ba349e53b70 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRecoveryTimeoutSpec.scala @@ -18,6 +18,12 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -28,11 +34,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryFailed import pekko.persistence.typed.internal.JournalFailureException -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object EventSourcedBehaviorRecoveryTimeoutSpec { val journalId = "event-sourced-behavior-recovery-timeout-spec" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorReplySpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorReplySpec.scala index 80c98720c2a..eb25d3506a3 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorReplySpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorReplySpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef @@ -26,8 +29,6 @@ import pekko.persistence.testkit.PersistenceTestKitPlugin import pekko.persistence.typed.PersistenceId import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - object EventSourcedBehaviorReplySpec { sealed trait Command[ReplyMessage] extends CborSerializable diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionOnlyOneSnapshotSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionOnlyOneSnapshotSpec.scala index c814e483835..a6cd549380d 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionOnlyOneSnapshotSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionOnlyOneSnapshotSpec.scala @@ -19,6 +19,11 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.testkit.PersistenceTestKitPlugin @@ -27,10 +32,6 @@ import pekko.persistence.typed.DeleteEventsCompleted import pekko.persistence.typed.EventSourcedSignal import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventSourcedBehaviorRetentionOnlyOneSnapshotSpec { private val config = ConfigFactory.parseString(s""" ${PersistenceTestKitSnapshotPlugin.PluginId} { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionSpec.scala index c4d5945cd1e..ee00129ee04 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorRetentionSpec.scala @@ -21,6 +21,10 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -40,9 +44,6 @@ import pekko.persistence.typed.SnapshotFailed import pekko.persistence.typed.SnapshotSelectionCriteria import pekko.serialization.jackson.CborSerializable -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - object EventSourcedBehaviorRetentionSpec extends Matchers { sealed trait Command extends CborSerializable diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSignalSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSignalSpec.scala index bb0421986c5..c38201cd472 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSignalSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSignalSpec.scala @@ -23,6 +23,12 @@ import scala.concurrent.duration._ import scala.util.Try import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef @@ -35,11 +41,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryCompleted import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - // Custom journal that checks event flags to determine whether to reject or fail writes class SignalTestJournal extends InmemJournal { override def asyncWriteMessages(messages: immutable.Seq[AtomicWrite]): Future[immutable.Seq[Try[Unit]]] = { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSpec.scala index 0a65ea96455..5356537275f 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorSpec.scala @@ -24,6 +24,12 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.ActorInitializationException import pekko.actor.testkit.typed.TestException @@ -55,11 +61,6 @@ import pekko.persistence.typed.SnapshotSelectionCriteria import pekko.serialization.jackson.CborSerializable import pekko.stream.scaladsl.Sink -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object EventSourcedBehaviorSpec { class SlowInMemorySnapshotStore extends SnapshotStore { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorStashSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorStashSpec.scala index 25477a51628..39bebcd0de0 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorStashSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorStashSpec.scala @@ -20,6 +20,12 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.actor.Dropped import pekko.actor.UnhandledMessage @@ -37,11 +43,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryCompleted -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object EventSourcedBehaviorStashSpec { def conf: Config = ConfigFactory.parseString(s""" #pekko.loglevel = DEBUG diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorTimersSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorTimersSpec.scala index 09620e01f79..6fc1727751d 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorTimersSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorTimersSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -25,8 +28,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.testkit.PersistenceTestKitPlugin import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - object EventSourcedBehaviorTimersSpec { val journalId = "event-sourced-behavior-timers-spec" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorWatchSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorWatchSpec.scala index 48364c644b4..1ef9f022419 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorWatchSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehaviorWatchSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import org.slf4j.LoggerFactory + import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -37,10 +42,6 @@ import pekko.persistence.typed.internal.StashState import pekko.serialization.jackson.CborSerializable import pekko.util.ConstantFun -import org.scalatest.wordspec.AnyWordSpecLike - -import org.slf4j.LoggerFactory - object EventSourcedBehaviorWatchSpec { sealed trait Command extends CborSerializable case object Fail extends Command diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedEventAdapterSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedEventAdapterSpec.scala index 46cb73542b8..a08926e82cd 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedEventAdapterSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedEventAdapterSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -33,10 +38,6 @@ import pekko.serialization.jackson.CborSerializable import pekko.stream.scaladsl.Sink import pekko.testkit.JavaSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventSourcedEventAdapterSpec { case class Wrapper(event: String) extends CborSerializable diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSequenceNumberSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSequenceNumberSpec.scala index 73d0516e99b..d9795240036 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSequenceNumberSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSequenceNumberSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -23,10 +28,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryCompleted -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object EventSourcedSequenceNumberSpec { private val conf = ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSnapshotAdapterSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSnapshotAdapterSpec.scala index 1c94f1193dd..58957ff7e78 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSnapshotAdapterSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedSnapshotAdapterSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -28,8 +31,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.SnapshotAdapter import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - object EventSourcedSnapshotAdapterSpec { case class State(s: String) extends CborSerializable diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala index 636f15d45aa..83896dcc5c2 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedStashOverflowSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.persistence.typed.scaladsl import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -25,10 +30,6 @@ import pekko.actor.typed.scaladsl.adapter._ import pekko.persistence.journal.SteppingInmemJournal import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - // Reproducer for #29401 object EventSourcedStashOverflowSpec { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/LoggerSourceSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/LoggerSourceSpec.scala index a007e2b7cd5..f771acb0b25 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/LoggerSourceSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/LoggerSourceSpec.scala @@ -15,6 +15,11 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import org.slf4j.event.Level + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -25,10 +30,6 @@ import pekko.persistence.typed.RecoveryCompleted import pekko.persistence.typed.SnapshotCompleted import pekko.persistence.typed.SnapshotFailed -import org.scalatest.wordspec.AnyWordSpecLike - -import org.slf4j.event.Level - // Note that the spec name here is important since there are heuristics in place to avoid names // starting with EventSourcedBehavior class LoggerSourceSpec diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/NullEmptyStateSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/NullEmptyStateSpec.scala index d55d4e3305c..6407a264731 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/NullEmptyStateSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/NullEmptyStateSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef @@ -21,10 +26,6 @@ import pekko.actor.typed.Behavior import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryCompleted -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object NullEmptyStateSpec { private val conf = ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/OptionalSnapshotStoreSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/OptionalSnapshotStoreSpec.scala index b4dd5ca5e7b..cd69a5a5c83 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/OptionalSnapshotStoreSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/OptionalSnapshotStoreSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.UUID import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -24,8 +27,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - object OptionalSnapshotStoreSpec { sealed trait Command extends CborSerializable diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PerformanceSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PerformanceSpec.scala index a5057e1411c..70eae12b86d 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PerformanceSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PerformanceSpec.scala @@ -18,6 +18,11 @@ import java.util.UUID import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.TestException import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -31,10 +36,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryCompleted import pekko.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object PerformanceSpec { val config = diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PrimitiveStateSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PrimitiveStateSpec.scala index 3c3a30758fb..1a952029044 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PrimitiveStateSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PrimitiveStateSpec.scala @@ -14,16 +14,17 @@ package org.apache.pekko.persistence.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.RecoveryCompleted -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object PrimitiveStateSpec { private val conf = ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SlowInMemorySnapshotStore.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SlowInMemorySnapshotStore.scala index 424c0b405ac..adcb70ab19d 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SlowInMemorySnapshotStore.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SlowInMemorySnapshotStore.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.scaladsl import scala.concurrent.Future import org.apache.pekko + import pekko.persistence.{ SnapshotMetadata => ClassicSnapshotMetadata } import pekko.persistence.{ SnapshotSelectionCriteria => ClassicSnapshotSelectionCriteria } import pekko.persistence.SelectedSnapshot diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotMutableStateSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotMutableStateSpec.scala index 23727ddcaa5..eebf7052814 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotMutableStateSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotMutableStateSpec.scala @@ -16,6 +16,12 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -25,11 +31,6 @@ import pekko.persistence.typed.SnapshotCompleted import pekko.persistence.typed.SnapshotFailed import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SnapshotMutableStateSpec { def conf: Config = PersistenceTestKitPlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotRecoveryWithEmptyJournalSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotRecoveryWithEmptyJournalSpec.scala index 272ea65be05..3736cb3dce8 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotRecoveryWithEmptyJournalSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotRecoveryWithEmptyJournalSpec.scala @@ -16,9 +16,15 @@ package org.apache.pekko.persistence.typed.scaladsl import java.io.File import java.util.UUID +import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.ActorRef @@ -30,11 +36,6 @@ import pekko.persistence.typed.PersistenceId import pekko.serialization.Serialization import pekko.serialization.SerializationExtension -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SnapshotRecoveryWithEmptyJournalSpec { val survivingSnapshotPath = s"target/survivingSnapshotPath-${UUID.randomUUID().toString}" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorInterceptorSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorInterceptorSpec.scala index 249c68be288..14d691ba20e 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorInterceptorSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorInterceptorSpec.scala @@ -16,6 +16,12 @@ package org.apache.pekko.persistence.typed.state.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -25,11 +31,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableStateBehaviorInterceptorSpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorReplySpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorReplySpec.scala index 109249cb234..79d2c9425dc 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorReplySpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorReplySpec.scala @@ -16,6 +16,12 @@ package org.apache.pekko.persistence.typed.state.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef @@ -26,11 +32,6 @@ import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.persistence.typed.PersistenceId import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableStateBehaviorReplySpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" pekko.loglevel = INFO diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorSpec.scala index bc33a87e0aa..7e7891e3b8f 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorSpec.scala @@ -16,6 +16,12 @@ package org.apache.pekko.persistence.typed.state.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl._ @@ -24,11 +30,6 @@ import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.persistence.typed.PersistenceId import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableStateBehaviorSpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorStashOverflowSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorStashOverflowSpec.scala index 64866b40c85..4da1df72a3c 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorStashOverflowSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorStashOverflowSpec.scala @@ -13,10 +13,15 @@ package org.apache.pekko.persistence.typed.state.scaladsl -import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Future, Promise } import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -27,10 +32,6 @@ import pekko.persistence.state.javadsl.{ DurableStateStore => JDurableStateStore import pekko.persistence.state.scaladsl.{ DurableStateStore, DurableStateUpdateStore, GetObjectResult } import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object DurableStateBehaviorStashOverflowSpec { class TestDurableStateStoreProvider extends DurableStateStoreProvider { diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorTimersSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorTimersSpec.scala index 8730dda213e..1e1d3db04f0 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorTimersSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehaviorTimersSpec.scala @@ -18,6 +18,12 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.Behavior @@ -25,11 +31,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableStateBehaviorTimersSpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateRevisionSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateRevisionSpec.scala index f02d907114d..48d36e55a94 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateRevisionSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateRevisionSpec.scala @@ -14,6 +14,12 @@ package org.apache.pekko.persistence.typed.state.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.Dropped import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.LoggingTestKit @@ -27,11 +33,6 @@ import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.state.RecoveryCompleted -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object DurableStateRevisionSpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/NullEmptyStateSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/NullEmptyStateSpec.scala index b00b60c8fef..1a5921883b1 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/NullEmptyStateSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/NullEmptyStateSpec.scala @@ -14,6 +14,12 @@ package org.apache.pekko.persistence.typed.state.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.TestKitSettings import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef @@ -21,11 +27,6 @@ import pekko.actor.typed.Behavior import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object NullEmptyStateSpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/PrimitiveStateSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/PrimitiveStateSpec.scala index 7bd7689a229..2fb40621bdd 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/PrimitiveStateSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/PrimitiveStateSpec.scala @@ -14,17 +14,18 @@ package org.apache.pekko.persistence.typed.state.scaladsl import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl._ -import pekko.actor.typed.ActorRef -import pekko.actor.typed.Behavior -import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin -import pekko.persistence.typed.PersistenceId import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import pekko.actor.testkit.typed.scaladsl._ +import pekko.actor.typed.ActorRef +import pekko.actor.typed.Behavior +import pekko.persistence.testkit.PersistenceTestKitDurableStateStorePlugin +import pekko.persistence.typed.PersistenceId + object PrimitiveStateSpec { def conf: Config = PersistenceTestKitDurableStateStorePlugin.config.withFallback(ConfigFactory.parseString(s""" diff --git a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/RuntimeDurableStateStoreSpec.scala b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/RuntimeDurableStateStoreSpec.scala index 4dc4bdb9e48..caecccfec83 100644 --- a/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/RuntimeDurableStateStoreSpec.scala +++ b/persistence-typed-tests/src/test/scala/org/apache/pekko/persistence/typed/state/scaladsl/RuntimeDurableStateStoreSpec.scala @@ -18,6 +18,12 @@ package org.apache.pekko.persistence.typed.state.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -28,10 +34,6 @@ import pekko.persistence.state.scaladsl.DurableStateUpdateStore import pekko.persistence.testkit.state.PersistenceTestKitDurableStateStoreProvider import pekko.persistence.typed.PersistenceId -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory -import org.scalatest.wordspec.AnyWordSpecLike - object RuntimeDurableStateStoreSpec { private object Actor { diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventAdapter.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventAdapter.scala index 6d9c9fc643d..106d5e1a99e 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventAdapter.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventAdapter.scala @@ -17,6 +17,7 @@ import scala.annotation.varargs import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventSourcedSignal.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventSourcedSignal.scala index 529bdeeb69d..7af86639ff0 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventSourcedSignal.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/EventSourcedSignal.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + import pekko.actor.typed.Signal import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PublishedEvent.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PublishedEvent.scala index 6131f706a41..3dedbc86e76 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PublishedEvent.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PublishedEvent.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed import java.util.Optional import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.persistence.typed.internal.ReplicatedPublishedEventMetaData diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/SnapshotSelectionCriteria.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/SnapshotSelectionCriteria.scala index 6d527add158..27dc593319a 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/SnapshotSelectionCriteria.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/SnapshotSelectionCriteria.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.{ SnapshotSelectionCriteria => ClassicSnapshotSelectionCriteria } import pekko.util.HashCode diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala index 938d4f7b856..d34ec8b2883 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala @@ -17,6 +17,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.ReplicaId import pekko.persistence.typed.crdt.ORSet.DeltaOp diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueue.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueue.scala index 5220f499237..a9eb2825d1c 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueue.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueue.scala @@ -19,6 +19,9 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior import pekko.actor.typed.SupervisorStrategy @@ -32,8 +35,6 @@ import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior import pekko.persistence.typed.scaladsl.RetentionCriteria -import com.typesafe.config.Config - /** * [[pekko.actor.typed.delivery.DurableProducerQueue]] that can be used with [[pekko.actor.typed.delivery.ProducerController]] * for reliable delivery of messages. It is implemented with Event Sourcing and stores one diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala index 53564c26072..2bf166c69b5 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala @@ -18,6 +18,12 @@ import scala.concurrent.duration.FiniteDuration import scala.util.control.NonFatal import org.apache.pekko + +import org.slf4j.Logger +import org.slf4j.MDC + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorRef => ClassicActorRef } import pekko.actor.Cancellable import pekko.actor.typed.Signal @@ -34,11 +40,6 @@ import pekko.persistence.typed.scaladsl.RetentionCriteria import pekko.util.Helpers.ConfigOps import pekko.util.OptionVal -import org.slf4j.Logger -import org.slf4j.MDC - -import com.typesafe.config.ConfigFactory - /** * INTERNAL API */ diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EffectImpl.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EffectImpl.scala index 24244c60320..f805ea8a354 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EffectImpl.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EffectImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.internal import scala.collection.immutable import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi import pekko.persistence.typed.javadsl diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala index 494ee17d4ad..790d17ebbec 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala @@ -20,6 +20,11 @@ import java.util.concurrent.atomic.AtomicInteger import scala.annotation.nowarn import org.apache.pekko + +import org.slf4j.LoggerFactory + +import com.typesafe.config.Config + import pekko.Done import pekko.actor.typed import pekko.actor.typed.ActorRef @@ -57,10 +62,6 @@ import pekko.persistence.typed.scaladsl.{ Recovery => TypedRecovery } import pekko.persistence.typed.scaladsl.RetentionCriteria import pekko.util.ConstantFun -import org.slf4j.LoggerFactory - -import com.typesafe.config.Config - @InternalApi private[pekko] object EventSourcedBehaviorImpl { diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala index 58901e017ac..29579d82dcc 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala @@ -14,12 +14,13 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.annotation.InternalApi import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala index 10f8b6e4977..56542495983 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.typed.Behavior import pekko.actor.typed.PostStop diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/FastForwardingFilter.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/FastForwardingFilter.scala index 42ce75e8908..c304a13e384 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/FastForwardingFilter.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/FastForwardingFilter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.query.EventEnvelope import pekko.stream.Attributes diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/JournalFailureException.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/JournalFailureException.scala index 3b7a077941b..2ca9d943e86 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/JournalFailureException.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/JournalFailureException.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.PersistenceId diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/NoOpSnapshotAdapter.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/NoOpSnapshotAdapter.scala index fc3e5f9a17f..1013ed41b23 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/NoOpSnapshotAdapter.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/NoOpSnapshotAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.SnapshotAdapter diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RecoveryImpl.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RecoveryImpl.scala index 142684c05e7..cbdcc7159c6 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RecoveryImpl.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RecoveryImpl.scala @@ -14,8 +14,9 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.annotation.InternalApi -import pekko.persistence.typed.{ javadsl, scaladsl, SnapshotSelectionCriteria } +import pekko.persistence.typed.{ SnapshotSelectionCriteria, javadsl, scaladsl } /** * INTERNAL API diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala index db902d9bb6b..210e2973a54 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.typed.{ Behavior, Signal } import pekko.actor.typed.internal.PoisonPill import pekko.actor.typed.internal.UnstashException diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala index 21342625411..5efe42130ec 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.internal import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.internal.PoisonPill import pekko.actor.typed.scaladsl.{ ActorContext, Behaviors } diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplicationSetup.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplicationSetup.scala index 4bbce5ef25a..568a5dd181e 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplicationSetup.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplicationSetup.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.internal import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.ReplicaId diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala index 4f00e28cfe5..6a9613d10f7 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.internal import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.internal.PoisonPill import pekko.actor.typed.scaladsl.{ ActorContext, Behaviors } diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaImpl.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaImpl.scala index a07935e4328..74162af7e70 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaImpl.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.javadsl import pekko.persistence.typed.scaladsl diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala index 0b8f4bd3422..dcadb7ce5ae 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala @@ -24,6 +24,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.actor.UnhandledMessage import pekko.actor.typed.{ Behavior, Signal } import pekko.actor.typed.eventstream.EventStream diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/SideEffect.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/SideEffect.scala index 187867f3f87..ecfa126576d 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/SideEffect.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/SideEffect.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala index 8a1d917f979..1338905bb7c 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko + import pekko.actor.Dropped import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.ActorContext diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala index 457cc76efd7..000eb8657af 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala @@ -19,6 +19,7 @@ import java.util.function.{ BiFunction, Function => JFunction, Predicate, Suppli import scala.jdk.FunctionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.internal._ import pekko.util.OptionVal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala index 7d3274ea92a..85c56521e05 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala @@ -19,6 +19,7 @@ import java.util.function.{ BiFunction, Function => JFunction, Predicate, Suppli import scala.jdk.FunctionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.internal._ import pekko.util.OptionVal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Effect.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Effect.scala index e3cbd48ff51..acab9dbedbb 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Effect.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Effect.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.javadsl import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala index 271fae6468a..a196403ca8e 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala @@ -19,6 +19,7 @@ import java.util.function.{ BiFunction, Function => JFunction, Predicate, Suppli import scala.jdk.FunctionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.OptionVal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala index 400c1f4816c..de51aa41c49 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala @@ -19,9 +19,12 @@ import java.util.Optional import scala.annotation.nowarn import scala.jdk.OptionConverters._ +import org.apache.pekko + +import com.typesafe.config.Config + import org.jspecify.annotations.Nullable -import org.apache.pekko import pekko.actor.typed import pekko.actor.typed.BackoffSupervisorStrategy import pekko.actor.typed.Behavior @@ -32,8 +35,6 @@ import pekko.persistence.typed._ import pekko.persistence.typed.EventAdapter import pekko.persistence.typed.internal._ -import com.typesafe.config.Config - abstract class EventSourcedBehavior[Command, Event, State] private[pekko] ( val persistenceId: PersistenceId, onPersistFailure: Optional[BackoffSupervisorStrategy]) diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/PersistentFSMMigration.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/PersistentFSMMigration.scala index 0d6266bf381..86b4386c2c9 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/PersistentFSMMigration.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/PersistentFSMMigration.scala @@ -20,6 +20,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.japi.function.Function3 import pekko.persistence.typed.SnapshotAdapter diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Recovery.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Recovery.scala index f829b425eed..6ec1cc0b7d0 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Recovery.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Recovery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.javadsl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.SnapshotSelectionCriteria import pekko.persistence.typed.internal.{ DefaultRecovery, DisabledRecovery, RecoveryWithSnapshotSelectionCriteria } diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcedBehavior.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcedBehavior.scala index 74e890afbda..102ce532f40 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcedBehavior.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcedBehavior.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.javadsl import java.util.Optional import org.apache.pekko + import pekko.actor.typed.BackoffSupervisorStrategy import pekko.actor.typed.Behavior import pekko.actor.typed.TypedActorContext diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcing.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcing.scala index 19eddb78863..fb6ce7f030e 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcing.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/ReplicatedEventSourcing.scala @@ -13,13 +13,14 @@ package org.apache.pekko.persistence.typed.javadsl +import java.util.function.{ Function => JFunction } import java.util.{ Map => JMap } import java.util.{ Set => JSet } -import java.util.function.{ Function => JFunction } import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.ReplicaId diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/RetentionCriteria.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/RetentionCriteria.scala index 4f5dc266444..433f646d8bb 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/RetentionCriteria.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/RetentionCriteria.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.javadsl import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.persistence.typed.internal.DisabledRetentionCriteria import pekko.persistence.typed.internal.SnapshotCountRetentionCriteriaImpl diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala index ccc220976eb..0298b10eda2 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala @@ -17,6 +17,7 @@ import java.util.function.BiConsumer import java.util.function.Consumer import org.apache.pekko + import pekko.actor.typed.Signal import pekko.annotation.InternalApi diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Effect.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Effect.scala index 900145414bd..e72613dae81 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Effect.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Effect.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.scaladsl import scala.collection.{ immutable => im } import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.DoNotInherit import pekko.persistence.typed.internal._ diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehavior.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehavior.scala index e974d00ab99..f6deb85529a 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehavior.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehavior.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.typed.scaladsl import scala.annotation.tailrec import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.BackoffSupervisorStrategy import pekko.actor.typed.Behavior import pekko.actor.typed.Signal @@ -31,8 +34,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.SnapshotAdapter import pekko.persistence.typed.internal._ -import com.typesafe.config.Config - object EventSourcedBehavior { /** diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentFSMMigration.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentFSMMigration.scala index 1cbf6197010..9fdf3ac6dd1 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentFSMMigration.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentFSMMigration.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.scaladsl import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.persistence.fsm.PersistentFSM.PersistentFSMSnapshot import pekko.persistence.typed.SnapshotAdapter diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Recovery.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Recovery.scala index 26c757c588a..f0136bd9441 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Recovery.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/Recovery.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.scaladsl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.SnapshotSelectionCriteria import pekko.persistence.typed.internal.{ DefaultRecovery, DisabledRecovery, RecoveryWithSnapshotSelectionCriteria } diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/ReplicatedEventSourcing.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/ReplicatedEventSourcing.scala index bed846ac938..0db565c1e59 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/ReplicatedEventSourcing.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/ReplicatedEventSourcing.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.scaladsl import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.annotation.InternalStableApi import pekko.persistence.typed.PersistenceId diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/RetentionCriteria.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/RetentionCriteria.scala index a908afa4a1f..48deaa23928 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/RetentionCriteria.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/RetentionCriteria.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.scaladsl import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.persistence.typed.internal.DisabledRetentionCriteria import pekko.persistence.typed.internal.SnapshotCountRetentionCriteriaImpl diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala index f4c30fa1a3d..a311d3e71f6 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala @@ -13,15 +13,16 @@ package org.apache.pekko.persistence.typed.serialization -import java.{ lang => jl } import java.io.NotSerializableException import java.util.{ ArrayList, Collections, Comparator } +import java.{ lang => jl } import scala.annotation.tailrec import scala.collection.immutable.TreeMap import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.actor.typed.ActorRefResolver import pekko.actor.typed.scaladsl.adapter.ClassicActorSystemOps diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/DurableStateSignal.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/DurableStateSignal.scala index f770bad017f..8a5c1397127 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/DurableStateSignal.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/DurableStateSignal.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state import org.apache.pekko + import pekko.actor.typed.Signal import pekko.annotation.DoNotInherit diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/BehaviorSetup.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/BehaviorSetup.scala index 332bc62e258..3aaf5feeb03 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/BehaviorSetup.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/BehaviorSetup.scala @@ -16,6 +16,12 @@ package org.apache.pekko.persistence.typed.state.internal import scala.util.control.NonFatal import org.apache.pekko + +import org.slf4j.Logger +import org.slf4j.MDC + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorRef => ClassicActorRef } import pekko.actor.Cancellable import pekko.actor.typed.Signal @@ -30,11 +36,6 @@ import pekko.persistence.typed.state.internal.InternalProtocol.RecoveryTimeout import pekko.persistence.typed.state.scaladsl.DurableStateBehavior import pekko.util.OptionVal -import com.typesafe.config.ConfigFactory - -import org.slf4j.Logger -import org.slf4j.MDC - /** * INTERNAL API: Carry state for the `DurableStateBehavior` implementation behaviors. */ diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala index bb6662d07d1..bc5b9b7149f 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala @@ -16,6 +16,11 @@ package org.apache.pekko.persistence.typed.state.internal import scala.annotation.nowarn import org.apache.pekko + +import org.slf4j.LoggerFactory + +import com.typesafe.config.Config + import pekko.actor.typed import pekko.actor.typed.ActorRef import pekko.actor.typed.BackoffSupervisorStrategy @@ -35,10 +40,6 @@ import pekko.persistence.typed.PersistenceId import pekko.persistence.typed.SnapshotAdapter import pekko.persistence.typed.state.scaladsl._ -import com.typesafe.config.Config - -import org.slf4j.LoggerFactory - @InternalApi private[pekko] object DurableStateBehaviorImpl { diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateSettings.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateSettings.scala index 5b12bfd6469..966c8889547 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateSettings.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateSettings.scala @@ -15,17 +15,18 @@ package org.apache.pekko.persistence.typed.state.internal import java.util.concurrent.TimeUnit -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.typed.ActorSystem import pekko.annotation.InternalApi import pekko.persistence.Persistence import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreException.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreException.scala index 5f0dcfbcf12..e0cfd90db7a 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreException.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreException.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.state.exception.DurableStateException import pekko.persistence.typed.PersistenceId diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreInteractions.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreInteractions.scala index 18b75e64169..51df8e6dabf 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreInteractions.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreInteractions.scala @@ -18,6 +18,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.Done import pekko.actor.typed.Behavior import pekko.actor.typed.PostStop diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/EffectImpl.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/EffectImpl.scala index 4b6a508ecaa..0d2c9fc2339 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/EffectImpl.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/EffectImpl.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.state.internal import scala.collection.immutable import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi import pekko.persistence.typed.state.javadsl diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/NoOpSnapshotAdapter.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/NoOpSnapshotAdapter.scala index d37755778ff..f4c4e833038 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/NoOpSnapshotAdapter.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/NoOpSnapshotAdapter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state.internal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.SnapshotAdapter diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala index a81a6668991..fcccefbc3b7 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.Signal import pekko.actor.typed.internal.PoisonPill diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/RequestingRecoveryPermit.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/RequestingRecoveryPermit.scala index 3bae69c202d..cf2345a8fba 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/RequestingRecoveryPermit.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/RequestingRecoveryPermit.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.typed.state.internal import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.typed.Behavior import pekko.actor.typed.internal.PoisonPill import pekko.actor.typed.scaladsl.{ ActorContext, Behaviors } diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala index 7d8d005acf6..0490111ccfa 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala @@ -18,6 +18,7 @@ import scala.annotation.tailrec import scala.collection.immutable import org.apache.pekko + import pekko.actor.UnhandledMessage import pekko.actor.typed.Behavior import pekko.actor.typed.Signal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/SideEffect.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/SideEffect.scala index fee443a1ba8..5c0d3a15e6f 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/SideEffect.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/SideEffect.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state.internal import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.InternalApi diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala index 6f09122e43a..c467b66fb28 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state.internal import org.apache.pekko + import pekko.actor.Dropped import pekko.actor.typed.Behavior import pekko.actor.typed.scaladsl.ActorContext diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala index 571330bfb69..0a42367b6e4 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala @@ -14,14 +14,15 @@ package org.apache.pekko.persistence.typed.state.javadsl import java.util.Objects -import java.util.function.{ Function => JFunction } import java.util.function.BiFunction import java.util.function.Predicate import java.util.function.Supplier +import java.util.function.{ Function => JFunction } import scala.jdk.FunctionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.state.internal._ import pekko.util.OptionVal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala index 5907be2b4ca..25245ec187c 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala @@ -14,14 +14,15 @@ package org.apache.pekko.persistence.typed.state.javadsl import java.util.Objects -import java.util.function.{ Function => JFunction } import java.util.function.BiFunction import java.util.function.Predicate import java.util.function.Supplier +import java.util.function.{ Function => JFunction } import scala.jdk.FunctionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.persistence.typed.state.internal._ import pekko.util.OptionVal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala index b94ae192593..a510c7a5450 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala @@ -15,9 +15,14 @@ package org.apache.pekko.persistence.typed.state.javadsl import java.util.Optional -import org.jspecify.annotations.Nullable +import scala.jdk.OptionConverters._ import org.apache.pekko + +import com.typesafe.config.Config + +import org.jspecify.annotations.Nullable + import pekko.actor.typed import pekko.actor.typed.BackoffSupervisorStrategy import pekko.actor.typed.Behavior @@ -31,10 +36,6 @@ import pekko.persistence.typed.state.internal import pekko.persistence.typed.state.internal._ import pekko.persistence.typed.state.scaladsl -import scala.jdk.OptionConverters._ - -import com.typesafe.config.Config - /** * A `Behavior` for a persistent actor with durable storage of its state. * diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/Effect.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/Effect.scala index 95369627acf..bf0fa5fb82a 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/Effect.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/Effect.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state.javadsl import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.ApiMayChange import pekko.annotation.DoNotInherit diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/SignalHandler.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/SignalHandler.scala index 427decb0716..a8cb077ba89 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/SignalHandler.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/SignalHandler.scala @@ -17,6 +17,7 @@ import java.util.function.BiConsumer import java.util.function.Consumer import org.apache.pekko + import pekko.actor.typed.Signal import pekko.annotation.InternalApi diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehavior.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehavior.scala index 3a014744bfd..029a3681a01 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehavior.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehavior.scala @@ -15,9 +15,10 @@ package org.apache.pekko.persistence.typed.state.scaladsl import scala.annotation.tailrec +import org.apache.pekko + import com.typesafe.config.Config -import org.apache.pekko import pekko.actor.typed.BackoffSupervisorStrategy import pekko.actor.typed.Behavior import pekko.actor.typed.Signal diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/Effect.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/Effect.scala index 90e0bae0a00..65c30ca4092 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/Effect.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/Effect.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.typed.state.scaladsl import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.annotation.ApiMayChange import pekko.annotation.DoNotInherit diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ClusterSingletonPersistenceSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ClusterSingletonPersistenceSpec.scala index fd93908bad7..c311eb32d1c 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ClusterSingletonPersistenceSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ClusterSingletonPersistenceSpec.scala @@ -14,6 +14,11 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -26,10 +31,6 @@ import pekko.cluster.typed.SingletonActor import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ClusterSingletonPersistenceSpec { val config = ConfigFactory.parseString(""" pekko.actor.provider = cluster diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ManyRecoveriesSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ManyRecoveriesSpec.scala index 2da271e8ace..531e897fab9 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ManyRecoveriesSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ManyRecoveriesSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -26,8 +29,6 @@ import pekko.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior } import pekko.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler import pekko.testkit.TestLatch -import org.scalatest.wordspec.AnyWordSpecLike - object ManyRecoveriesSpec { sealed case class Cmd(s: String) diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSerializationSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSerializationSpec.scala index c048cf1453a..b85445826e5 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSerializationSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/ReplicatedEventSourcingSerializationSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.typed import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.persistence.typed.crdt.Counter @@ -22,8 +25,6 @@ import pekko.persistence.typed.internal.ReplicatedEventMetadata import pekko.persistence.typed.internal.ReplicatedSnapshotMetadata import pekko.persistence.typed.internal.VersionVector -import org.scalatest.wordspec.AnyWordSpecLike - class ReplicatedEventSourcingSerializationSpec extends ScalaTestWithActorTestKit(ClusterSingletonPersistenceSpec.config) with AnyWordSpecLike diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/StashingWhenSnapshottingSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/StashingWhenSnapshottingSpec.scala index a47d75b3ceb..7d88f6fa8c3 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/StashingWhenSnapshottingSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/StashingWhenSnapshottingSpec.scala @@ -20,6 +20,11 @@ import scala.concurrent.Promise import scala.util.Success import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -34,10 +39,6 @@ import pekko.persistence.typed.StashingWhenSnapshottingSpec.ControllableSnapshot import pekko.persistence.typed.scaladsl.Effect import pekko.persistence.typed.scaladsl.EventSourcedBehavior -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object StashingWhenSnapshottingSpec { object ControllableSnapshotStoreExt extends ExtensionId[ControllableSnapshotStoreExt] { diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueueSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueueSpec.scala index 795e7391114..9dfdaddd261 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueueSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueueSpec.scala @@ -19,6 +19,12 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.delivery.DurableProducerQueue.Confirmed import pekko.actor.typed.delivery.DurableProducerQueue.LoadState @@ -32,11 +38,6 @@ import pekko.actor.typed.eventstream.EventStream import pekko.persistence.journal.inmem.InmemJournal import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object EventSourcedProducerQueueSpec { def conf: Config = ConfigFactory.parseString(s""" diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/ReliableDeliveryWithEventSourcedProducerQueueSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/ReliableDeliveryWithEventSourcedProducerQueueSpec.scala index 40349fe997a..9f4b5fbf444 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/ReliableDeliveryWithEventSourcedProducerQueueSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/ReliableDeliveryWithEventSourcedProducerQueueSpec.scala @@ -19,17 +19,18 @@ import scala.concurrent.duration._ import scala.util.Try import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl._ -import pekko.actor.typed.ActorRef -import pekko.actor.typed.delivery.ConsumerController -import pekko.actor.typed.delivery.ProducerController -import pekko.persistence.typed.PersistenceId import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import pekko.actor.testkit.typed.scaladsl._ +import pekko.actor.typed.ActorRef +import pekko.actor.typed.delivery.ConsumerController +import pekko.actor.typed.delivery.ProducerController +import pekko.persistence.typed.PersistenceId + object ReliableDeliveryWithEventSourcedProducerQueueSpec { def conf: Config = ConfigFactory.parseString(s""" diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/WorkPullingWithEventSourcedProducerQueueSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/WorkPullingWithEventSourcedProducerQueueSpec.scala index ca428d4c452..238832d9028 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/WorkPullingWithEventSourcedProducerQueueSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/delivery/WorkPullingWithEventSourcedProducerQueueSpec.scala @@ -19,6 +19,12 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.testkit.typed.FishingOutcome import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.delivery.ConsumerController @@ -26,11 +32,6 @@ import pekko.actor.typed.delivery.WorkPullingProducerController import pekko.actor.typed.receptionist.ServiceKey import pekko.persistence.typed.PersistenceId -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object WorkPullingWithEventSourcedProducerQueueSpec { def conf: Config = ConfigFactory.parseString(s""" diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RecoveryPermitterSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RecoveryPermitterSpec.scala index 6eae8d0fd4f..674cdcac0bd 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RecoveryPermitterSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RecoveryPermitterSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.ActorSystem import pekko.actor.PoisonPill import pekko.actor.testkit.typed.scaladsl.LogCapturing @@ -33,8 +36,6 @@ import pekko.persistence.typed.RecoveryCompleted import pekko.persistence.typed.scaladsl.{ Effect, EventSourcedBehavior } import pekko.persistence.typed.scaladsl.EventSourcedBehavior.CommandHandler -import org.scalatest.wordspec.AnyWordSpecLike - object RecoveryPermitterSpec { class TE extends RuntimeException("Boom!") with NoStackTrace diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaSpec.scala index 93207a459df..60cc8467060 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/RetentionCriteriaSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.persistence.typed.internal import org.apache.pekko -import pekko.actor.testkit.typed.scaladsl.LogCapturing -import pekko.persistence.typed.scaladsl.RetentionCriteria import org.scalatest.TestSuite import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike +import pekko.actor.testkit.typed.scaladsl.LogCapturing +import pekko.persistence.typed.scaladsl.RetentionCriteria + class RetentionCriteriaSpec extends TestSuite with Matchers with AnyWordSpecLike with LogCapturing { "RetentionCriteria" must { diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/StashStateSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/StashStateSpec.scala index 63faa0aae36..215bf44dd9e 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/StashStateSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/internal/StashStateSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.persistence.typed.internal import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.testkit.typed.scaladsl.TestProbe @@ -24,8 +27,6 @@ import pekko.actor.typed.scaladsl.Behaviors import pekko.persistence.typed.internal.InternalProtocol.IncomingCommand import pekko.persistence.typed.internal.InternalProtocol.RecoveryPermitGranted -import org.scalatest.wordspec.AnyWordSpecLike - class StashStateSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "StashState" should { diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala index 6dab33570fa..0297d174f27 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/PersistentActorCompileOnlyTest.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorSystem import pekko.actor.typed.Behavior diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotIsOptionalSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotIsOptionalSpec.scala index 80fb4894417..a5d480b2dc8 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotIsOptionalSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/scaladsl/SnapshotIsOptionalSpec.scala @@ -16,20 +16,21 @@ package org.apache.pekko.persistence.typed.scaladsl import java.util.UUID import java.util.concurrent.atomic.AtomicInteger +import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import com.fasterxml.jackson.annotation.JsonCreator -import org.apache.pekko import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.ActorRef import pekko.persistence.typed.PersistenceId import pekko.serialization.jackson.CborSerializable -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SnapshotIsOptionalSpec { private val conf: Config = ConfigFactory.parseString(s""" pekko.persistence.journal.plugin = "pekko.persistence.journal.inmem" diff --git a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializerSpec.scala b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializerSpec.scala index 8b3c76f940d..5c73af9fde1 100644 --- a/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializerSpec.scala +++ b/persistence-typed/src/test/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializerSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.persistence.typed.serialization import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.persistence.typed.PersistenceId @@ -24,8 +27,6 @@ import pekko.persistence.typed.internal.PublishedEventImpl import pekko.persistence.typed.internal.ReplicatedPublishedEventMetaData import pekko.persistence.typed.internal.VersionVector -import org.scalatest.wordspec.AnyWordSpecLike - class ReplicatedEventSourcingSerializerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "ReplicatedEventSourcingSerializer" should { diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/AtLeastOnceDelivery.scala b/persistence/src/main/scala/org/apache/pekko/persistence/AtLeastOnceDelivery.scala index bd2fef045fc..965256e2e2b 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/AtLeastOnceDelivery.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/AtLeastOnceDelivery.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.{ ActorPath, ActorSelection, NotInfluenceReceiveTimeout } import pekko.actor.Cancellable import pekko.actor.DeadLetterSuppression diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala b/persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala index cb2006526cd..1cff16a7652 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala @@ -22,14 +22,15 @@ import scala.concurrent.duration.FiniteDuration import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorCell, DeadLetter, StashOverflowException } import pekko.annotation.{ InternalApi, InternalStableApi } import pekko.dispatch.Envelope import pekko.event.{ Logging, LoggingAdapter } import pekko.util.Helpers.ConfigOps -import com.typesafe.config.ConfigFactory - /** INTERNAL API */ @InternalApi private[persistence] object Eventsourced { diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala b/persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala index 66dacddf0e1..cb5b6316426 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala @@ -22,6 +22,9 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.annotation.InternalApi import pekko.annotation.InternalStableApi @@ -33,8 +36,6 @@ import pekko.util.Collections.EmptyImmutableSeq import pekko.util.Helpers.ConfigOps import pekko.util.Reflect -import com.typesafe.config.{ Config, ConfigFactory } - /** * Persistence configuration. */ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/PersistencePlugin.scala b/persistence/src/main/scala/org/apache/pekko/persistence/PersistencePlugin.scala index 2ac73b6acdd..bec818b55aa 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/PersistencePlugin.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/PersistencePlugin.scala @@ -20,13 +20,14 @@ import scala.reflect.ClassTag import scala.util.Failure import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ ExtendedActorSystem, Extension, ExtensionId } import pekko.annotation.InternalApi import pekko.event.Logging import pekko.persistence.PersistencePlugin.PluginHolder -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/Persistent.scala b/persistence/src/main/scala/org/apache/pekko/persistence/Persistent.scala index cba3ad166e2..9d1d17a9d76 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/Persistent.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/Persistent.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence import scala.collection.immutable import org.apache.pekko + import pekko.actor.{ ActorRef, NoSerializationVerificationNeeded } import pekko.annotation.DoNotInherit import pekko.persistence.serialization.Message diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/PersistentActor.scala b/persistence/src/main/scala/org/apache/pekko/persistence/PersistentActor.scala index 239999d84d8..7108547420f 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/PersistentActor.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/PersistentActor.scala @@ -19,13 +19,14 @@ import scala.collection.immutable import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.InternalApi import pekko.japi.Util import pekko.japi.function.Procedure -import com.typesafe.config.Config - abstract class RecoveryCompleted /** diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/RecoveryPermitter.scala b/persistence/src/main/scala/org/apache/pekko/persistence/RecoveryPermitter.scala index 93c05a2426c..8e27334345b 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/RecoveryPermitter.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/RecoveryPermitter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/Snapshotter.scala b/persistence/src/main/scala/org/apache/pekko/persistence/Snapshotter.scala index ab6177729c2..fbde46651d6 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/Snapshotter.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/Snapshotter.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence import org.apache.pekko + import pekko.actor._ import pekko.persistence.SnapshotProtocol._ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala b/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala index 18c8cbaac41..d71c649e2ce 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala @@ -21,6 +21,9 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.annotation.InternalApi import pekko.persistence.{ PersistentActor, RecoveryCompleted, SnapshotOffer } @@ -28,8 +31,6 @@ import pekko.persistence.fsm.PersistentFSM.FSMState import pekko.persistence.serialization.Message import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - /** * SnapshotAfter Extension Id and factory for creating SnapshotAfter extension */ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala b/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala index 1e7455a0fb5..613ab4e6808 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala @@ -18,9 +18,9 @@ import scala.collection.mutable import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ -import language.implicitConversions - import org.apache.pekko + +import language.implicitConversions import pekko.actor._ import pekko.japi.function.{ Effect, Function2, Predicate, Predicate2, Procedure, Procedure2, Procedure3 } import pekko.japi.pf.{ FSMTransitionHandlerBuilder, UnitMatch, UnitPFBuilder } diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncRecovery.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncRecovery.scala index eecc43370d5..fd3280eb7e3 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncRecovery.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncRecovery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.journal import scala.concurrent.Future import org.apache.pekko + import pekko.persistence.PersistentRepr /** diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteJournal.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteJournal.scala index ae27bd5c4fe..b2da686b2b5 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteJournal.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteJournal.scala @@ -17,10 +17,11 @@ import scala.collection.immutable import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.duration._ -import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalApi import pekko.pattern.CircuitBreaker diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteProxy.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteProxy.scala index 7e4b1753405..39eb6cd9ae9 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteProxy.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/AsyncWriteProxy.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration.Duration import scala.util.Try import org.apache.pekko + import pekko.PekkoException import pekko.actor._ import pekko.pattern.ask diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala index ff89dd410cc..dd3fd769020 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala @@ -22,11 +22,12 @@ import scala.reflect.ClassTag import scala.util.Try import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.event.{ Logging, LoggingAdapter } import com.typesafe.config.Config +import pekko.actor.ExtendedActorSystem +import pekko.event.{ Logging, LoggingAdapter } + /** * `EventAdapters` serves as a per-journal collection of bound event adapters. */ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/PersistencePluginProxy.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/PersistencePluginProxy.scala index c06b4b376d8..fd1bc64ef5f 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/PersistencePluginProxy.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/PersistencePluginProxy.scala @@ -19,6 +19,9 @@ import java.util.concurrent.TimeoutException import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.persistence.{ AtomicWrite, @@ -33,8 +36,6 @@ import pekko.persistence.{ } import pekko.util.Helpers.Requiring -import com.typesafe.config.Config - object PersistencePluginProxy { final case class TargetLocation(address: Address) private case object InitTimeout diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/ReplayFilter.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/ReplayFilter.scala index 02943b7fa6e..dee9fbe5b90 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/ReplayFilter.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/ReplayFilter.scala @@ -18,6 +18,7 @@ import java.util.LinkedList import scala.collection.mutable.LinkedHashSet import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.ActorRef diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/WriteJournalBase.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/WriteJournalBase.scala index 59e727c6efd..83054bf1a20 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/WriteJournalBase.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/WriteJournalBase.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.journal import scala.collection.immutable import org.apache.pekko + import pekko.actor.Actor import pekko.persistence.{ Persistence, PersistentEnvelope, PersistentRepr } import pekko.persistence.AtomicWrite diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/inmem/InmemJournal.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/inmem/InmemJournal.scala index 235a003010a..64aa925e7b3 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/inmem/InmemJournal.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/inmem/InmemJournal.scala @@ -19,6 +19,10 @@ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorRef import pekko.annotation.ApiMayChange import pekko.annotation.InternalApi @@ -32,9 +36,6 @@ import pekko.serialization.SerializationExtension import pekko.serialization.Serializers import pekko.util.OptionVal -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * The InmemJournal publishes writes and deletes to the `eventStream`, which tests may use to * verify that expected events have been persisted or deleted. diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncRecovery.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncRecovery.scala index 38375b399d1..9c34af59ef9 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncRecovery.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncRecovery.scala @@ -20,6 +20,7 @@ import scala.concurrent.Future import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.actor.Actor import pekko.persistence.PersistentRepr import pekko.persistence.journal.{ AsyncRecovery => SAsyncReplay } diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncWriteJournal.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncWriteJournal.scala index bdedb96330a..33ae7fcf484 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncWriteJournal.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/japi/AsyncWriteJournal.scala @@ -22,6 +22,7 @@ import scala.util.Failure import scala.util.Try import org.apache.pekko + import pekko.persistence._ import pekko.persistence.journal.{ AsyncWriteJournal => SAsyncWriteJournal } import pekko.util.ConstantFun.scalaAnyToUnit diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala index 30339af560b..74edfd7c41d 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala @@ -15,9 +15,10 @@ package org.apache.pekko.persistence.journal.leveldb import scala.annotation.nowarn +import org.apache.pekko + import org.iq80.leveldb.DBIterator -import org.apache.pekko import pekko.actor.Actor import pekko.util.ByteString.UTF_8 diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournal.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournal.scala index 6200342e188..30bdede5dcd 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournal.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbJournal.scala @@ -16,6 +16,10 @@ package org.apache.pekko.persistence.journal.leveldb import scala.concurrent.Future import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.pattern.pipe import pekko.persistence.JournalProtocol.RecoverySuccess @@ -26,9 +30,6 @@ import pekko.persistence.journal._ import pekko.util.Helpers.ConfigOps import pekko.util.Timeout -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * INTERNAL API. * diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbRecovery.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbRecovery.scala index 2221eef2024..433eadeabce 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbRecovery.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbRecovery.scala @@ -15,9 +15,10 @@ package org.apache.pekko.persistence.journal.leveldb import scala.concurrent.Future +import org.apache.pekko + import org.iq80.leveldb.DBIterator -import org.apache.pekko import pekko.persistence._ import pekko.persistence.journal.AsyncRecovery import pekko.persistence.journal.leveldb.LeveldbJournal.ReplayedTaggedMessage diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbStore.scala index 09da8bd19bb..615633f4e17 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbStore.scala @@ -22,17 +22,18 @@ import scala.jdk.CollectionConverters._ import scala.util._ import scala.util.control.NonFatal +import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory, ConfigObject } + import org.iq80.leveldb._ -import org.apache.pekko import pekko.actor._ import pekko.persistence._ import pekko.persistence.journal.Tagged import pekko.persistence.journal.WriteJournalBase import pekko.serialization.SerializationExtension -import com.typesafe.config.{ Config, ConfigFactory, ConfigObject } - private[persistence] object LeveldbStore { val emptyConfig = ConfigFactory.empty() diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbStore.scala index 3a5592205c1..e67765f8660 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbStore.scala @@ -20,12 +20,13 @@ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.pattern.pipe import pekko.persistence.AtomicWrite import pekko.persistence.journal.AsyncWriteTarget -import com.typesafe.config.Config - /** * A LevelDB store that can be shared by multiple actor systems. The shared store must be * set for each actor system that uses the store via `SharedLeveldbJournal.setStore`. The diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializer.scala b/persistence/src/main/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializer.scala index c95dbbe39cd..4d86b0503e8 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializer.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.serialization import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.persistence.FilteredPayload diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/serialization/MessageSerializer.scala b/persistence/src/main/scala/org/apache/pekko/persistence/serialization/MessageSerializer.scala index c2060d72827..0b8843ae2be 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/serialization/MessageSerializer.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/serialization/MessageSerializer.scala @@ -22,6 +22,7 @@ import scala.concurrent.duration import scala.concurrent.duration.Duration import org.apache.pekko + import pekko.actor.{ ActorPath, ExtendedActorSystem } import pekko.actor.Actor import pekko.persistence._ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/serialization/SnapshotSerializer.scala b/persistence/src/main/scala/org/apache/pekko/persistence/serialization/SnapshotSerializer.scala index 0e022575de0..351e2ff2e87 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/serialization/SnapshotSerializer.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/serialization/SnapshotSerializer.scala @@ -17,6 +17,7 @@ import java.io.NotSerializableException import java.nio.ByteOrder import org.apache.pekko + import pekko.actor._ import pekko.serialization._ import pekko.util.ByteString.UTF_8 diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/NoSnapshotStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/NoSnapshotStore.scala index d65141ab507..3ccb29a93a4 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/NoSnapshotStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/NoSnapshotStore.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.snapshot import scala.concurrent.Future import org.apache.pekko + import pekko.persistence.{ SelectedSnapshot, SnapshotMetadata, SnapshotSelectionCriteria } /** diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStore.scala index 4d944d93c40..b4ad921c6e8 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/SnapshotStore.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.pattern.CircuitBreaker import pekko.pattern.pipe diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/japi/SnapshotStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/japi/SnapshotStore.scala index 2f2953ebd50..bdfa217e492 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/japi/SnapshotStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/japi/SnapshotStore.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.jdk.FutureConverters._ import org.apache.pekko + import pekko.persistence._ import pekko.persistence.snapshot.{ SnapshotStore => SSnapshotStore } import pekko.util.ConstantFun.scalaAnyToUnit diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStore.scala index aa6082fc9df..1d1cb78694a 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/snapshot/local/LocalSnapshotStore.scala @@ -24,14 +24,15 @@ import scala.concurrent.Future import scala.util._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorLogging import pekko.persistence._ import pekko.persistence.serialization._ import pekko.persistence.snapshot._ import pekko.serialization.SerializationExtension -import com.typesafe.config.Config - /** * INTERNAL API * diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreRegistry.scala b/persistence/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreRegistry.scala index bc6704ebb0d..9753c288c5c 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreRegistry.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/state/DurableStateStoreRegistry.scala @@ -17,6 +17,10 @@ import scala.annotation.nowarn import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem @@ -29,9 +33,6 @@ import pekko.persistence.PersistencePlugin import pekko.persistence.PluginProvider import pekko.persistence.state.scaladsl.DurableStateStore -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** * Persistence extension for queries. */ diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateStore.scala index d659128d443..4da695775ec 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateStore.scala @@ -19,6 +19,7 @@ import java.util.concurrent.CompletionStage import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.persistence.state.scaladsl.{ GetObjectResult => SGetObjectResult } /** diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateUpdateStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateUpdateStore.scala index 6fc15902c6e..e6326979c96 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateUpdateStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/state/javadsl/DurableStateUpdateStore.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.state.javadsl import java.util.concurrent.CompletionStage import org.apache.pekko + import pekko.Done /** diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateStore.scala index a93b5875b17..bf2c0e93f01 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateStore.scala @@ -17,6 +17,7 @@ import scala.concurrent.Future import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.persistence.state.javadsl.{ GetObjectResult => JGetObjectResult } /** diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateUpdateStore.scala b/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateUpdateStore.scala index c0aa6c95253..0aa29eb92a8 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateUpdateStore.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/state/scaladsl/DurableStateUpdateStore.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence.state.scaladsl import scala.concurrent.Future import org.apache.pekko + import pekko.Done /** diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryCrashSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryCrashSpec.scala index 58bdabbb987..aad4a19c16c 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryCrashSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryCrashSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor._ import pekko.actor.SupervisorStrategy.{ Escalate, Stop } import pekko.testkit.{ ImplicitSender, PekkoSpec, TestProbe } diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryFailureSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryFailureSpec.scala index 72daa025648..c47d289bd03 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryFailureSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliveryFailureSpec.scala @@ -18,11 +18,12 @@ import java.util.concurrent.ThreadLocalRandom import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor._ -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.testkit._ + object AtLeastOnceDeliveryFailureSpec { val config = ConfigFactory.parseString(s""" pekko.persistence.sender.chaos.live-processing-failure-rate = 0.3 diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliverySpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliverySpec.scala index 130b232f7b0..fc9ca84cb3c 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliverySpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/AtLeastOnceDeliverySpec.scala @@ -14,11 +14,13 @@ package org.apache.pekko.persistence import java.util.Locale + import scala.concurrent.duration._ import scala.util.Failure import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor._ import pekko.persistence.AtLeastOnceDelivery.{ AtLeastOnceDeliverySnapshot, UnconfirmedWarning } import pekko.testkit._ diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/EndToEndEventAdapterSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/EndToEndEventAdapterSpec.scala index 81f169d1072..32b23c7de5b 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/EndToEndEventAdapterSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/EndToEndEventAdapterSpec.scala @@ -17,12 +17,7 @@ import java.io.File import scala.annotation.nowarn -import org.apache.commons.io.FileUtils - import org.apache.pekko -import pekko.actor._ -import pekko.persistence.journal.{ EventAdapter, EventSeq } -import pekko.testkit.TestProbe import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -30,6 +25,12 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.{ Config, ConfigFactory } +import org.apache.commons.io.FileUtils + +import pekko.actor._ +import pekko.persistence.journal.{ EventAdapter, EventSeq } +import pekko.testkit.TestProbe + object EndToEndEventAdapterSpec { trait AppModel { def payload: Any } diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/EventAdapterSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/EventAdapterSpec.scala index 1467ac1b304..33a9cd6608e 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/EventAdapterSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/EventAdapterSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.persistence import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.event.Logging import pekko.persistence.journal.{ EventAdapter, EventSeq, SingleEventSeq } import pekko.testkit.ImplicitSender -import com.typesafe.config.{ Config, ConfigFactory } - object EventAdapterSpec { final val JournalModelClassName = diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorDeleteFailureSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorDeleteFailureSpec.scala index 736d1b87e2d..7557830149d 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorDeleteFailureSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorDeleteFailureSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor._ import pekko.event.Logging import pekko.event.Logging.Warning diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorFailureSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorFailureSpec.scala index d5606fa0d6a..5eb91d65afe 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorFailureSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/EventSourcedActorFailureSpec.scala @@ -15,10 +15,11 @@ package org.apache.pekko.persistence import scala.collection.immutable import scala.concurrent.Future -import scala.util.{ Failure, Try } import scala.util.control.NoStackTrace +import scala.util.{ Failure, Try } import org.apache.pekko + import pekko.actor.{ OneForOneStrategy, _ } import pekko.persistence.journal.AsyncWriteJournal import pekko.persistence.journal.inmem.InmemJournal diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/LoadPluginSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/LoadPluginSpec.scala index f77047c9759..4de9fdb0d9f 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/LoadPluginSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/LoadPluginSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.persistence import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Actor import pekko.persistence.journal.inmem.InmemJournal import pekko.testkit.ImplicitSender -import com.typesafe.config.Config - object LoadPluginSpec { case object GetConfig diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/ManyRecoveriesSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/ManyRecoveriesSpec.scala index d8d70070d25..755e8f5a9d4 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/ManyRecoveriesSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/ManyRecoveriesSpec.scala @@ -17,11 +17,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor._ -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.testkit._ + object ManyRecoveriesSpec { def testProps(name: String, latch: Option[TestLatch]): Props = diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/OptimizedRecoverySpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/OptimizedRecoverySpec.scala index b0a14d90223..3afb9302138 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/OptimizedRecoverySpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/OptimizedRecoverySpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.Props import pekko.testkit.ImplicitSender diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/OptionalSnapshotStoreSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/OptionalSnapshotStoreSpec.scala index bbba51c7451..592a67ab27a 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/OptionalSnapshotStoreSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/OptionalSnapshotStoreSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.persistence import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, Props } import pekko.event.Logging import pekko.event.Logging.Warning import pekko.testkit.{ EventFilter, ImplicitSender, TestEvent } -import com.typesafe.config.ConfigFactory - object OptionalSnapshotStoreSpec { class AnyPersistentActor(name: String) extends PersistentActor { diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PerformanceSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PerformanceSpec.scala index 1a80465b821..9ac297038d4 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PerformanceSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PerformanceSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.persistence import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor._ -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.testkit._ + object PerformanceSpec { val config = """ diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PersistenceSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PersistenceSpec.scala index d952cd59492..e89e75b7f68 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PersistenceSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PersistenceSpec.scala @@ -20,17 +20,18 @@ import scala.collection.immutable import scala.reflect.ClassTag import scala.util.control.NoStackTrace -import org.apache.commons.io.FileUtils - import org.apache.pekko -import pekko.actor.Props -import pekko.testkit.PekkoSpec import org.scalatest.BeforeAndAfterEach import org.scalatest.matchers.{ MatchResult, Matcher } import com.typesafe.config.{ Config, ConfigFactory } +import org.apache.commons.io.FileUtils + +import pekko.actor.Props +import pekko.testkit.PekkoSpec + abstract class PersistenceSpec(config: Config) extends PekkoSpec(config) with BeforeAndAfterEach diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorBoundedStashingSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorBoundedStashingSpec.scala index 1b580a14bc5..62c6e3cb830 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorBoundedStashingSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorBoundedStashingSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.persistence import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + +import com.typesafe.config.Config + import pekko.actor.DeadLetter import pekko.persistence.PersistentActorBoundedStashingSpec._ import pekko.persistence.journal.SteppingInmemJournal @@ -23,10 +28,6 @@ import pekko.testkit.EventFilter import pekko.testkit.ImplicitSender import pekko.testkit.TestEvent.Mute -import org.scalatest.BeforeAndAfterEach - -import com.typesafe.config.Config - object PersistentActorBoundedStashingSpec { final case class Cmd(data: Any) final case class Evt(data: Any) diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorJournalProtocolSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorJournalProtocolSpec.scala index 711037f6a50..92a1dd61134 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorJournalProtocolSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorJournalProtocolSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.persistence import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.persistence.JournalProtocol._ import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object PersistentActorJournalProtocolSpec { val config = ConfigFactory.parseString(""" diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala index bc466701b72..72244c5d94d 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorRecoveryTimeoutSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.persistence import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorLogging, ActorRef, Props } import pekko.actor.Status.Failure import pekko.persistence.journal.SteppingInmemJournal import pekko.testkit.{ ImplicitSender, PekkoSpec, TestDuration, TestProbe } -import com.typesafe.config.ConfigFactory - object PersistentActorRecoveryTimeoutSpec { val journalId = "persistent-actor-recovery-timeout-spec" val receiveTimeoutJournalId = "persistent-actor-recovery-timeout-spec-receive-timeout" diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorSpec.scala index 31f5a2238d2..67141cec70e 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorSpec.scala @@ -23,14 +23,15 @@ import scala.util.Random import scala.util.control.NoStackTrace import org.apache.pekko -import pekko.actor._ -import pekko.persistence.PersistentActorSpec._ -import pekko.testkit.{ EventFilter, ImplicitSender, TestLatch, TestProbe } import org.scalatest.concurrent.Eventually import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor._ +import pekko.persistence.PersistentActorSpec._ +import pekko.testkit.{ EventFilter, ImplicitSender, TestLatch, TestProbe } + object PersistentActorSpec { final case class Cmd(data: Any) diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorStashingSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorStashingSpec.scala index bdb5c5544cf..10928e693cf 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorStashingSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/PersistentActorStashingSpec.scala @@ -18,13 +18,14 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ Actor, ActorRef, OneForOneStrategy, Props } import pekko.actor.SupervisorStrategy.Resume import pekko.persistence.journal.SteppingInmemJournal import pekko.testkit.ImplicitSender -import com.typesafe.config.Config - object PersistentActorStashingSpec { final case class Cmd(data: Any) final case class Evt(data: Any) diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/RecoveryPermitterSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/RecoveryPermitterSpec.scala index bf4a91f98b7..f201ec402d3 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/RecoveryPermitterSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/RecoveryPermitterSpec.scala @@ -17,13 +17,14 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.testkit.{ EventFilter, ImplicitSender, TestEvent } import pekko.testkit.TestActors import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object RecoveryPermitterSpec { class TestExc extends RuntimeException("simulated exc") with NoStackTrace diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SliceRangesSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SliceRangesSpec.scala index 6d0a5136d88..36667e1a154 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SliceRangesSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SliceRangesSpec.scala @@ -17,6 +17,7 @@ import java.util import java.util.UUID import org.apache.pekko + import pekko.japi.Pair import pekko.testkit.ImplicitSender diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDecodeFailureSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDecodeFailureSpec.scala index 23b4b25d2ed..100625cb6df 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDecodeFailureSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDecodeFailureSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence import org.apache.pekko + import pekko.actor.{ ActorLogging, ActorRef, Props } import pekko.event.Logging import pekko.testkit.{ EventFilter, ImplicitSender, TestEvent } diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDirectoryFailureSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDirectoryFailureSpec.scala index 079551eac9d..586ab37c1ef 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDirectoryFailureSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotDirectoryFailureSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence import java.io.{ File, IOException } import org.apache.pekko + import pekko.actor.{ ActorInitializationException, ActorRef, Props } import pekko.testkit.{ EventFilter, ImplicitSender, PekkoSpec } diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotFailureRobustnessSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotFailureRobustnessSpec.scala index 7fa9b0e4939..1f96c9ef758 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotFailureRobustnessSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotFailureRobustnessSpec.scala @@ -21,13 +21,14 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ ActorRef, Props } import pekko.event.Logging import pekko.persistence.snapshot.local.LocalSnapshotStore import pekko.testkit.{ EventFilter, ImplicitSender, TestEvent } -import com.typesafe.config.Config - object SnapshotFailureRobustnessSpec { case class Cmd(payload: String) diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryLocalStoreSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryLocalStoreSpec.scala index 3406ccb5ac7..29ca95f9e60 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryLocalStoreSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryLocalStoreSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence import org.apache.pekko + import pekko.actor.{ ActorLogging, ActorRef, Props } import pekko.testkit.ImplicitSender diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryWithEmptyJournalSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryWithEmptyJournalSpec.scala index ec05eaf48d5..ea211288e6f 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryWithEmptyJournalSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotRecoveryWithEmptyJournalSpec.scala @@ -15,9 +15,10 @@ package org.apache.pekko.persistence import java.io.File +import org.apache.pekko + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.actor._ import pekko.persistence.serialization.Snapshot import pekko.serialization.{ Serialization, SerializationExtension } diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSerializationSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSerializationSpec.scala index 4ce46493e4d..c02649d9663 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSerializationSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSerializationSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.persistence import java.io._ import org.apache.pekko + import pekko.actor.{ ActorRef, Props } import pekko.serialization.Serializer import pekko.testkit.ImplicitSender diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSpec.scala index b1c40a3b755..8a876df3fbf 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/SnapshotSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence import org.apache.pekko + import pekko.actor._ import pekko.testkit._ diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/TimerPersistentActorSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/TimerPersistentActorSpec.scala index b912761755f..661fefce1c0 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/TimerPersistentActorSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/TimerPersistentActorSpec.scala @@ -17,13 +17,14 @@ import scala.concurrent.duration._ import scala.runtime.BoxedUnit import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.japi.function.Procedure import pekko.testkit.{ EventFilter, ImplicitSender } import pekko.testkit.TestEvent.Mute -import com.typesafe.config.ConfigFactory - object TimerPersistentActorSpec { def testProps(name: String): Props = diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/fsm/PersistentFSMSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/fsm/PersistentFSMSpec.scala index 57f26babfb6..3a013dc0b61 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/fsm/PersistentFSMSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/fsm/PersistentFSMSpec.scala @@ -19,16 +19,17 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import scala.reflect.ClassTag +import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.actor.{ ActorSystem, _ } import pekko.persistence._ import pekko.persistence.fsm.PersistentFSM._ import pekko.testkit._ -import com.typesafe.config.{ Config, ConfigFactory } - @nowarn("msg=deprecated|Unused import") abstract class PersistentFSMSpec(config: Config) extends PersistenceSpec(config) with ImplicitSender { import PersistentFSMSpec._ diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/AsyncWriteJournalResponseOrderSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/AsyncWriteJournalResponseOrderSpec.scala index 1b8097e003f..463d3ef9ab4 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/AsyncWriteJournalResponseOrderSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/AsyncWriteJournalResponseOrderSpec.scala @@ -21,8 +21,8 @@ import scala.collection.{ immutable, mutable } import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.util.Try -import org.apache.pekko.persistence.{ AtomicWrite, JournalProtocol, PersistenceSpec, PersistentRepr } import org.apache.pekko.persistence.journal.AsyncWriteJournalResponseOrderSpec._ +import org.apache.pekko.persistence.{ AtomicWrite, JournalProtocol, PersistenceSpec, PersistentRepr } import org.apache.pekko.testkit.ImplicitSender /** diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/InmemEventAdaptersSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/InmemEventAdaptersSpec.scala index a7d5d77eb91..3f80ec27480 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/InmemEventAdaptersSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/InmemEventAdaptersSpec.scala @@ -16,11 +16,12 @@ package org.apache.pekko.persistence.journal import scala.annotation.nowarn import org.apache.pekko -import pekko.actor.ExtendedActorSystem -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ExtendedActorSystem +import pekko.testkit.PekkoSpec + @nowarn("msg=Unused import") class InmemEventAdaptersSpec extends PekkoSpec { diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/ReplayFilterSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/ReplayFilterSpec.scala index dd792984f1b..9fcc953e96d 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/ReplayFilterSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/ReplayFilterSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.journal import org.apache.pekko + import pekko.persistence.JournalProtocol import pekko.persistence.PersistentRepr import pekko.testkit._ diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/SteppingInmemJournal.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/SteppingInmemJournal.scala index 0a228b5807c..9825f2e277f 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/SteppingInmemJournal.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/SteppingInmemJournal.scala @@ -14,11 +14,14 @@ package org.apache.pekko.persistence.journal import scala.collection.immutable.Seq -import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future, Promise } import scala.util.Try import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.{ ActorRef, ActorSystem } import pekko.pattern.ask import pekko.persistence.{ AtomicWrite, PersistentRepr } @@ -26,8 +29,6 @@ import pekko.persistence.journal.inmem.InmemJournal import pekko.testkit._ import pekko.util.Timeout -import com.typesafe.config.{ Config, ConfigFactory } - object SteppingInmemJournal { /** allow the journal to do one operation */ diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/chaos/ChaosJournal.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/chaos/ChaosJournal.scala index a111626dbaf..5f6c4c241d1 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/chaos/ChaosJournal.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/chaos/ChaosJournal.scala @@ -21,6 +21,7 @@ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + import pekko.persistence._ import pekko.persistence.journal.AsyncWriteJournal import pekko.persistence.journal.inmem.InmemMessages diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala index 546bee7b2fa..aaf5d09aaad 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/inmem/InmemJournalSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.journal.inmem import org.apache.pekko + import pekko.actor.Props import pekko.persistence.PersistenceSpec import pekko.persistence.PersistentActor diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/journal/leveldb/JournalCompactionSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/journal/leveldb/JournalCompactionSpec.scala index 04d8c9d9fb8..1054745cdd0 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/journal/leveldb/JournalCompactionSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/journal/leveldb/JournalCompactionSpec.scala @@ -17,17 +17,18 @@ import java.io.File import scala.util.Random +import org.apache.pekko + +import com.typesafe.config.Config + import org.apache.commons.io.FileUtils -import org.apache.pekko import pekko.actor.{ ActorLogging, ActorRef, ActorSystem, Props } import pekko.persistence.{ DeleteMessagesSuccess, PersistenceSpec, PersistentActor } import pekko.persistence.journal.leveldb.JournalCompactionSpec.EventLogger._ import pekko.persistence.journal.leveldb.JournalCompactionSpec.SpecComponentBuilder import pekko.testkit.TestProbe -import com.typesafe.config.Config - class JournalNoCompactionSpec extends JournalCompactionSpecBase(SpecComponentBuilder("leveldb-JournalNoCompactionSpec")) { diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializerSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializerSpec.scala index 1858a5486c8..e384343d6da 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializerSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/FilteredPayloadSerializerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.serialization import org.apache.pekko + import pekko.persistence.FilteredPayload import pekko.serialization.SerializationExtension import pekko.serialization.SerializerWithStringManifest diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/MessageSerializerSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/MessageSerializerSpec.scala index e35857b0e28..b16920b138b 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/MessageSerializerSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/MessageSerializerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.persistence.serialization import org.apache.pekko + import pekko.persistence.PersistentRepr import pekko.serialization.SerializationExtension import pekko.testkit.PekkoSpec diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerMigrationAkkaSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerMigrationAkkaSpec.scala index 6a8b761435d..d4478bbbcee 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerMigrationAkkaSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerMigrationAkkaSpec.scala @@ -21,13 +21,14 @@ import java.io.NotSerializableException import java.util.Base64 import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.persistence.fsm.PersistentFSM.PersistentFSMSnapshot import pekko.serialization.SerializationExtension import pekko.testkit.PekkoSpec -import com.typesafe.config.ConfigFactory - class SnapshotSerializerMigrationAkkaSpec extends PekkoSpec( s"${SnapshotAutoMigration.ConfigName}=akka" ) { diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerNoMigrationSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerNoMigrationSpec.scala index 6ac992daabb..f6355bf231b 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerNoMigrationSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerNoMigrationSpec.scala @@ -21,6 +21,7 @@ import java.io.NotSerializableException import java.util.Base64 import org.apache.pekko + import pekko.persistence.fsm.PersistentFSM.PersistentFSMSnapshot import pekko.serialization.SerializationExtension import pekko.testkit.PekkoSpec diff --git a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerSpec.scala b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerSpec.scala index 4f5d67653c7..cb9ec6c9cd3 100644 --- a/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerSpec.scala +++ b/persistence/src/test/scala/org/apache/pekko/persistence/serialization/SnapshotSerializerSpec.scala @@ -21,9 +21,9 @@ import java.nio.ByteOrder import java.nio.charset.StandardCharsets import java.util.Base64 -import annotation.nowarn - import org.apache.pekko + +import annotation.nowarn import pekko.persistence.fsm.PersistentFSM.PersistentFSMSnapshot import pekko.serialization.{ SerializationExtension, Serializers } import pekko.testkit.PekkoSpec diff --git a/pki/src/main/scala/org/apache/pekko/pki/pem/DERPrivateKeyLoader.scala b/pki/src/main/scala/org/apache/pekko/pki/pem/DERPrivateKeyLoader.scala index 342cfd79261..e63d6d0a239 100644 --- a/pki/src/main/scala/org/apache/pekko/pki/pem/DERPrivateKeyLoader.scala +++ b/pki/src/main/scala/org/apache/pekko/pki/pem/DERPrivateKeyLoader.scala @@ -21,12 +21,13 @@ import java.security.spec.RSAMultiPrimePrivateCrtKeySpec import java.security.spec.RSAOtherPrimeInfo import java.security.spec.RSAPrivateCrtKeySpec +import org.apache.pekko + import com.hierynomus.asn1.ASN1InputStream import com.hierynomus.asn1.encodingrules.der.DERDecoder import com.hierynomus.asn1.types.constructed.ASN1Sequence import com.hierynomus.asn1.types.primitive.ASN1Integer -import org.apache.pekko import pekko.annotation.ApiMayChange import pekko.pki.pem.PEMDecoder.DERData diff --git a/project/PekkoBuild.scala b/project/PekkoBuild.scala index 5eeaea540a2..0a2de5afeaa 100644 --- a/project/PekkoBuild.scala +++ b/project/PekkoBuild.scala @@ -108,7 +108,9 @@ object PekkoBuild { "-feature", "-unchecked", // 'blessed' since 2.13.1 - "-language:higherKinds") ++ + "-language:higherKinds", + // Required for OrganizeImports.removeUnused + "-Wunused:imports") ++ (if (isScala38OrLater(scalaVersion.value)) Seq("-Wconf:any:s") else Seq.empty) ++ (if (scalaVersion.value.startsWith("3.3.")) Seq("-Yfuture-lazy-vals") else Seq.empty) } else { @@ -119,7 +121,9 @@ object PekkoBuild { "-unchecked", "-Xlog-reflective-calls", // 'blessed' since 2.13.1 - "-language:higherKinds") + "-language:higherKinds", + // Required for OrganizeImports.removeUnused + "-Wunused:imports") } } diff --git a/project/ScalaFixExtraRulesPlugin.scala b/project/ScalaFixExtraRulesPlugin.scala index a2bb844d596..5d7f987598d 100644 --- a/project/ScalaFixExtraRulesPlugin.scala +++ b/project/ScalaFixExtraRulesPlugin.scala @@ -19,10 +19,6 @@ object ScalaFixExtraRulesPlugin extends AutoPlugin with ScalafixSupport { override lazy val requires: Plugins = ScalafixPlugin - import sbt._ - import scalafix.sbt.ScalafixPlugin.autoImport.scalafixDependencies - override lazy val projectSettings: Seq[Def.Setting[?]] = super.projectSettings ++ { - ThisBuild / scalafixDependencies ++= Seq( - "com.nequissimus" %% "sort-imports" % "0.6.1") - } + import sbt.{ Def, _ } + override lazy val projectSettings: Seq[Def.Setting[?]] = super.projectSettings } diff --git a/project/ScalaFixForJdk21Plugin.scala b/project/ScalaFixForJdk21Plugin.scala index 53408377af8..87f9e5d749c 100644 --- a/project/ScalaFixForJdk21Plugin.scala +++ b/project/ScalaFixForJdk21Plugin.scala @@ -30,5 +30,5 @@ object ScalaFixForJdk21Plugin extends AutoPlugin with ScalafixSupport { updateProjectCommands( alias = "fixall", value = ";scalafixEnable;scalafixAll;scalafmtAll;test:compile;multi-jvm:compile;reload"), - updateProjectCommands(alias = "sortImports", value = ";scalafixEnable;scalafixAll SortImports;scalafmtAll")) + updateProjectCommands(alias = "sortImports", value = ";scalafixEnable;scalafixAll OrganizeImports;scalafmtAll")) } diff --git a/project/ScalafixForMultiNodePlugin.scala b/project/ScalafixForMultiNodePlugin.scala index 1ba402d636e..7a1db9d075b 100644 --- a/project/ScalafixForMultiNodePlugin.scala +++ b/project/ScalafixForMultiNodePlugin.scala @@ -28,5 +28,5 @@ object ScalafixForMultiNodePlugin extends AutoPlugin with ScalafixSupport { Seq(MultiJvm).flatMap(c => inConfig(c)(scalafixConfigSettings(c))) ++ scalafixIgnoredSetting ++ Seq( updateProjectCommands(alias = "fixall", value = ";scalafixEnable;scalafixAll;scalafmtAll"), - updateProjectCommands(alias = "sortImports", value = ";scalafixEnable;scalafixAll SortImports;scalafmtAll")) + updateProjectCommands(alias = "sortImports", value = ";scalafixEnable;scalafixAll OrganizeImports;scalafmtAll")) } diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/AttemptSysMsgRedeliverySpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/AttemptSysMsgRedeliverySpec.scala index 02100d41e97..6ca293c05af 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/AttemptSysMsgRedeliverySpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/AttemptSysMsgRedeliverySpec.scala @@ -15,9 +15,11 @@ package org.apache.pekko.remote import scala.concurrent.duration._ -import testkit.MultiNodeConfig - import org.apache.pekko + +import com.typesafe.config.ConfigFactory + +import testkit.MultiNodeConfig import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -27,8 +29,6 @@ import pekko.actor.Props import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class AttemptSysMsgRedeliveryMultiJvmSpec(artery: Boolean) extends MultiNodeConfig { val first = role("first") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/LookupRemoteActorSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/LookupRemoteActorSpec.scala index fa862c6ee54..b65e826e14f 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/LookupRemoteActorSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/LookupRemoteActorSpec.scala @@ -13,9 +13,11 @@ package org.apache.pekko.remote -import testkit.MultiNodeConfig - import org.apache.pekko + +import com.typesafe.config.ConfigFactory + +import testkit.MultiNodeConfig import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -24,8 +26,6 @@ import pekko.actor.Props import pekko.pattern.ask import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class LookupRemoteActorMultiJvmSpec(artery: Boolean) extends MultiNodeConfig { commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString(s""" diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/NewRemoteActorSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/NewRemoteActorSpec.scala index c2fc7209ed8..c58fd45b063 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/NewRemoteActorSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/NewRemoteActorSpec.scala @@ -16,16 +16,16 @@ package org.apache.pekko.remote import scala.annotation.nowarn import scala.concurrent.duration._ -import testkit.MultiNodeConfig - import org.apache.pekko + +import com.typesafe.config.ConfigFactory + +import testkit.MultiNodeConfig import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Props import pekko.actor.Terminated -import com.typesafe.config.ConfigFactory - class NewRemoteActorMultiJvmSpec(artery: Boolean) extends MultiNodeConfig { commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString(s""" diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/PiercingShouldKeepQuarantineSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/PiercingShouldKeepQuarantineSpec.scala index 58beaf88b2e..88373864396 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/PiercingShouldKeepQuarantineSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/PiercingShouldKeepQuarantineSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class PiercingShouldKeepQuarantineConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeliverySpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeliverySpec.scala index 1a5feec9d2b..8b0edea168c 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeliverySpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeliverySpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -25,8 +28,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.serialization.jackson.CborSerializable -import com.typesafe.config.ConfigFactory - class RemoteDeliveryConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeploymentDeathWatchSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeploymentDeathWatchSpec.scala index 1aea319afca..3d9dd1327ff 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeploymentDeathWatchSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteDeploymentDeathWatchSpec.scala @@ -19,14 +19,15 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorSystemImpl import pekko.actor.Props import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class RemoteDeploymentDeathWatchMultiJvmSpec(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala index d68e6de9f67..a9b154eca37 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorIdentity import pekko.actor.ActorRef import pekko.actor.ActorSystemImpl @@ -38,8 +41,6 @@ import pekko.routing.RoundRobinPool import pekko.routing.RoutedActorRef import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - class RemotingFeaturesConfig(val useUnsafe: Boolean, artery: Boolean) extends MultiNodeConfig { val first = role("first") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeDeathWatchSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeDeathWatchSpec.scala index a2e1642f523..a051d0c3f11 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeDeathWatchSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeDeathWatchSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -27,8 +30,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class RemoteNodeDeathWatchConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeRestartDeathWatchSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeRestartDeathWatchSpec.scala index b8bc7c0a8a9..bed756e9302 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeRestartDeathWatchSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteNodeRestartDeathWatchSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -30,8 +33,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class RemoteNodeRestartDeathWatchConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteQuarantinePiercingSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteQuarantinePiercingSpec.scala index 5dd4f9cf390..3b2ffc79b07 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteQuarantinePiercingSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteQuarantinePiercingSpec.scala @@ -17,13 +17,14 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class RemoteQuarantinePiercingConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteReDeploymentSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteReDeploymentSpec.scala index 843aed0d453..6c81e258396 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteReDeploymentSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemoteReDeploymentSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorLogging @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction._ import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - class RemoteReDeploymentConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemotingMultiNodeSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemotingMultiNodeSpec.scala index 0201060b9bf..5ac420ff58d 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemotingMultiNodeSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/RemotingMultiNodeSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.remote import org.apache.pekko -import pekko.remote.artery.ArterySpecSupport -import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec, STMultiNodeSpec } -import pekko.testkit.{ DefaultTimeout, ImplicitSender } import org.scalatest.Suite import com.typesafe.config.ConfigFactory +import pekko.remote.artery.ArterySpecSupport +import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec, STMultiNodeSpec } +import pekko.testkit.{ DefaultTimeout, ImplicitSender } + object RemotingMultiNodeSpec { def commonConfig = diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/TransportFailSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/TransportFailSpec.scala index 4a751ac355d..92db9678912 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/TransportFailSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/TransportFailSpec.scala @@ -19,6 +19,10 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -30,9 +34,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object TransportFailConfig extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/DirectMemorySpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/DirectMemorySpec.scala index 93dfc812739..4cb5d5a923a 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/DirectMemorySpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/DirectMemorySpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorPath, ActorRef, Props } import pekko.remote.RemotingMultiNodeSpec import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec, STMultiNodeSpec } import pekko.testkit.ImplicitSender import pekko.testkit.JavaSerializable -import com.typesafe.config.ConfigFactory - object DirectMemorySpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanInThrougputSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanInThrougputSpec.scala index 786bed49804..d6f90e84533 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanInThrougputSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanInThrougputSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.Executors import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.{ RemoteActorRefProvider, RemotingMultiNodeSpec } import pekko.remote.artery.MaxThroughputSpec._ @@ -25,8 +28,6 @@ import pekko.remote.testconductor.RoleName import pekko.remote.testkit.{ MultiNodeConfig, PerfFlamesSupport } import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object FanInThroughputSpec extends MultiNodeConfig { val totalNumberOfNodes = System.getProperty("org.apache.pekko.test.FanInThroughputSpec.nrOfNodes") match { diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanOutThrougputSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanOutThrougputSpec.scala index 2346910ab09..4490a380eb6 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanOutThrougputSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/FanOutThrougputSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.Executors import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.{ RemoteActorRefProvider, RemotingMultiNodeSpec } import pekko.remote.artery.MaxThroughputSpec._ @@ -26,8 +29,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.PerfFlamesSupport import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object FanOutThroughputSpec extends MultiNodeConfig { val totalNumberOfNodes = System.getProperty("org.apache.pekko.test.FanOutThroughputSpec.nrOfNodes") match { diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/HandshakeRestartReceiverSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/HandshakeRestartReceiverSpec.scala index e59b4083de5..d4189ac604f 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/HandshakeRestartReceiverSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/HandshakeRestartReceiverSpec.scala @@ -19,6 +19,9 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.AddressUidExtension import pekko.remote.RARP @@ -28,8 +31,6 @@ import pekko.remote.testkit.MultiNodeSpec import pekko.remote.testkit.STMultiNodeSpec import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object HandshakeRestartReceiverSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/LatencySpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/LatencySpec.scala index bf4be955827..3c56f3ef42a 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/LatencySpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/LatencySpec.scala @@ -20,9 +20,12 @@ import java.util.concurrent.locks.LockSupport import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.HdrHistogram.Histogram -import org.apache.pekko import pekko.actor._ import pekko.dispatch.Dispatchers import pekko.remote.RemotingMultiNodeSpec @@ -33,8 +36,6 @@ import pekko.stream.ThrottleMode import pekko.stream.scaladsl.Source import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object LatencySpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/MaxThroughputSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/MaxThroughputSpec.scala index 5a788df1a47..53d8227cb71 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/MaxThroughputSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/MaxThroughputSpec.scala @@ -22,6 +22,9 @@ import java.util.concurrent.TimeUnit.NANOSECONDS import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote.{ RARP, RemoteActorRefProvider, RemotingMultiNodeSpec } import pekko.remote.artery.compress.CompressionProtocol.Events.ReceivedActorRefCompressionTable @@ -31,8 +34,6 @@ import pekko.serialization.{ ByteBufferSerializer, SerializerWithStringManifest import pekko.serialization.jackson.CborSerializable import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object MaxThroughputSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/RemoteRestartedQuarantinedSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/RemoteRestartedQuarantinedSpec.scala index 4f1520d8b95..d6cbd9caa3d 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/RemoteRestartedQuarantinedSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/RemoteRestartedQuarantinedSpec.scala @@ -17,14 +17,15 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify, _ } import pekko.remote.{ AddressUidExtension, RARP, RemotingMultiNodeSpec } import pekko.remote.testconductor.RoleName import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RemoteRestartedQuarantinedSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveInboundStreamRestartWithCompressionInFlightSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveInboundStreamRestartWithCompressionInFlightSpec.scala index 8bcbc6464a6..2f308cd456c 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveInboundStreamRestartWithCompressionInFlightSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveInboundStreamRestartWithCompressionInFlightSpec.scala @@ -16,6 +16,11 @@ package org.apache.pekko.remote.artery import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.actor.ActorIdentity import pekko.actor.Identify @@ -23,10 +28,6 @@ import pekko.remote.{ RARP, RemotingMultiNodeSpec } import pekko.remote.testkit.MultiNodeConfig import pekko.testkit._ -import org.scalatest.concurrent.ScalaFutures - -import com.typesafe.config.ConfigFactory - object SurviveInboundStreamRestartWithCompressionInFlightSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveNetworkPartitionSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveNetworkPartitionSpec.scala index 814530cca36..0f35e37aa7c 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveNetworkPartitionSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/SurviveNetworkPartitionSpec.scala @@ -17,6 +17,9 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.actor.ActorIdentity import pekko.actor.Identify @@ -25,8 +28,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object SurviveNetworkPartitionSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/TestMessage.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/TestMessage.scala index 0c81fe56ad0..50d6a5c9ff9 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/TestMessage.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/TestMessage.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import java.io.NotSerializableException import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.protobufv3.internal.ByteString import pekko.remote.artery.protobuf.{ TestMessages => proto } diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/UdpPortActor.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/UdpPortActor.scala index 706608428b2..6c74069d94e 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/UdpPortActor.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/UdpPortActor.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.Actor import pekko.remote.RARP import pekko.serialization.jackson.CborSerializable diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamConcistencySpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamConcistencySpec.scala index ff6540eb67b..26783384fd6 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamConcistencySpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamConcistencySpec.scala @@ -21,10 +21,13 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import io.aeron.Aeron import org.agrona.IoUtil -import org.apache.pekko import pekko.Done import pekko.actor.ExtendedActorSystem import pekko.actor.Props @@ -36,8 +39,6 @@ import pekko.stream.scaladsl.Source import pekko.testkit._ import pekko.util.ByteString -import com.typesafe.config.ConfigFactory - object AeronStreamConsistencySpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamLatencySpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamLatencySpec.scala index 2864cef677f..d476f9dfec5 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamLatencySpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamLatencySpec.scala @@ -26,13 +26,16 @@ import java.util.concurrent.locks.LockSupport import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import io.aeron.Aeron import io.aeron.CncFileDescriptor import org.HdrHistogram.Histogram import org.agrona.IoUtil import org.agrona.concurrent.ManyToOneConcurrentArrayQueue -import org.apache.pekko import pekko.Done import pekko.actor._ import pekko.remote.testkit.MultiNodeConfig @@ -44,8 +47,6 @@ import pekko.stream.scaladsl.Source import pekko.testkit._ import pekko.util.ByteString -import com.typesafe.config.ConfigFactory - object AeronStreamLatencySpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMaxThroughputSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMaxThroughputSpec.scala index 6c32947673d..3e906b32875 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMaxThroughputSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMaxThroughputSpec.scala @@ -22,11 +22,14 @@ import scala.collection.AbstractIterator import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import io.aeron.Aeron import io.aeron.CncFileDescriptor import org.agrona.IoUtil -import org.apache.pekko import pekko.actor._ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.testkit.STMultiNodeSpec @@ -35,8 +38,6 @@ import pekko.stream.scaladsl.Source import pekko.testkit._ import pekko.util.ByteString -import com.typesafe.config.ConfigFactory - object AeronStreamMaxThroughputSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMultiNodeSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMultiNodeSpec.scala index 138d2d1e997..4251597918c 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMultiNodeSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/artery/aeron/AeronStreamMultiNodeSpec.scala @@ -16,10 +16,11 @@ package org.apache.pekko.remote.artery.aeron import java.io.File import java.util.UUID +import org.apache.pekko + import io.aeron.CommonContext import io.aeron.driver.MediaDriver -import org.apache.pekko import pekko.remote.artery.UdpPortActor import pekko.remote.testconductor.RoleName import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec } diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteGatePiercingSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteGatePiercingSpec.scala index 1e7e19ce4f8..63094c54e2a 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteGatePiercingSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteGatePiercingSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify, _ } import pekko.remote.{ RARP, RemotingMultiNodeSpec } import pekko.remote.testconductor.RoleName @@ -26,8 +29,6 @@ import pekko.remote.transport.AssociationHandle import pekko.remote.transport.ThrottlerTransportAdapter.ForceDisassociateExplicitly import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RemoteGatePiercingSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeRestartGateSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeRestartGateSpec.scala index 55d187cfb5c..d99c81533d6 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeRestartGateSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeRestartGateSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify, _ } import pekko.remote.{ RARP, RemotingMultiNodeSpec } import pekko.remote.testconductor.RoleName @@ -26,8 +29,6 @@ import pekko.remote.transport.AssociationHandle import pekko.remote.transport.ThrottlerTransportAdapter.ForceDisassociateExplicitly import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RemoteNodeRestartGateSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeShutdownAndComesBackSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeShutdownAndComesBackSpec.scala index 145672924e9..b983760b9e0 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeShutdownAndComesBackSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/RemoteNodeShutdownAndComesBackSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify, _ } import pekko.remote.{ RARP, RemotingMultiNodeSpec } import pekko.remote.testconductor.RoleName @@ -24,8 +27,6 @@ import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.{ Direction, ForceDisassociate } import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RemoteNodeShutdownAndComesBackSpec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/Ticket15109Spec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/Ticket15109Spec.scala index 009871487b2..8c57da0d315 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/Ticket15109Spec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/classic/Ticket15109Spec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify, _ } import pekko.remote.{ RARP, RemotingMultiNodeSpec } import pekko.remote.testconductor.RoleName @@ -26,8 +29,6 @@ import pekko.remote.transport.AssociationHandle import pekko.remote.transport.ThrottlerTransportAdapter.ForceDisassociateExplicitly import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object Ticket15109Spec extends MultiNodeConfig { val first = role("first") val second = role("second") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteRandomSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteRandomSpec.scala index f0a48e4a81a..888fc365200 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteRandomSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteRandomSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote.routing import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Address @@ -28,8 +31,6 @@ import pekko.routing.RandomPool import pekko.routing.RoutedActorRef import pekko.testkit._ -import com.typesafe.config.ConfigFactory - class RemoteRandomConfig(artery: Boolean) extends MultiNodeConfig { val first = role("first") diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteScatterGatherSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteScatterGatherSpec.scala index fb4d607afe0..484cd617efe 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteScatterGatherSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/routing/RemoteScatterGatherSpec.scala @@ -25,8 +25,8 @@ import org.apache.pekko.remote.testkit.MultiNodeConfig import org.apache.pekko.routing.Broadcast import org.apache.pekko.routing.RoutedActorRef import org.apache.pekko.routing.ScatterGatherFirstCompletedPool -import org.apache.pekko.testkit._ import org.apache.pekko.testkit.TestEvent._ +import org.apache.pekko.testkit._ import com.typesafe.config.ConfigFactory diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testconductor/TestConductorSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testconductor/TestConductorSpec.scala index 4f745e26a40..e13b80bd733 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testconductor/TestConductorSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testconductor/TestConductorSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.remote.testconductor import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ Actor, ActorIdentity, Deploy, Identify, Props } import pekko.remote.RemotingMultiNodeSpec import pekko.remote.testkit.MultiNodeConfig import pekko.remote.transport.ThrottlerTransportAdapter.Direction import pekko.testkit.LongRunningTest -import com.typesafe.config.ConfigFactory - object TestConductorMultiJvmSpec extends MultiNodeConfig { commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString(""" pekko.remote.artery.enabled = false diff --git a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testkit/MultiNodeSpecSpec.scala b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testkit/MultiNodeSpecSpec.scala index 9aa7d7e3985..4d470ebc48d 100644 --- a/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testkit/MultiNodeSpecSpec.scala +++ b/remote-tests/src/multi-jvm/scala/org/apache/pekko/remote/testkit/MultiNodeSpecSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.testkit import org.apache.pekko + import pekko.remote.RemotingMultiNodeSpec import pekko.testkit.LongRunningTest diff --git a/remote-tests/src/test/scala/org/apache/pekko/remote/artery/ArteryFailedToBindSpec.scala b/remote-tests/src/test/scala/org/apache/pekko/remote/artery/ArteryFailedToBindSpec.scala index b840aed53ff..1e12d3c83ca 100644 --- a/remote-tests/src/test/scala/org/apache/pekko/remote/artery/ArteryFailedToBindSpec.scala +++ b/remote-tests/src/test/scala/org/apache/pekko/remote/artery/ArteryFailedToBindSpec.scala @@ -14,17 +14,18 @@ package org.apache.pekko.remote.artery import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.remote.RARP -import pekko.remote.RemoteTransportException -import pekko.testkit.SocketUtil -import pekko.testkit.TestKit import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ActorSystem +import pekko.remote.RARP +import pekko.remote.RemoteTransportException +import pekko.testkit.SocketUtil +import pekko.testkit.TestKit + class ArteryFailedToBindSpec extends AnyWordSpec with Matchers { "an ActorSystem" must { diff --git a/remote-tests/src/test/scala/org/apache/pekko/remote/classic/RemotingFailedToBindSpec.scala b/remote-tests/src/test/scala/org/apache/pekko/remote/classic/RemotingFailedToBindSpec.scala index ddd88843260..44208fafbe4 100644 --- a/remote-tests/src/test/scala/org/apache/pekko/remote/classic/RemotingFailedToBindSpec.scala +++ b/remote-tests/src/test/scala/org/apache/pekko/remote/classic/RemotingFailedToBindSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.remote.classic import java.net.BindException import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.SocketUtil import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ActorSystem +import pekko.testkit.SocketUtil + class RemotingFailedToBindSpec extends AnyWordSpec with Matchers { "an ActorSystem" must { diff --git a/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/BarrierSpec.scala b/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/BarrierSpec.scala index dad0d5d4429..fdd267fceca 100644 --- a/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/BarrierSpec.scala +++ b/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/BarrierSpec.scala @@ -18,6 +18,7 @@ import java.net.{ InetAddress, InetSocketAddress } import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.testkit.{ EventFilter, ImplicitSender, PekkoSpec, TestProbe, TimingTest } diff --git a/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/ControllerSpec.scala b/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/ControllerSpec.scala index 18867c0cf1e..ce09eda2756 100644 --- a/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/ControllerSpec.scala +++ b/remote-tests/src/test/scala/org/apache/pekko/remote/testconductor/ControllerSpec.scala @@ -17,6 +17,7 @@ import java.net.InetAddress import java.net.InetSocketAddress import org.apache.pekko + import pekko.actor.{ AddressFromURIString, PoisonPill, Props } import pekko.remote.testconductor.Controller.NodeInfo import pekko.testkit.ImplicitSender diff --git a/remote/src/main/scala/org/apache/pekko/remote/AckedDelivery.scala b/remote/src/main/scala/org/apache/pekko/remote/AckedDelivery.scala index 16fc083272a..7a2f48bcbda 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/AckedDelivery.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/AckedDelivery.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote import scala.collection.immutable._ import org.apache.pekko + import pekko.PekkoException @deprecated("Classic remoting is deprecated, use Artery", "Akka 2.6.0") diff --git a/remote/src/main/scala/org/apache/pekko/remote/AddressUidExtension.scala b/remote/src/main/scala/org/apache/pekko/remote/AddressUidExtension.scala index 245c6ff6b73..54eb91c43fa 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/AddressUidExtension.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/AddressUidExtension.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.ExtendedActorSystem diff --git a/remote/src/main/scala/org/apache/pekko/remote/BoundAddressesExtension.scala b/remote/src/main/scala/org/apache/pekko/remote/BoundAddressesExtension.scala index 5c5d8ac0741..f664dc58941 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/BoundAddressesExtension.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/BoundAddressesExtension.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.Address import pekko.actor.ClassicActorSystemProvider diff --git a/remote/src/main/scala/org/apache/pekko/remote/ByteStringUtils.scala b/remote/src/main/scala/org/apache/pekko/remote/ByteStringUtils.scala index e6c58bfa82f..8d6bcbdb54a 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/ByteStringUtils.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/ByteStringUtils.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.annotation.InternalApi import pekko.protobufv3.internal.{ ByteString => ProtoByteString } import pekko.protobufv3.internal.UnsafeByteOperations diff --git a/remote/src/main/scala/org/apache/pekko/remote/DeadlineFailureDetector.scala b/remote/src/main/scala/org/apache/pekko/remote/DeadlineFailureDetector.scala index 51e4319c493..fcbe3e0e096 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/DeadlineFailureDetector.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/DeadlineFailureDetector.scala @@ -17,12 +17,13 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import com.typesafe.config.Config + import pekko.event.EventStream import pekko.remote.FailureDetector.Clock import pekko.util.Helpers.ConfigOps -import com.typesafe.config.Config - /** * Implementation of failure detector using an absolute timeout of missing heartbeats * to trigger unavailability. diff --git a/remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala b/remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala index 8e0208baded..01b7a4ca190 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala @@ -14,8 +14,8 @@ package org.apache.pekko.remote import java.io.NotSerializableException -import java.util.concurrent.{ ConcurrentHashMap, TimeoutException } import java.util.concurrent.locks.LockSupport +import java.util.concurrent.{ ConcurrentHashMap, TimeoutException } import scala.annotation.nowarn import scala.annotation.tailrec @@ -25,6 +25,7 @@ import scala.concurrent.duration.Duration import scala.util.control.NonFatal import org.apache.pekko + import pekko.{ OnlyCauseStackTrace, PekkoException } import pekko.actor._ import pekko.actor.OneForOneStrategy diff --git a/remote/src/main/scala/org/apache/pekko/remote/FailureDetectorRegistry.scala b/remote/src/main/scala/org/apache/pekko/remote/FailureDetectorRegistry.scala index 25b2dc15d48..daf2fe9e5ef 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/FailureDetectorRegistry.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/FailureDetectorRegistry.scala @@ -14,12 +14,13 @@ package org.apache.pekko.remote import org.apache.pekko + +import com.typesafe.config.Config + import pekko.ConfigurationException import pekko.actor.{ ActorContext, ActorSystem, ExtendedActorSystem } import pekko.event.EventStream -import com.typesafe.config.Config - /** * Interface for a registry of Pekko failure detectors. New resources are implicitly registered when heartbeat is first * called with the resource given as parameter. diff --git a/remote/src/main/scala/org/apache/pekko/remote/MessageSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/MessageSerializer.scala index 6fada47d762..4fba871ab44 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/MessageSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/MessageSerializer.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.protobufv3.internal.ByteString diff --git a/remote/src/main/scala/org/apache/pekko/remote/PhiAccrualFailureDetector.scala b/remote/src/main/scala/org/apache/pekko/remote/PhiAccrualFailureDetector.scala index b7e69c5d1ed..4a03e97f376 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/PhiAccrualFailureDetector.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/PhiAccrualFailureDetector.scala @@ -21,6 +21,9 @@ import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import com.typesafe.config.Config + import pekko.annotation.InternalApi import pekko.event.EventStream import pekko.event.Logging @@ -28,8 +31,6 @@ import pekko.event.Logging.Warning import pekko.remote.FailureDetector.Clock import pekko.util.Helpers.ConfigOps -import com.typesafe.config.Config - /** * Implementation of 'The Phi Accrual Failure Detector' by Hayashibara et al. as defined in their paper: * [https://oneofus.la/have-emacs-will-hack/files/HDY04.pdf] diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala index ddd647925b0..9bcd7719924 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala @@ -20,6 +20,7 @@ import scala.util.control.Exception.Catcher import scala.util.control.NonFatal import org.apache.pekko + import pekko.ConfigurationException import pekko.Done import pekko.actor._ diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteDaemon.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteDaemon.scala index 34ac5b41e54..d290df00c03 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteDaemon.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteDaemon.scala @@ -20,6 +20,7 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ Actor, ActorPath, diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteDeployer.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteDeployer.scala index 0e08d7d15fb..fa2eca54cf3 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteDeployer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteDeployer.scala @@ -16,14 +16,15 @@ package org.apache.pekko.remote import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config._ + import pekko.ConfigurationException import pekko.actor._ import pekko.remote.routing.RemoteRouterConfig import pekko.routing._ import pekko.routing.Pool -import com.typesafe.config._ - @SerialVersionUID(1L) final case class RemoteScope(node: Address) extends Scope { def withFallback(other: Scope): Scope = this diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteDeploymentWatcher.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteDeploymentWatcher.scala index fe4f7b68414..3ded187edf6 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteDeploymentWatcher.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteDeploymentWatcher.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.InternalActorRef diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteLogMarker.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteLogMarker.scala index 1c29f81009d..de4029b6773 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteLogMarker.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteLogMarker.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.actor.Address import pekko.annotation.ApiMayChange import pekko.event.LogMarker diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala index 92910370dec..a4582eb536d 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.ActorSelectionMessage import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteSettings.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteSettings.scala index 1c20795bb6e..2212e14f7de 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteSettings.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteSettings.scala @@ -18,6 +18,9 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.ConfigurationException import pekko.actor.Props import pekko.annotation.InternalApi @@ -25,11 +28,9 @@ import pekko.event.Logging import pekko.event.Logging.LogLevel import pekko.japi.Util._ import pekko.remote.artery.ArterySettings -import pekko.util.Helpers.{ toRootLowerCase, ConfigOps, Requiring } +import pekko.util.Helpers.{ ConfigOps, Requiring, toRootLowerCase } import pekko.util.Timeout -import com.typesafe.config.Config - final class RemoteSettings(val config: Config) { import scala.jdk.CollectionConverters._ diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteTransport.scala index 2977c334661..6f577fb773a 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteTransport.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.PekkoException import pekko.actor._ diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemoteWatcher.scala b/remote/src/main/scala/org/apache/pekko/remote/RemoteWatcher.scala index 84bcadcf424..2325f091b5d 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemoteWatcher.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemoteWatcher.scala @@ -18,6 +18,7 @@ import scala.collection.mutable import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalApi import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } diff --git a/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala b/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala index 3aed2fcc754..89bc2ef68cc 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala @@ -21,12 +21,15 @@ import java.util.concurrent.TimeoutException import scala.annotation.nowarn import scala.collection.immutable import scala.collection.immutable.{ HashMap, Seq } -import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.duration._ -import scala.util.{ Failure, Success } +import scala.concurrent.{ Await, Future, Promise } import scala.util.control.NonFatal +import scala.util.{ Failure, Success } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.Done import pekko.actor._ import pekko.actor.SupervisorStrategy._ @@ -42,8 +45,6 @@ import pekko.remote.transport.PekkoPduCodec.Message import pekko.remote.transport.Transport.{ ActorAssociationEventListener, AssociationEventListener, InboundAssociation } import pekko.util.OptionVal -import com.typesafe.config.Config - /** * INTERNAL API */ diff --git a/remote/src/main/scala/org/apache/pekko/remote/RemotingLifecycleEvent.scala b/remote/src/main/scala/org/apache/pekko/remote/RemotingLifecycleEvent.scala index d7fe18b139b..f44d5e0e333 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/RemotingLifecycleEvent.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/RemotingLifecycleEvent.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.{ ActorSystem, Address } import pekko.event.{ Logging, LoggingAdapter } import pekko.event.Logging.LogLevel diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/ArterySettings.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/ArterySettings.scala index 870f4057813..fd9fc6bb103 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/ArterySettings.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/ArterySettings.scala @@ -20,6 +20,10 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.io.dns.internal.AsyncDnsResolver import pekko.stream.ActorMaterializerSettings @@ -28,9 +32,6 @@ import pekko.util.Helpers.Requiring import pekko.util.Helpers.toRootLowerCase import pekko.util.WildcardIndex -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - /** INTERNAL API */ private[pekko] final class ArterySettings private (config: Config) { import ArterySettings._ diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala index f88e236435a..066ab949771 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala @@ -29,6 +29,7 @@ import scala.util.Try import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.Done import pekko.NotUsed import pekko.actor._ diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala index f0fc9350366..01ff9b37bdf 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala @@ -28,9 +28,10 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import scala.util.control.NoStackTrace +import org.apache.pekko + import org.agrona.concurrent.ManyToOneConcurrentArrayQueue -import org.apache.pekko import pekko.Done import pekko.NotUsed import pekko.actor.ActorRef diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala index 5bcb972859a..e77fb783243 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala @@ -22,6 +22,7 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.Done import pekko.actor._ import pekko.actor.EmptyLocalActorRef diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/Control.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/Control.scala index 8cf1b573e9b..43b78412bc9 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/Control.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/Control.scala @@ -20,6 +20,7 @@ import scala.concurrent.Promise import scala.util.Try import org.apache.pekko + import pekko.Done import pekko.annotation.InternalApi import pekko.event.Logging diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/EnvelopeBufferPool.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/EnvelopeBufferPool.scala index 267c33cd24c..907c3401d83 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/EnvelopeBufferPool.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/EnvelopeBufferPool.scala @@ -15,9 +15,10 @@ package org.apache.pekko.remote.artery import java.nio.{ ByteBuffer, ByteOrder } +import org.apache.pekko + import org.agrona.concurrent.{ ManyToManyConcurrentArrayQueue, UnsafeBuffer } -import org.apache.pekko import pekko.actor.ActorRef import pekko.actor.InternalActorRef import pekko.io.DirectByteBufferPool diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/FixedSizePartitionHub.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/FixedSizePartitionHub.scala index d39cdd318ff..d570cda960f 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/FixedSizePartitionHub.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/FixedSizePartitionHub.scala @@ -13,9 +13,10 @@ package org.apache.pekko.remote.artery +import org.apache.pekko + import org.agrona.concurrent.OneToOneConcurrentArrayQueue -import org.apache.pekko import pekko.annotation.InternalApi import pekko.stream.scaladsl.PartitionHub diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/FlushBeforeDeathWatchNotification.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/FlushBeforeDeathWatchNotification.scala index 0717762e0c8..4226890750a 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/FlushBeforeDeathWatchNotification.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/FlushBeforeDeathWatchNotification.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration.FiniteDuration import scala.util.control.NonFatal import org.apache.pekko + import pekko.Done import pekko.actor.Actor import pekko.actor.ActorLogging diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/FlushOnShutdown.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/FlushOnShutdown.scala index a5036981395..d37965837a0 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/FlushOnShutdown.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/FlushOnShutdown.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration.FiniteDuration import scala.util.control.NonFatal import org.apache.pekko + import pekko.Done import pekko.actor.{ Actor, ActorLogging, Props } import pekko.annotation.InternalApi diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala index 0c4c3c3deb3..d2982ef72a3 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.actor.ActorSystem import pekko.actor.Address diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/ImmutableLongMap.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/ImmutableLongMap.scala index 2d9eaa410f9..fc55019fee3 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/ImmutableLongMap.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/ImmutableLongMap.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.reflect.ClassTag import org.apache.pekko + import pekko.util.HashCode import pekko.util.OptionVal diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/InboundEnvelope.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/InboundEnvelope.scala index 906f3551004..d042bf3a223 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/InboundEnvelope.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/InboundEnvelope.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.InternalActorRef import pekko.actor.NoSerializationVerificationNeeded diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/InboundQuarantineCheck.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/InboundQuarantineCheck.scala index c6d20941497..95823e343cf 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/InboundQuarantineCheck.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/InboundQuarantineCheck.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.ActorSelectionMessage import pekko.event.Logging import pekko.remote.HeartbeatMessage diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/MessageDispatcher.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/MessageDispatcher.scala index ba9ae0241c5..1df44c6f3cc 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/MessageDispatcher.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/MessageDispatcher.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSelection import pekko.actor.ActorSelectionMessage diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/OutboundEnvelope.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/OutboundEnvelope.scala index 6c3de542b27..9a71f3e86e7 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/OutboundEnvelope.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/OutboundEnvelope.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.NoSerializationVerificationNeeded import pekko.remote.RemoteActorRef diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala index 8315921c5ab..3bb4e6befe8 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala @@ -21,6 +21,7 @@ import scala.annotation.tailrec import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.ExtendedActorSystem diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/RemotingFlightRecorder.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/RemotingFlightRecorder.scala index 02cf0a72833..d3f62e97edc 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/RemotingFlightRecorder.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/RemotingFlightRecorder.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import java.net.InetSocketAddress import org.apache.pekko + import pekko.actor.Address import pekko.actor.ExtendedActorSystem import pekko.actor.Extension diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/SendQueue.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/SendQueue.scala index 9321e7bc604..9e9199a52c9 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/SendQueue.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/SendQueue.scala @@ -22,6 +22,7 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + import pekko.stream.Attributes import pekko.stream.Outlet import pekko.stream.SourceShape diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala index f1cdf185590..5d7c3f05c11 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala @@ -24,6 +24,7 @@ import scala.util.Try import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.actor.ActorRef import pekko.annotation.InternalApi diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala index 1d1b56d5a4e..87bd7027fb4 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import org.apache.pekko + import pekko.actor.Address import pekko.event.Logging import pekko.remote.artery.OutboundHandshake.HandshakeReq diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSink.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSink.scala index 72c261e5212..dc4b7dc88f6 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSink.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSink.scala @@ -23,11 +23,12 @@ import scala.util.Success import scala.util.Try import scala.util.control.NoStackTrace +import org.apache.pekko + import io.aeron.Aeron import io.aeron.Publication import org.agrona.concurrent.UnsafeBuffer -import org.apache.pekko import pekko.Done import pekko.stream.Attributes import pekko.stream.Inlet diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSource.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSource.scala index 17e1e5ad59d..f06a509c0b7 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSource.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/AeronSource.scala @@ -18,13 +18,14 @@ import scala.annotation.tailrec import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal -import io.aeron.{ Aeron, FragmentAssembler, Subscription } +import org.apache.pekko + import io.aeron.exceptions.{ AeronException, DriverTimeoutException } import io.aeron.logbuffer.FragmentHandler import io.aeron.logbuffer.Header +import io.aeron.{ Aeron, FragmentAssembler, Subscription } import org.agrona.DirectBuffer -import org.apache.pekko import pekko.remote.RemoteTransportException import pekko.stream.Attributes import pekko.stream.Outlet diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala index 93160b85ba2..2b8d4b02dfc 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala @@ -22,10 +22,12 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import scala.collection.immutable -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import scala.util.control.NonFatal +import org.apache.pekko + import io.aeron.Aeron import io.aeron.AvailableImageHandler import io.aeron.CncFileDescriptor @@ -43,7 +45,6 @@ import org.agrona.IoUtil import org.agrona.concurrent.BackoffIdleStrategy import org.agrona.concurrent.status.CountersReader.MetaData -import org.apache.pekko import pekko.Done import pekko.actor.Address import pekko.actor.Cancellable diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/TaskRunner.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/TaskRunner.scala index 706b72b51c8..d521a512dec 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/TaskRunner.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/aeron/TaskRunner.scala @@ -21,9 +21,10 @@ import scala.concurrent.{ Future, Promise } import scala.reflect.ClassTag import scala.util.control.NonFatal +import org.apache.pekko + import org.agrona.concurrent.{ BackoffIdleStrategy, BusySpinIdleStrategy, IdleStrategy, SleepingIdleStrategy } -import org.apache.pekko import pekko.Done import pekko.actor.ExtendedActorSystem import pekko.dispatch.{ AbstractNodeQueue, MonitorableThreadFactory } diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionProtocol.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionProtocol.scala index b0aee13dd84..c0126f09db8 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionProtocol.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionProtocol.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery.compress import org.apache.pekko + import pekko.actor.ActorRef import pekko.remote.UniqueAddress import pekko.remote.artery.ControlMessage diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionTable.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionTable.scala index 56a1aec8aab..64727d4aebb 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionTable.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/compress/CompressionTable.scala @@ -16,10 +16,11 @@ package org.apache.pekko.remote.artery.compress import java.util import java.util.Comparator +import org.apache.pekko + import org.agrona.collections.Hashing import org.agrona.collections.Object2IntHashMap -import org.apache.pekko import pekko.util.HashCode /** diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala index a97c28c08ec..837d5f25da2 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala @@ -18,9 +18,10 @@ import java.util.function.LongFunction import scala.annotation.nowarn import scala.annotation.tailrec +import org.apache.pekko + import org.agrona.collections.Long2ObjectHashMap -import org.apache.pekko import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Address diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/Events.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/Events.scala index df24175b995..9173736e28f 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/Events.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/Events.scala @@ -15,6 +15,8 @@ package org.apache.pekko.remote.artery.jfr import java.net.InetSocketAddress +import org.apache.pekko + import jdk.jfr.Category import jdk.jfr.DataAmount import jdk.jfr.Enabled @@ -23,7 +25,6 @@ import jdk.jfr.Label import jdk.jfr.StackTrace import jdk.jfr.Timespan -import org.apache.pekko import pekko.actor.Address import pekko.annotation.InternalApi import pekko.remote.UniqueAddress diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorder.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorder.scala index b722dfc9705..52aaee974ab 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorder.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorder.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery.jfr import java.net.InetSocketAddress import org.apache.pekko + import pekko.actor.Address import pekko.annotation.InternalApi import pekko.remote.UniqueAddress diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala index 10069b21687..2c69e940caa 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala @@ -28,6 +28,7 @@ import scala.util.Success import scala.util.Try import org.apache.pekko + import pekko.ConfigurationException import pekko.Done import pekko.NotUsed diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala index a7e3289518e..e346b669307 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala @@ -31,6 +31,9 @@ import javax.net.ssl.TrustManagerFactory import scala.util.Try import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.event.LogMarker import pekko.event.Logging @@ -38,8 +41,6 @@ import pekko.event.MarkerLoggingAdapter import pekko.remote.artery.tcp.ssl.SSLEngineConfig import pekko.stream.TLSRole -import com.typesafe.config.Config - /** * Config in pekko.remote.artery.ssl.config-ssl-engine * diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SSLEngineProvider.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SSLEngineProvider.scala index 2f26b27c65a..97387e4867f 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SSLEngineProvider.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SSLEngineProvider.scala @@ -18,6 +18,7 @@ import javax.net.ssl.SSLEngine import javax.net.ssl.SSLSession import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.actor.setup.Setup diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactory.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactory.scala index 78f9d1b7711..fdd63ada95e 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactory.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactory.scala @@ -16,11 +16,12 @@ package org.apache.pekko.remote.artery.tcp import java.security.SecureRandom import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.event.MarkerLoggingAdapter import com.typesafe.config.Config +import pekko.annotation.InternalApi +import pekko.event.MarkerLoggingAdapter + /** * INTERNAL API */ diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/TcpFraming.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/TcpFraming.scala index 6aca0ddd958..8bd2c296e11 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/TcpFraming.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/TcpFraming.scala @@ -18,6 +18,7 @@ import java.nio.ByteBuffer import java.nio.ByteOrder import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.Attributes import pekko.stream.impl.io.ByteStringParser diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala index 28247b67205..107b54fc5cd 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala @@ -16,13 +16,14 @@ package org.apache.pekko.remote.artery.tcp.ssl import java.io.File import java.nio.charset.StandardCharsets import java.nio.file.Files -import java.security.{ KeyStore, PrivateKey } import java.security.cert.{ Certificate, CertificateFactory, X509Certificate } +import java.security.{ KeyStore, PrivateKey } import javax.net.ssl.{ KeyManager, KeyManagerFactory, TrustManager, TrustManagerFactory } import scala.concurrent.blocking import org.apache.pekko + import pekko.annotation.InternalApi import pekko.pki.pem.{ DERPrivateKeyLoader, PEMDecoder } diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProvider.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProvider.scala index 62f3064998c..2635799f906 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProvider.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProvider.scala @@ -29,6 +29,9 @@ import javax.net.ssl.TrustManager import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.annotation.ApiMayChange import pekko.annotation.InternalApi @@ -41,8 +44,6 @@ import pekko.remote.artery.tcp.ssl.RotatingKeysSSLEngineProvider.CachedContext import pekko.remote.artery.tcp.ssl.RotatingKeysSSLEngineProvider.ConfiguredContext import pekko.stream.TLSRole -import com.typesafe.config.Config - /** * Variation on ConfigSSLEngineProvider that will periodically reload the keys and certificates * from disk, to facilitate rolling updates of certificates. diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/SSLEngineConfig.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/SSLEngineConfig.scala index 65a542badd0..eccf7ec70c0 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/SSLEngineConfig.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/SSLEngineConfig.scala @@ -13,15 +13,16 @@ package org.apache.pekko.remote.artery.tcp.ssl -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.annotation.InternalApi import com.typesafe.config.Config +import pekko.annotation.InternalApi + /** * INTERNAL API */ diff --git a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/X509Readers.scala b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/X509Readers.scala index fb03aeacbd6..5eade04a287 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/X509Readers.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/X509Readers.scala @@ -20,6 +20,7 @@ import javax.naming.ldap.LdapName import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala b/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala index 7599596e768..173d91b0707 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala @@ -19,6 +19,9 @@ import scala.annotation.nowarn import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorCell import pekko.actor.ActorContext import pekko.actor.ActorSystem @@ -35,8 +38,6 @@ import pekko.routing.Router import pekko.routing.RouterActor import pekko.routing.RouterConfig -import com.typesafe.config.ConfigFactory - /** * [[pekko.routing.RouterConfig]] implementation for remote deployment on defined * target nodes. Delegates other duties to the local [[pekko.routing.Pool]], diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/ActorRefResolveCache.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/ActorRefResolveCache.scala index 18dbc3c429c..fd0bc2ddc7c 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/ActorRefResolveCache.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/ActorRefResolveCache.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializer.scala index 291e3d0fd75..a428c10b3b1 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.serialization import java.io.NotSerializableException import org.apache.pekko + import pekko.actor.{ ActorRef, Address, ExtendedActorSystem } import pekko.protobufv3.internal.MessageLite import pekko.remote._ diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializer.scala index e619eb29ecf..895046319b3 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializer.scala @@ -16,9 +16,11 @@ package org.apache.pekko.remote.serialization import scala.collection.immutable import scala.jdk.CollectionConverters._ -import util.{ Failure, Success } - import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + +import util.{ Failure, Success } import pekko.actor.{ Deploy, ExtendedActorSystem, NoScopeGiven, Props, Scope } import pekko.protobufv3.internal.ByteString import pekko.remote.ByteStringUtils @@ -27,8 +29,6 @@ import pekko.remote.WireFormats.{ DaemonMsgCreateData, DeployData, PropsData } import pekko.routing.{ NoRouter, RouterConfig } import pekko.serialization.{ BaseSerializer, SerializationExtension, SerializerWithStringManifest } -import com.typesafe.config.{ Config, ConfigFactory } - /** * Serializes Pekko's internal DaemonMsgCreate using protobuf * for the core structure of DaemonMsgCreate, Props and Deploy. diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/MessageContainerSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/MessageContainerSerializer.scala index 118d6cb6e34..30c66f43d97 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/MessageContainerSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/MessageContainerSerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.serialization import scala.collection.immutable import org.apache.pekko + import pekko.actor.ActorSelectionMessage import pekko.actor.ExtendedActorSystem import pekko.actor.SelectChildName diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala index bb28c9573b5..6fe3b95afc6 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala @@ -22,6 +22,9 @@ import scala.concurrent.duration.{ FiniteDuration, TimeUnit } import scala.jdk.CollectionConverters._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory, ConfigRenderOptions } + import pekko.{ Done, NotUsed } import pekko.actor._ import pekko.dispatch.Dispatchers @@ -32,8 +35,6 @@ import pekko.remote.routing.RemoteRouterConfig import pekko.routing._ import pekko.serialization.{ BaseSerializer, Serialization, SerializationExtension, SerializerWithStringManifest } -import com.typesafe.config.{ Config, ConfigFactory, ConfigRenderOptions } - class MiscMessageSerializer(val system: ExtendedActorSystem) extends SerializerWithStringManifest with BaseSerializer { // WARNING! This must lazy otherwise it will deadlock the ActorSystem creation diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/ProtobufSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/ProtobufSerializer.scala index e2503d11bc9..3923237bde1 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/ProtobufSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/ProtobufSerializer.scala @@ -20,6 +20,7 @@ import java.util.concurrent.ConcurrentHashMap import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ ActorRef, ExtendedActorSystem } import pekko.event.LogMarker import pekko.event.Logging diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/SystemMessageSerializer.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/SystemMessageSerializer.scala index 714fecc91a1..9a4a3ceaa9b 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/SystemMessageSerializer.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/SystemMessageSerializer.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.serialization import org.apache.pekko + import pekko.actor.{ ActorInitializationException, ActorRef, ExtendedActorSystem, InternalActorRef } import pekko.dispatch.sysmsg._ import pekko.remote.{ ContainerFormats, SystemMessageFormats } diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/ThrowableSupport.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/ThrowableSupport.scala index 5452c7d65a2..0a5a3fda5b6 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/ThrowableSupport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/ThrowableSupport.scala @@ -18,6 +18,7 @@ import scala.util.Success import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.event.Logging import pekko.remote.ContainerFormats diff --git a/remote/src/main/scala/org/apache/pekko/remote/serialization/WrappedPayloadSupport.scala b/remote/src/main/scala/org/apache/pekko/remote/serialization/WrappedPayloadSupport.scala index 3624ad172d8..4ffba71f344 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/serialization/WrappedPayloadSupport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/serialization/WrappedPayloadSupport.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.serialization import java.nio.ByteOrder import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.event.{ Logging, LoggingAdapter } import pekko.protobufv3.internal.ByteString diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/AbstractTransportAdapter.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/AbstractTransportAdapter.scala index 97dd60a3358..0f7b82bbede 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/AbstractTransportAdapter.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/AbstractTransportAdapter.scala @@ -14,10 +14,11 @@ package org.apache.pekko.remote.transport import scala.collection.immutable -import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ ExecutionContext, Future, Promise } import org.apache.pekko + import pekko.actor._ import pekko.actor.DeadLetterSuppression import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/FailureInjectorTransportAdapter.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/FailureInjectorTransportAdapter.scala index 3c4ebe889e4..8894059e678 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/FailureInjectorTransportAdapter.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/FailureInjectorTransportAdapter.scala @@ -20,9 +20,9 @@ import scala.annotation.nowarn import scala.concurrent.{ Future, Promise } import scala.util.control.NoStackTrace -import FailureInjectorTransportAdapter._ - import org.apache.pekko + +import FailureInjectorTransportAdapter._ import pekko.PekkoException import pekko.actor.{ Address, ExtendedActorSystem } import pekko.event.{ Logging, LoggingAdapter } diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoPduCodec.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoPduCodec.scala index ecc4f0b5b7f..efccbc6dc30 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoPduCodec.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoPduCodec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.transport import scala.annotation.nowarn import org.apache.pekko + import pekko.PekkoException import pekko.actor.{ ActorRef, Address, AddressFromURIString, InternalActorRef } import pekko.protobufv3.internal.InvalidProtocolBufferException diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoProtocolTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoProtocolTransport.scala index cba06c4ccf6..72f97b455fd 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoProtocolTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/PekkoProtocolTransport.scala @@ -17,11 +17,14 @@ import java.util.concurrent.TimeoutException import scala.annotation.nowarn import scala.collection.immutable -import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.{ OnlyCauseStackTrace, PekkoException } import pekko.actor._ import pekko.actor.SupervisorStrategy.Stop @@ -38,8 +41,6 @@ import pekko.remote.transport.Transport._ import pekko.util.ByteString import pekko.util.Helpers.Requiring -import com.typesafe.config.Config - @SerialVersionUID(1L) class PekkoProtocolException( msg: String, cause: Throwable) extends PekkoException(msg, cause) with OnlyCauseStackTrace { diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala index 7321ec366ce..655b7722899 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala @@ -15,19 +15,20 @@ package org.apache.pekko.remote.transport import java.util.concurrent.{ ConcurrentHashMap, CopyOnWriteArrayList } -import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future, Promise } import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor._ import pekko.event.LoggingAdapter import pekko.remote.transport.AssociationHandle._ import pekko.remote.transport.Transport._ import pekko.util.ByteString -import com.typesafe.config.Config - /** * Transport implementation to be used for testing. * diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/ThrottlerTransportAdapter.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/ThrottlerTransportAdapter.scala index 37afab3d902..8d31c6ddaff 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/ThrottlerTransportAdapter.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/ThrottlerTransportAdapter.scala @@ -19,19 +19,20 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.nowarn import scala.annotation.tailrec import scala.collection.immutable.Queue -import scala.concurrent.{ Future, Promise } import scala.concurrent.ExecutionContext import scala.concurrent.duration._ +import scala.concurrent.{ Future, Promise } import scala.math.min -import scala.util.{ Failure, Success } import scala.util.control.NonFatal +import scala.util.{ Failure, Success } import org.apache.pekko + import pekko.actor._ import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics } import pekko.dispatch.sysmsg.{ Unwatch, Watch } import pekko.event.LoggingAdapter -import pekko.pattern.{ ask, pipe, PromiseActorRef } +import pekko.pattern.{ PromiseActorRef, ask, pipe } import pekko.remote.RARP import pekko.remote.transport.ActorTransportAdapter.AssociateUnderlying import pekko.remote.transport.AssociationHandle.{ diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/Transport.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/Transport.scala index cf835b48a71..9028cf7d5c6 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/Transport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/Transport.scala @@ -18,6 +18,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.PekkoException import pekko.actor.{ ActorRef, Address, NoSerializationVerificationNeeded } import pekko.actor.DeadLetterSuppression diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyHelpers.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyHelpers.scala index 4e2bbcc7101..2c172444c2d 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyHelpers.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyHelpers.scala @@ -19,11 +19,12 @@ import scala.annotation.nowarn import scala.util.control.NonFatal import org.apache.pekko -import pekko.PekkoException import io.netty.buffer.ByteBuf import io.netty.channel.{ ChannelHandlerContext, ChannelInboundHandlerAdapter } +import pekko.PekkoException + /** * INTERNAL API */ diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettySSLSupport.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettySSLSupport.scala index 2b6cc31cc26..84900b11550 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettySSLSupport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettySSLSupport.scala @@ -18,12 +18,13 @@ import java.net.SocketAddress import scala.annotation.nowarn import scala.jdk.CollectionConverters._ +import org.apache.pekko.event.MarkerLoggingAdapter + import io.netty.channel.Channel import io.netty.handler.ssl.SslHandler import io.netty.util.concurrent.Future import com.typesafe.config.Config -import org.apache.pekko.event.MarkerLoggingAdapter /** * INTERNAL API diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala index 28005094a9a..63b67c80883 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala @@ -18,23 +18,12 @@ import java.util.concurrent.CancellationException import java.util.concurrent.atomic.AtomicInteger import scala.annotation.nowarn -import scala.concurrent.{ blocking, ExecutionContext, Future, Promise } import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ ExecutionContext, Future, Promise, blocking } import scala.util.Try import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko -import pekko.ConfigurationException -import pekko.OnlyCauseStackTrace -import pekko.actor.{ ActorSystem, Address, ExtendedActorSystem } -import pekko.dispatch.ThreadPoolConfig -import pekko.event.Logging -import pekko.remote.RARP -import pekko.remote.transport.{ AssociationHandle, Transport } -import pekko.remote.transport.AssociationHandle.HandleEventListener -import pekko.remote.transport.Transport._ -import pekko.util.{ Helpers, OptionVal } -import pekko.util.Helpers.Requiring import io.netty.bootstrap.{ Bootstrap => ClientBootstrap, ServerBootstrap } import io.netty.buffer.{ @@ -44,6 +33,10 @@ import io.netty.buffer.{ Unpooled, UnpooledByteBufAllocator } +import io.netty.channel.group.{ ChannelGroup, ChannelGroupFuture, ChannelMatchers, DefaultChannelGroup } +import io.netty.channel.nio.NioIoHandler +import io.netty.channel.socket.SocketChannel +import io.netty.channel.socket.nio.{ NioServerSocketChannel, NioSocketChannel } import io.netty.channel.{ Channel, ChannelFuture, @@ -54,10 +47,6 @@ import io.netty.channel.{ EventLoopGroup, MultiThreadIoEventLoopGroup } -import io.netty.channel.group.{ ChannelGroup, ChannelGroupFuture, ChannelMatchers, DefaultChannelGroup } -import io.netty.channel.nio.NioIoHandler -import io.netty.channel.socket.SocketChannel -import io.netty.channel.socket.nio.{ NioServerSocketChannel, NioSocketChannel } import io.netty.handler.codec.{ LengthFieldBasedFrameDecoder, LengthFieldPrepender } import io.netty.handler.flush.FlushConsolidationHandler import io.netty.handler.ssl.SslHandler @@ -65,6 +54,18 @@ import io.netty.util.concurrent.GlobalEventExecutor import com.typesafe.config.Config +import pekko.ConfigurationException +import pekko.OnlyCauseStackTrace +import pekko.actor.{ ActorSystem, Address, ExtendedActorSystem } +import pekko.dispatch.ThreadPoolConfig +import pekko.event.Logging +import pekko.remote.RARP +import pekko.remote.transport.{ AssociationHandle, Transport } +import pekko.remote.transport.AssociationHandle.HandleEventListener +import pekko.remote.transport.Transport._ +import pekko.util.{ Helpers, OptionVal } +import pekko.util.Helpers.Requiring + @deprecated("Classic remoting is deprecated, use Artery", "Akka 2.6.0") object NettyFutureBridge { def apply(nettyFuture: ChannelFuture): Future[Channel] = { diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala index c3586698cb7..af0110f0a42 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala @@ -31,6 +31,7 @@ import scala.annotation.nowarn import scala.util.Try import org.apache.pekko + import pekko.actor.ActorSystem import pekko.event.LogMarker import pekko.event.Logging diff --git a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/TcpSupport.scala b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/TcpSupport.scala index 053590f1923..31076141c21 100644 --- a/remote/src/main/scala/org/apache/pekko/remote/transport/netty/TcpSupport.scala +++ b/remote/src/main/scala/org/apache/pekko/remote/transport/netty/TcpSupport.scala @@ -19,6 +19,11 @@ import scala.annotation.nowarn import scala.concurrent.{ Future, Promise } import org.apache.pekko + +import io.netty.buffer.{ ByteBuf, ByteBufUtil, Unpooled } +import io.netty.channel.{ Channel, ChannelHandlerContext } +import io.netty.util.AttributeKey + import pekko.actor.Address import pekko.event.LoggingAdapter import pekko.remote.transport.AssociationHandle @@ -26,10 +31,6 @@ import pekko.remote.transport.AssociationHandle.{ Disassociated, HandleEvent, Ha import pekko.remote.transport.Transport.AssociationEventListener import pekko.util.ByteString -import io.netty.buffer.{ ByteBuf, ByteBufUtil, Unpooled } -import io.netty.channel.{ Channel, ChannelHandlerContext } -import io.netty.util.AttributeKey - private[remote] object TcpHandlers { private val LISTENER = AttributeKey.valueOf[HandleEventListener]("listener") } diff --git a/remote/src/test/scala/org/apache/pekko/remote/AccrualFailureDetectorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/AccrualFailureDetectorSpec.scala index d547203ff85..1136bdcb71c 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/AccrualFailureDetectorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/AccrualFailureDetectorSpec.scala @@ -18,6 +18,7 @@ import scala.collection.immutable.TreeMap import scala.concurrent.duration._ import org.apache.pekko + import pekko.remote.FailureDetector.Clock import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/ConfigSSLEngineProviderSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/ConfigSSLEngineProviderSpec.scala index 08e21e5c750..5878f3313cb 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/ConfigSSLEngineProviderSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/ConfigSSLEngineProviderSpec.scala @@ -12,11 +12,12 @@ package org.apache.pekko.remote import scala.annotation.nowarn import org.apache.pekko -import pekko.remote.transport.netty.ConfigSSLEngineProvider -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.remote.transport.netty.ConfigSSLEngineProvider +import pekko.testkit.PekkoSpec + @nowarn("msg=deprecated") class ConfigSSLEngineProviderSpec extends PekkoSpec( diff --git a/remote/src/test/scala/org/apache/pekko/remote/DaemonicSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/DaemonicSpec.scala index 3737c920f49..3c12d1418b9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/DaemonicSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/DaemonicSpec.scala @@ -17,11 +17,12 @@ import scala.concurrent.duration._ import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.actor.{ ActorSystem, Address } -import pekko.testkit._ import com.typesafe.config.ConfigFactory +import pekko.actor.{ ActorSystem, Address } +import pekko.testkit._ + class DaemonicSpec extends PekkoSpec { "Remoting configured with daemonic = on" must { diff --git a/remote/src/test/scala/org/apache/pekko/remote/DeadlineFailureDetectorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/DeadlineFailureDetectorSpec.scala index 5477a76e394..548bcf8a3e1 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/DeadlineFailureDetectorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/DeadlineFailureDetectorSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + import pekko.remote.FailureDetector.Clock import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/EndpointRegistrySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/EndpointRegistrySpec.scala index 2e683beafb8..68c554214b4 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/EndpointRegistrySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/EndpointRegistrySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Address, Props } import pekko.remote.EndpointManager._ import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/FailureDetectorRegistrySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/FailureDetectorRegistrySpec.scala index c6851491ca8..ded2043882f 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/FailureDetectorRegistrySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/FailureDetectorRegistrySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote import scala.concurrent.duration._ import org.apache.pekko + import pekko.remote.FailureDetector.Clock import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/LogSourceSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/LogSourceSpec.scala index 839fd889260..58888daee94 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/LogSourceSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/LogSourceSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorLogging import pekko.actor.Deploy diff --git a/remote/src/test/scala/org/apache/pekko/remote/MessageLoggingSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/MessageLoggingSpec.scala index 476a28929c1..136e59aa775 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/MessageLoggingSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/MessageLoggingSpec.scala @@ -13,17 +13,17 @@ package org.apache.pekko.remote -import MessageLoggingSpec._ - import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + +import MessageLoggingSpec._ import pekko.actor.{ Actor, ActorIdentity, ActorSystem, ExtendedActorSystem, Identify, Props, RootActorPath } import pekko.serialization.jackson.CborSerializable import pekko.testkit.{ ImplicitSender, PekkoSpec, TestKit } import pekko.testkit.EventFilter import pekko.testkit.TestActors -import com.typesafe.config.{ Config, ConfigFactory } - object MessageLoggingSpec { def config(artery: Boolean) = ConfigFactory.parseString(s""" pekko.loglevel = info // debug makes this test fail intentionally diff --git a/remote/src/test/scala/org/apache/pekko/remote/NetworkFailureSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/NetworkFailureSpec.scala index d3486ea23db..a663a733592 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/NetworkFailureSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/NetworkFailureSpec.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicBoolean import scala.concurrent.Future import org.apache.pekko + import pekko.testkit.DefaultTimeout import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/ReliableDeliverySupervisorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/ReliableDeliverySupervisorSpec.scala index 4529eb21fe3..0056a3be7ff 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/ReliableDeliverySupervisorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/ReliableDeliverySupervisorSpec.scala @@ -24,6 +24,9 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorRef, Address, Nobody, RootActorPath, Terminated } import pekko.remote.EndpointManager.{ Link, ResendState, Send } import pekko.remote.ReliableDeliverySupervisor.AckFromReader @@ -31,8 +34,6 @@ import pekko.remote.transport._ import pekko.testkit.{ ImplicitSender, PekkoSpec, TestActorRef, TestProbe } import pekko.util.OptionVal -import com.typesafe.config.ConfigFactory - object ReliableDeliverySupervisorSpec { val config = ConfigFactory.parseString(""" pekko { diff --git a/remote/src/test/scala/org/apache/pekko/remote/RemoteConfigSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/RemoteConfigSpec.scala index 85e25942870..efacce7b846 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/RemoteConfigSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/RemoteConfigSpec.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import io.netty.buffer.PooledByteBufAllocator + import pekko.remote.transport.PekkoProtocolSettings import pekko.remote.transport.netty.{ NettyTransportSettings, SSLSettings } import pekko.testkit.PekkoSpec import pekko.util.Helpers import pekko.util.Helpers.ConfigOps -import io.netty.buffer.PooledByteBufAllocator - @nowarn // classic deprecated class RemoteConfigSpec extends PekkoSpec(""" pekko.actor.provider = remote diff --git a/remote/src/test/scala/org/apache/pekko/remote/RemoteConsistentHashingRouterSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/RemoteConsistentHashingRouterSpec.scala index 4403812b587..72caa85619f 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/RemoteConsistentHashingRouterSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/RemoteConsistentHashingRouterSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.actor.Address import pekko.routing.ActorSelectionRoutee import pekko.routing.ConsistentHash diff --git a/remote/src/test/scala/org/apache/pekko/remote/RemoteDeployerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/RemoteDeployerSpec.scala index d840b01709f..95ed920e526 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/RemoteDeployerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/RemoteDeployerSpec.scala @@ -14,13 +14,14 @@ package org.apache.pekko.remote import org.apache.pekko + +import com.typesafe.config._ + import pekko.ConfigurationException import pekko.actor._ import pekko.routing._ import pekko.testkit._ -import com.typesafe.config._ - object RemoteDeployerSpec { val deployerConf = ConfigFactory.parseString( """ diff --git a/remote/src/test/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala index 2c67cab2bc7..695387ce2f7 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/RemoteFeaturesSpec.scala @@ -17,6 +17,10 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.AddressFromURIString @@ -34,9 +38,6 @@ import pekko.testkit.EventFilter import pekko.testkit.ImplicitSender import pekko.testkit.TestProbe -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object RemoteFeaturesSpec { val instances = 1 diff --git a/remote/src/test/scala/org/apache/pekko/remote/RemoteRouterSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/RemoteRouterSpec.scala index 612e95e034d..6945f83b30b 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/RemoteRouterSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/RemoteRouterSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.remote import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.remote.routing._ import pekko.routing._ import pekko.testkit._ import pekko.testkit.TestActors.echoActorProps -import com.typesafe.config._ - object RemoteRouterSpec { class Parent extends Actor { def receive = { diff --git a/remote/src/test/scala/org/apache/pekko/remote/Ticket1978CommunicationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/Ticket1978CommunicationSpec.scala index eeb1c99e589..527a86b5a89 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/Ticket1978CommunicationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/Ticket1978CommunicationSpec.scala @@ -18,22 +18,23 @@ import java.security.NoSuchAlgorithmException import java.util.zip.GZIPOutputStream import scala.annotation.nowarn -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import scala.reflect.classTag import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.event.NoMarkerLogging import pekko.pattern.ask -import pekko.remote.Configuration.{ getCipherConfig, CipherConfig } +import pekko.remote.Configuration.{ CipherConfig, getCipherConfig } import pekko.remote.transport.netty.ConfigSSLEngineProvider import pekko.remote.transport.netty.SSLSettings import pekko.testkit._ import pekko.util.Timeout -import com.typesafe.config._ - @nowarn("msg=deprecated") object Configuration { // set this in your JAVA_OPTS to see all ssl debug info: "-Djavax.net.debug=ssl,keymanager" diff --git a/remote/src/test/scala/org/apache/pekko/remote/Ticket1978ConfigSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/Ticket1978ConfigSpec.scala index b7cb9934b43..46dfaa6d2d8 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/Ticket1978ConfigSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/Ticket1978ConfigSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote import org.apache.pekko + import pekko.remote.transport.netty.SSLSettings import pekko.testkit._ diff --git a/remote/src/test/scala/org/apache/pekko/remote/TransientSerializationErrorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/TransientSerializationErrorSpec.scala index cf5ff06f2e5..4aeb4da210d 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/TransientSerializationErrorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/TransientSerializationErrorSpec.scala @@ -18,12 +18,13 @@ import java.io.NotSerializableException import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.{ ActorSystem, ExtendedActorSystem, RootActorPath } import pekko.serialization.SerializerWithStringManifest import pekko.testkit.{ PekkoSpec, TestActors, TestKit } -import com.typesafe.config.{ Config, ConfigFactory } - object TransientSerializationErrorSpec { object ManifestNotSerializable object ManifestIllegal diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/ActorRefResolveCacheQuarantineSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/ActorRefResolveCacheQuarantineSpec.scala index c7fe08ee8a3..e7f24b109e9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/ActorRefResolveCacheQuarantineSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/ActorRefResolveCacheQuarantineSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.pattern.ask import pekko.remote.RARP import pekko.testkit.DeadLettersFilter diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/ActorSelectionQueueDistributionSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/ActorSelectionQueueDistributionSpec.scala index a876940506e..6ebcc075603 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/ActorSelectionQueueDistributionSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/ActorSelectionQueueDistributionSpec.scala @@ -20,6 +20,10 @@ package org.apache.pekko.remote.artery import java.nio.ByteBuffer import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + import pekko.actor.SelectChildName import pekko.actor.SelectChildPattern import pekko.actor.SelectParent @@ -29,9 +33,6 @@ import pekko.protobufv3.internal.UnknownFieldSet import pekko.remote.ContainerFormats import pekko.remote.ContainerFormats.PatternType -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpec - class ActorSelectionQueueDistributionSpec extends AnyWordSpec with Matchers { private val OrdinaryQueueIndex = 2 diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/ArteryMultiNodeSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/ArteryMultiNodeSpec.scala index 1be9747afc8..3d39dbc252c 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/ArteryMultiNodeSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/ArteryMultiNodeSpec.scala @@ -14,15 +14,16 @@ package org.apache.pekko.remote.artery import org.apache.pekko -import pekko.actor.{ ActorSystem, Address, BootstrapSetup, RootActorPath } -import pekko.actor.setup.ActorSystemSetup -import pekko.remote.RARP -import pekko.testkit.{ PekkoSpec, SocketUtil } import org.scalatest.{ Outcome, Pending } import com.typesafe.config.{ Config, ConfigFactory } +import pekko.actor.{ ActorSystem, Address, BootstrapSetup, RootActorPath } +import pekko.actor.setup.ActorSystemSetup +import pekko.remote.RARP +import pekko.testkit.{ PekkoSpec, SocketUtil } + /** * Base class for remoting tests what needs to test interaction between a "local" actor system * which is always created (the usual PekkoSpec system), and multiple additional actor systems over artery diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/BindCanonicalAddressSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/BindCanonicalAddressSpec.scala index fcb824ff5a7..a2b414e1820 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/BindCanonicalAddressSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/BindCanonicalAddressSpec.scala @@ -19,15 +19,16 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration import org.apache.pekko -import pekko.actor.{ ActorSystem, Address } -import pekko.remote.transport.NettyTransportSpec._ -import pekko.testkit.SocketUtil import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.{ ActorSystem, Address } +import pekko.remote.transport.NettyTransportSpec._ +import pekko.testkit.SocketUtil + trait BindCanonicalAddressBehaviors { this: AnyWordSpec with Matchers => def arteryConnectionTest(transport: String, isUDP: Boolean): Unit = { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateFlushSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateFlushSpec.scala index 40594817fac..c263509b458 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateFlushSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateFlushSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.Address import pekko.actor.ExtendedActorSystem import pekko.remote.UniqueAddress diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateHandshakeSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateHandshakeSpec.scala index 31f9dabbc92..6ae445f9e8e 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateHandshakeSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/DuplicateHandshakeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.Address import pekko.actor.ExtendedActorSystem import pekko.remote.UniqueAddress diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/EnvelopeBufferSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/EnvelopeBufferSpec.scala index 2a57a0e1ef5..0e94c8e741e 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/EnvelopeBufferSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/EnvelopeBufferSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import java.nio.{ ByteBuffer, ByteOrder } import org.apache.pekko + import pekko.actor._ import pekko.remote.artery.compress.{ CompressionTable, CompressionTestUtils, InboundCompressions } import pekko.serialization.Serialization diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/FlushOnShutdownSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/FlushOnShutdownSpec.scala index 59ae026d48f..e7f8065f978 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/FlushOnShutdownSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/FlushOnShutdownSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorIdentity, Identify, Props } import pekko.testkit.TestProbe diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeDenySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeDenySpec.scala index 0c05767f98d..987df5ac77d 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeDenySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeDenySpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify } import pekko.actor.RootActorPath import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object HandshakeDenySpec { val commonConfig = ConfigFactory.parseString(s""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeFailureSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeFailureSpec.scala index f29e04a2f67..894e78a2450 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeFailureSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeFailureSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, Identify } import pekko.testkit.ImplicitSender import pekko.testkit.TestActors import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object HandshakeFailureSpec { val commonConfig = ConfigFactory.parseString(s""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala index 2c327445b72..336ef07d418 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/HandshakeRetrySpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.testkit.ImplicitSender import pekko.testkit.TestActors -import com.typesafe.config.ConfigFactory - object HandshakeRetrySpec { val commonConfig = ConfigFactory.parseString(s""" pekko.remote.artery.advanced.handshake-timeout = 10s diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala index 05770d2bd16..254db65ff7e 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/HarmlessQuarantineSpec.scala @@ -17,6 +17,10 @@ import scala.concurrent.Future import scala.concurrent.Promise import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.time.Span + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Address @@ -27,9 +31,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.TestActors import pekko.testkit.TestProbe -import org.scalatest.concurrent.Eventually -import org.scalatest.time.Span - // pekko.remote.artery.propagate-harmless-quarantine-events defaults to off since Pekko 2.0.0 class HarmlessQuarantineSpec extends ArteryMultiNodeSpec(""" pekko.loglevel=INFO diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/InboundControlJunctionSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/InboundControlJunctionSpec.scala index afeabbf7601..afb957d4a11 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/InboundControlJunctionSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/InboundControlJunctionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import scala.util.Try import org.apache.pekko + import pekko.Done import pekko.actor.Address import pekko.remote.UniqueAddress diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/InboundHandshakeSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/InboundHandshakeSpec.scala index 8249f551e01..7458f1fd5fb 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/InboundHandshakeSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/InboundHandshakeSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Address import pekko.remote.UniqueAddress import pekko.remote.artery.OutboundHandshake.HandshakeReq diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/LargeMessagesStreamSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/LargeMessagesStreamSpec.scala index 1c4e9c7c8b5..fde1a1dd362 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/LargeMessagesStreamSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/LargeMessagesStreamSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, ActorSelection, Props, RootActorPath } import pekko.remote.{ RARP, RemoteActorRef } import pekko.testkit.JavaSerializable diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/LateConnectSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/LateConnectSpec.scala index d12b6ab8140..6e65ac3fafa 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/LateConnectSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/LateConnectSpec.scala @@ -16,14 +16,15 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.RootActorPath import pekko.remote.RARP import pekko.testkit.ImplicitSender import pekko.testkit.TestActors import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object LateConnectSpec { val config = ConfigFactory.parseString(s""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/LruBoundedCacheSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/LruBoundedCacheSpec.scala index 972a0c19266..98fb23e511c 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/LruBoundedCacheSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/LruBoundedCacheSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.util.Random import org.apache.pekko + import pekko.testkit.PekkoSpec import pekko.util.Unsafe diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/MetadataCarryingSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/MetadataCarryingSpec.scala index 32aa6c9bb06..1af1a52e374 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/MetadataCarryingSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/MetadataCarryingSpec.scala @@ -13,11 +13,12 @@ package org.apache.pekko.remote.artery -import java.nio.{ ByteBuffer, CharBuffer } import java.nio.charset.StandardCharsets +import java.nio.{ ByteBuffer, CharBuffer } import java.util.concurrent.atomic.AtomicReference import org.apache.pekko + import pekko.actor._ import pekko.testkit.ImplicitSender import pekko.testkit.JavaSerializable diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundControlJunctionSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundControlJunctionSpec.scala index 3fd2397f519..535897897a4 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundControlJunctionSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundControlJunctionSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.Address import pekko.remote.UniqueAddress import pekko.stream.scaladsl.Keep diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundHandshakeSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundHandshakeSpec.scala index f459d16abe9..dfa9bcf0fdb 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundHandshakeSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundHandshakeSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Address import pekko.remote.UniqueAddress import pekko.remote.artery.OutboundHandshake.HandshakeReq diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala index 9a750e44a1d..1a4dd8703f1 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/OutboundIdleShutdownSpec.scala @@ -18,6 +18,11 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.Eventually +import org.scalatest.time.Span +import org.scalatest.time.Span.convertSpanToDuration + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Address @@ -28,10 +33,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.TestActors import pekko.testkit.TestProbe -import org.scalatest.concurrent.Eventually -import org.scalatest.time.Span -import org.scalatest.time.Span.convertSpanToDuration - class OutboundIdleShutdownSpec extends ArteryMultiNodeSpec(""" pekko.loglevel=INFO pekko.remote.artery.propagate-harmless-quarantine-events = on diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorRefProviderSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorRefProviderSpec.scala index b52fbbb3edd..0def3f71cec 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorRefProviderSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorRefProviderSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.{ EmptyLocalActorRef, InternalActorRef } import pekko.actor.ActorRefScope import pekko.actor.ExtendedActorSystem diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorSelectionSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorSelectionSpec.scala index 30461e2bd8d..cbe15698e6b 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorSelectionSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorSelectionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorIdentity, diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteConnectionSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteConnectionSpec.scala index 997bb106caf..ca76f988361 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteConnectionSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteConnectionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorSystem import pekko.testkit.{ EventFilter, ImplicitSender, TestActors, TestEvent, TestProbe } diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeathWatchSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeathWatchSpec.scala index d3f7aa17d91..fc9ce7e8343 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeathWatchSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeathWatchSpec.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.actor.RootActorPath import pekko.remote.RARP import pekko.testkit._ import pekko.testkit.SocketUtil -import com.typesafe.config.ConfigFactory - object RemoteDeathWatchSpec { val otherPort = ArteryMultiNodeSpec.freePort(ConfigFactory.load()) diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeployerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeployerSpec.scala index 0fe7dfa3b5f..09cd79a674d 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeployerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeployerSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.remote.artery import org.apache.pekko + +import com.typesafe.config._ + import pekko.ConfigurationException import pekko.actor._ import pekko.remote.RemoteScope import pekko.routing._ import pekko.testkit._ -import com.typesafe.config._ - object RemoteDeployerSpec { val deployerConf = ConfigFactory.parseString(""" pekko.actor.deployment { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeploymentSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeploymentSpec.scala index 34583b0485c..444c0f1626b 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeploymentSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteDeploymentSpec.scala @@ -14,12 +14,13 @@ package org.apache.pekko.remote.artery import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.remote.RARP import pekko.testkit._ -import com.typesafe.config._ - object RemoteDeploymentSpec { class Echo1 extends Actor { var target: ActorRef = context.system.deadLetters diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteFailureSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteFailureSpec.scala index 037f08659ff..cd827d91844 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteFailureSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteFailureSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import org.apache.pekko import org.apache.pekko.actor.ActorIdentity import org.apache.pekko.actor.Identify + import pekko.remote.EndpointDisassociatedException import pekko.serialization.jackson.CborSerializable import pekko.testkit.{ EventFilter, ImplicitSender, TestActors, TestEvent } diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSerializationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSerializationSpec.scala index 31c1ebcf304..dc9491943af 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSerializationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSerializationSpec.scala @@ -13,14 +13,15 @@ package org.apache.pekko.remote.artery -import java.nio.{ ByteBuffer, CharBuffer } import java.nio.ByteOrder import java.nio.charset.StandardCharsets +import java.nio.{ ByteBuffer, CharBuffer } import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ ActorRef, ActorSystem, ExtendedActorSystem, InternalActorRef } import pekko.event._ import pekko.testkit.{ EventFilter, PekkoSpec, TestProbe } diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSpec.scala index 470e923824c..357c43af7cc 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteInstrumentsSpec.scala @@ -13,12 +13,12 @@ package org.apache.pekko.remote.artery -import org.scalacheck.{ Arbitrary, Gen } -import org.scalatestplus.scalacheck.Checkers - import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import org.scalacheck.{ Arbitrary, Gen } +import org.scalatestplus.scalacheck.Checkers + class RemoteInstrumentsSpec extends AnyWordSpec with Matchers with Checkers { case class KeyLen(k: Key, l: Len) { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteMessageSerializationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteMessageSerializationSpec.scala index 0e23268cff0..4b1f11de876 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteMessageSerializationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteMessageSerializationSpec.scala @@ -20,6 +20,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Dropped, PoisonPill, Props } import pekko.remote.{ AssociationErrorEvent, DisassociatedEvent, OversizedPayloadException, RARP } import pekko.testkit.{ EventFilter, ImplicitSender, TestActors, TestProbe } diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteRouterSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteRouterSpec.scala index b0ce4190bf8..894eb83c5e5 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteRouterSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteRouterSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote.artery import scala.collection.immutable import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.remote.{ RARP, RemoteScope } import pekko.remote.routing._ @@ -23,8 +26,6 @@ import pekko.routing._ import pekko.testkit._ import pekko.testkit.TestActors.echoActorProps -import com.typesafe.config._ - object RemoteRouterSpec { class Parent extends Actor { def receive = { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteSendConsistencySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteSendConsistencySpec.scala index 91f7b71f162..87564f01e77 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteSendConsistencySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteSendConsistencySpec.scala @@ -18,6 +18,9 @@ import java.util.UUID import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorPath @@ -30,8 +33,6 @@ import pekko.actor.Props import pekko.actor.RootActorPath import pekko.testkit.{ ImplicitSender, TestActors, TestProbe } -import com.typesafe.config.{ Config, ConfigFactory } - class ArteryUpdSendConsistencyWithOneLaneSpec extends AbstractRemoteSendConsistencySpec(ConfigFactory.parseString(""" pekko.remote.artery.transport = aeron-udp diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteWatcherSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteWatcherSpec.scala index 1a5402a5be0..f8d9fcd5a38 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteWatcherSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemoteWatcherSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.remote._ import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object RemoteWatcherSpec { class TestActorProxy(testActor: ActorRef) extends Actor { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/RemotingFlightRecorderSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/RemotingFlightRecorderSpec.scala index 197165e157c..fddf6b0d9ce 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/RemotingFlightRecorderSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/RemotingFlightRecorderSpec.scala @@ -14,10 +14,11 @@ package org.apache.pekko.remote.artery import org.apache.pekko -import pekko.testkit.PekkoSpec import org.scalatest.matchers.should.Matchers +import pekko.testkit.PekkoSpec + class RemotingFlightRecorderSpec extends PekkoSpec with Matchers { "The RemotingFlightRecorder" must { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/SendQueueSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/SendQueueSpec.scala index e630fdeae24..6b70d1bbf87 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/SendQueueSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/SendQueueSpec.scala @@ -17,9 +17,10 @@ import java.util.Queue import scala.concurrent.duration._ +import org.apache.pekko + import org.agrona.concurrent.ManyToOneConcurrentArrayQueue -import org.apache.pekko import pekko.actor.Actor import pekko.actor.Props import pekko.stream.scaladsl.Keep diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/SerializationErrorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/SerializationErrorSpec.scala index 1b2b791cdad..0cd7bad9d3f 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/SerializationErrorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/SerializationErrorSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.artery import java.nio.charset.StandardCharsets import org.apache.pekko + import pekko.actor.{ ActorIdentity, Identify, RootActorPath } import pekko.testkit.EventFilter import pekko.testkit.ImplicitSender diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageAckerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageAckerSpec.scala index b039f09e281..0f885dc7d5c 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageAckerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageAckerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery import org.apache.pekko + import pekko.actor.Address import pekko.remote.UniqueAddress import pekko.remote.artery.SystemMessageDelivery._ diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageDeliverySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageDeliverySpec.scala index ba87667451b..cc785301362 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageDeliverySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/SystemMessageDeliverySpec.scala @@ -19,6 +19,10 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.actor.ActorIdentity import pekko.actor.ActorSystem @@ -40,9 +44,6 @@ import pekko.testkit.TestEvent import pekko.testkit.TestProbe import pekko.util.OptionVal -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SystemMessageDeliverySpec { case class TestSysMsg(s: String) extends SystemMessageDelivery.AckedDeliveryMessage diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/TestContext.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/TestContext.scala index 0212214d836..a6505218f52 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/TestContext.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/TestContext.scala @@ -21,6 +21,9 @@ import scala.concurrent.ExecutionContext import scala.concurrent.Future import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.ActorRef import pekko.actor.Address @@ -29,8 +32,6 @@ import pekko.remote.artery.InboundControlJunction.ControlMessageObserver import pekko.remote.artery.InboundControlJunction.ControlMessageSubject import pekko.util.OptionVal -import com.typesafe.config.ConfigFactory - private[remote] class TestInboundContext( override val localAddress: UniqueAddress, val controlSubject: TestControlMessageSubject = new TestControlMessageSubject, diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/UntrustedSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/UntrustedSpec.scala index 4abf7b1d0d5..65ba8252649 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/UntrustedSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/UntrustedSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote.artery import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -34,8 +37,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.TestEvent import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object UntrustedSpec { final case class IdentifyReq(path: String) extends CborSerializable final case class StopChild(name: String) extends CborSerializable diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/aeron/AeronSinkSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/aeron/AeronSinkSpec.scala index 1533db83f6a..dfcea29a9b2 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/aeron/AeronSinkSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/aeron/AeronSinkSpec.scala @@ -20,11 +20,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.control.NoStackTrace +import org.apache.pekko + import io.aeron.Aeron import io.aeron.driver.MediaDriver import org.agrona.IoUtil -import org.apache.pekko import pekko.actor.ExtendedActorSystem import pekko.remote.artery.aeron.AeronSink.GaveUpMessageException import pekko.stream.scaladsl.Sink diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/compress/CompressionIntegrationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/compress/CompressionIntegrationSpec.scala index 834c6d6065a..1d00b90bbc8 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/compress/CompressionIntegrationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/compress/CompressionIntegrationSpec.scala @@ -18,6 +18,9 @@ import java.io.NotSerializableException import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.actor.ExtendedActorSystem import pekko.remote.artery.ArteryMultiNodeSpec @@ -25,8 +28,6 @@ import pekko.remote.artery.compress.CompressionProtocol.Events import pekko.serialization.SerializerWithStringManifest import pekko.testkit._ -import com.typesafe.config.ConfigFactory - object CompressionIntegrationSpec { val commonConfig = ConfigFactory.parseString(s""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/compress/HandshakeShouldDropCompressionTableSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/compress/HandshakeShouldDropCompressionTableSpec.scala index cfd8f9d0473..488d097406d 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/compress/HandshakeShouldDropCompressionTableSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/compress/HandshakeShouldDropCompressionTableSpec.scala @@ -17,6 +17,11 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfter + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, ActorSystem, Identify } import pekko.pattern.ask import pekko.remote.RARP @@ -25,10 +30,6 @@ import pekko.remote.artery.compress.CompressionProtocol.Events.{ Event, Received import pekko.testkit._ import pekko.util.Timeout -import org.scalatest.BeforeAndAfter - -import com.typesafe.config.ConfigFactory - object HandshakeShouldDropCompressionTableSpec { val commonConfig = ConfigFactory.parseString(s""" pekko { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/compress/OutboundCompressionSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/compress/OutboundCompressionSpec.scala index ce18ae0cb31..4ce22d3058f 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/compress/OutboundCompressionSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/compress/OutboundCompressionSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.artery.compress import org.apache.pekko + import pekko.actor._ import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorderSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorderSpec.scala index 7e5da9765bc..dc1dc229ac3 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorderSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/jfr/JFRRemotingFlightRecorderSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.remote.artery.jfr import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.remote.artery.NoOpRemotingFlightRecorder import pekko.remote.artery.RemotingFlightRecorder import pekko.testkit.PekkoSpec import pekko.testkit.TestKit -import com.typesafe.config.ConfigFactory - class JFRRemotingFlightRecorderSpec extends PekkoSpec { "The RemotingFlightRecorder" must { diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ArteryConfigSSLEngineProviderSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ArteryConfigSSLEngineProviderSpec.scala index 6642357d1b1..d3091620afa 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ArteryConfigSSLEngineProviderSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ArteryConfigSSLEngineProviderSpec.scala @@ -10,10 +10,11 @@ package org.apache.pekko.remote.artery.tcp import org.apache.pekko -import pekko.testkit.PekkoSpec import com.typesafe.config.ConfigFactory +import pekko.testkit.PekkoSpec + class ArteryConfigSSLEngineProviderSpec extends PekkoSpec( ConfigFactory.parseString(""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactorySpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactorySpec.scala index c91bd6964db..b3d18d5649a 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactorySpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/SecureRandomFactorySpec.scala @@ -19,6 +19,7 @@ import java.security.SecureRandom import java.util.zip.GZIPOutputStream import org.apache.pekko + import pekko.event.NoMarkerLogging import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TcpFramingSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TcpFramingSpec.scala index c927853dfbc..172a85cbdd8 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TcpFramingSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TcpFramingSpec.scala @@ -17,6 +17,7 @@ package tcp import scala.util.Random import org.apache.pekko + import pekko.stream.scaladsl.Flow import pekko.stream.scaladsl.Framing.FramingException import pekko.stream.scaladsl.Sink diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TlsTcpSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TlsTcpSpec.scala index 5a22054bfdd..9f00a681a56 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TlsTcpSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/TlsTcpSpec.scala @@ -22,6 +22,12 @@ import scala.concurrent.duration._ import scala.util.{ Failure, Success } import org.apache.pekko + +import org.scalatest.matchers.should.Matchers + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorIdentity, ActorPath, ActorRef, Identify, RootActorPath } import pekko.actor.setup.ActorSystemSetup import pekko.remote.artery.tcp.ssl.CipherSuiteSupportCheck @@ -30,11 +36,6 @@ import pekko.testkit.ImplicitSender import pekko.testkit.TestActors import pekko.testkit.TestProbe -import org.scalatest.matchers.should.Matchers - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - class TlsTcpWithDefaultConfigSpec extends TlsTcpSpec(ConfigFactory.empty()) class TlsTcpWithSHA1PRNGSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/CipherSuiteSupportCheck.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/CipherSuiteSupportCheck.scala index d9061a5b2aa..251e9c67d87 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/CipherSuiteSupportCheck.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/CipherSuiteSupportCheck.scala @@ -19,13 +19,14 @@ import javax.net.ssl.SSLEngine import scala.util.Try import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorSystem import pekko.actor.ExtendedActorSystem import pekko.event.NoMarkerLogging import pekko.remote.artery.tcp.SecureRandomFactory -import com.typesafe.config.Config - object CipherSuiteSupportCheck { /** diff --git a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala index 670e0a33919..bc9b7326b2d 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala @@ -27,6 +27,11 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + +import org.scalatest.Outcome + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorIdentity import pekko.actor.ActorPath import pekko.actor.ActorRef @@ -45,10 +50,6 @@ import pekko.testkit.TestActors import pekko.testkit.TestProbe import pekko.util.JavaVersion -import org.scalatest.Outcome - -import com.typesafe.config.ConfigFactory - // This is a simplification Spec. It doesn't rely on changing files. class RotatingProviderWithStaticKeysSpec extends RotatingKeysSSLEngineProviderSpec(RotatingKeysSSLEngineProviderSpec.resourcesConfig) { diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/ActorsLeakSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/ActorsLeakSpec.scala index 13d8bd3277d..b9124fb77d0 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/ActorsLeakSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/ActorsLeakSpec.scala @@ -19,6 +19,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor._ import pekko.actor.dungeon.ChildrenContainer import pekko.remote.{ AddressUidExtension, RARP } @@ -26,8 +29,6 @@ import pekko.remote.transport.ThrottlerTransportAdapter.ForceDisassociate import pekko.testkit._ import pekko.testkit.TestActors.EchoActor -import com.typesafe.config.ConfigFactory - object ActorsLeakSpec { val config = ConfigFactory.parseString(""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeathWatchSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeathWatchSpec.scala index 4a2c4647c38..8e9f9b3efd1 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeathWatchSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeathWatchSpec.scala @@ -17,13 +17,14 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ RootActorPath, _ } import pekko.event.Logging.Warning import pekko.remote.{ QuarantinedEvent, RARP, RemoteActorRef } import pekko.testkit.{ SocketUtil, _ } -import com.typesafe.config.ConfigFactory - @nowarn // classic deprecated class RemoteDeathWatchSpec extends PekkoSpec(ConfigFactory.parseString(""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeploymentAllowListSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeploymentAllowListSpec.scala index d884caa534d..59ad3e03900 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeploymentAllowListSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteDeploymentAllowListSpec.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.remote.EndpointException import pekko.remote.NotAllowedClassRemoteDeploymentAttemptException import pekko.remote.transport._ import pekko.testkit._ -import com.typesafe.config._ - // relies on test transport object RemoteDeploymentAllowListSpec { diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteInitErrorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteInitErrorSpec.scala index 25d4ed3cae8..e641e03b5ec 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteInitErrorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteInitErrorSpec.scala @@ -20,7 +20,6 @@ import scala.jdk.CollectionConverters._ import scala.util.control.NonFatal import org.apache.pekko -import pekko.actor.ActorSystem import org.scalatest.concurrent.Eventually._ import org.scalatest.matchers.should.Matchers @@ -28,6 +27,8 @@ import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.ActorSystem + /** * The 192.0.2.1 is a Documentation IP-address and should not be used at all * by any network node. Therefore we assume here that the initialization of diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteSettingsSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteSettingsSpec.scala index 8ffd3161466..ff1dcd9f3e4 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteSettingsSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteSettingsSpec.scala @@ -16,15 +16,16 @@ package org.apache.pekko.remote.classic import scala.annotation.nowarn import org.apache.pekko -import pekko.ConfigurationException -import pekko.remote.RemoteSettings -import pekko.testkit.PekkoSpec import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.ConfigurationException +import pekko.remote.RemoteSettings +import pekko.testkit.PekkoSpec + @nowarn("msg=deprecated") class RemoteSettingsSpec extends AnyWordSpec with Matchers { diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteWatcherSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteWatcherSpec.scala index 7dbc07acac9..d6f7c13a726 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteWatcherSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemoteWatcherSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.remote._ import pekko.testkit._ diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala index ae79f265c6e..dbdd85fbf0d 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala @@ -17,11 +17,14 @@ import java.io.NotSerializableException import java.util.concurrent.ThreadLocalRandom import scala.annotation.nowarn -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config._ + import pekko.actor._ import pekko.event.AddressTerminatedTopic import pekko.pattern.ask @@ -33,8 +36,6 @@ import pekko.testkit._ import pekko.testkit.SocketUtil.temporaryServerAddress import pekko.util.ByteString -import com.typesafe.config._ - object RemotingSpec { final case class ActorSelReq(s: String) diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/UntrustedSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/UntrustedSpec.scala index 376b7e2d7a1..0247fd225ca 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/UntrustedSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/UntrustedSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote.classic import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorIdentity import pekko.actor.ActorRef @@ -36,8 +39,6 @@ import pekko.testkit.PekkoSpec import pekko.testkit.TestEvent import pekko.testkit.TestProbe -import com.typesafe.config.ConfigFactory - object UntrustedSpec { final case class IdentifyReq(path: String) extends JavaSerializable final case class StopChild(name: String) extends JavaSerializable diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/GenericTransportSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/GenericTransportSpec.scala index 7c1f564ffd2..2ad5fe0603f 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/GenericTransportSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/GenericTransportSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.{ Await, Future } import org.apache.pekko + import pekko.actor.{ Address, ExtendedActorSystem } import pekko.remote.RemoteActorRefProvider import pekko.remote.transport.{ AssociationRegistry => _, _ } diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolSpec.scala index f869337eede..c5277e57ce9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolSpec.scala @@ -16,10 +16,13 @@ package org.apache.pekko.remote.classic.transport import java.util.concurrent.TimeoutException import scala.annotation.nowarn -import scala.concurrent.{ Await, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Promise } import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Address import pekko.protobufv3.internal.{ ByteString => PByteString } import pekko.remote.{ FailureDetector, WireFormats } @@ -38,8 +41,6 @@ import pekko.remote.transport.Transport._ import pekko.testkit.{ ImplicitSender, PekkoSpec } import pekko.util.{ ByteString, OptionVal } -import com.typesafe.config.ConfigFactory - object PekkoProtocolSpec { class TestFailureDetector extends FailureDetector { diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolStressTest.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolStressTest.scala index 0f0f0392fae..2a961455e81 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolStressTest.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/PekkoProtocolStressTest.scala @@ -17,14 +17,15 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.remote.{ EndpointException, RARP } import pekko.remote.classic.transport.PekkoProtocolStressTest._ import pekko.remote.transport.FailureInjectorTransportAdapter.{ Drop, One } import pekko.testkit._ -import com.typesafe.config.{ Config, ConfigFactory } - object PekkoProtocolStressTest { val configA: Config = ConfigFactory.parseString(""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SwitchableLoggedBehaviorSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SwitchableLoggedBehaviorSpec.scala index 22a055cbea9..4fd3dda1f6a 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SwitchableLoggedBehaviorSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SwitchableLoggedBehaviorSpec.scala @@ -18,6 +18,7 @@ import scala.util.Failure import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.PekkoException import pekko.remote.transport.TestTransport.SwitchableLoggedBehavior import pekko.testkit.{ DefaultTimeout, PekkoSpec } diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SystemMessageDeliveryStressTest.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SystemMessageDeliveryStressTest.scala index 1e62fec8c3d..1d7ff2e6d7b 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SystemMessageDeliveryStressTest.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/SystemMessageDeliveryStressTest.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.dispatch.sysmsg.{ Failed, SystemMessage } import pekko.remote.{ EndpointException, QuarantinedEvent, RARP } @@ -26,8 +29,6 @@ import pekko.remote.transport.FailureInjectorTransportAdapter.{ Drop, One } import pekko.remote.transport.ThrottlerTransportAdapter._ import pekko.testkit._ -import com.typesafe.config.{ Config, ConfigFactory } - object SystemMessageDeliveryStressTest { val msgCount = 5000 val burstSize = 100 diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/TestTransportSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/TestTransportSpec.scala index b2c0eaff594..4a79e128bdf 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/TestTransportSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/TestTransportSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent._ import org.apache.pekko + import pekko.actor.Address import pekko.remote.transport.{ AssociationHandle, TestTransport } import pekko.remote.transport.AssociationHandle.{ ActorHandleEventListener, Disassociated, InboundPayload } diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottleModeSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottleModeSpec.scala index d46da621224..ef490807f11 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottleModeSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottleModeSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.classic.transport import java.util.concurrent.TimeUnit import org.apache.pekko + import pekko.remote.transport.ThrottlerTransportAdapter.{ TokenBucket, Unthrottled } import pekko.testkit.PekkoSpec diff --git a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottlerTransportAdapterSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottlerTransportAdapterSpec.scala index 3a7f6916f5f..09511add4d9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottlerTransportAdapterSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/classic/transport/ThrottlerTransportAdapterSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor._ import pekko.remote.{ EndpointException, RemoteActorRefProvider } import pekko.remote.classic.transport.ThrottlerTransportAdapterSpec._ @@ -25,8 +28,6 @@ import pekko.remote.transport.{ TestTransport, ThrottlerTransportAdapter } import pekko.remote.transport.ThrottlerTransportAdapter._ import pekko.testkit.{ DefaultTimeout, EventFilter, ImplicitSender, PekkoSpec, TestEvent, TimingTest } -import com.typesafe.config.{ Config, ConfigFactory } - object ThrottlerTransportAdapterSpec { val configA: Config = ConfigFactory.parseString(""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/AllowJavaSerializationOffSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/AllowJavaSerializationOffSpec.scala index 5b0996cad70..cf93f6fd2e2 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/AllowJavaSerializationOffSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/AllowJavaSerializationOffSpec.scala @@ -17,6 +17,9 @@ import java.util.{ BitSet => ProgrammaticJavaDummy } import java.util.{ Date => SerializableDummy } import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorSystem import pekko.actor.BootstrapSetup import pekko.actor.ExtendedActorSystem @@ -25,8 +28,6 @@ import pekko.serialization._ import pekko.testkit.PekkoSpec import pekko.testkit.TestKit -import com.typesafe.config.ConfigFactory - class ConfigurationDummy class ProgrammaticDummy diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializerSpec.scala index 7810e6acc90..d924f80dcd2 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializerSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.remote.serialization import java.io.NotSerializableException import org.apache.pekko + import pekko.actor._ import pekko.remote.{ RemoteWatcher, UniqueAddress } import pekko.remote.artery.{ ActorSystemTerminating, ActorSystemTerminatingAck, Quarantined, SystemMessageDelivery } diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializerAllowJavaSerializationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializerAllowJavaSerializationSpec.scala index d294371287e..9de051134db 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializerAllowJavaSerializationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializerAllowJavaSerializationSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.remote.serialization import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.Address @@ -33,8 +36,6 @@ import pekko.serialization.SerializationExtension import pekko.testkit.JavaSerializable import pekko.testkit.PekkoSpec -import com.typesafe.config.ConfigFactory - object DaemonMsgCreateSerializerAllowJavaSerializationSpec { trait EmptyActor extends Actor { diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/MessageContainerSerializerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/MessageContainerSerializerSpec.scala index eb83005ea2b..4782e335fd4 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/MessageContainerSerializerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/MessageContainerSerializerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.remote.serialization import org.apache.pekko + import pekko.actor.ActorSelectionMessage import pekko.actor.SelectChildName import pekko.actor.SelectChildPattern diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/MiscMessageSerializerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/MiscMessageSerializerSpec.scala index 677371e8a6e..2467629ffe9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/MiscMessageSerializerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/MiscMessageSerializerSpec.scala @@ -22,6 +22,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.{ Done, NotUsed } import pekko.actor._ import pekko.pattern.AskTimeoutException @@ -33,8 +36,6 @@ import pekko.serialization.SerializationExtension import pekko.testkit.JavaSerializable import pekko.testkit.PekkoSpec -import com.typesafe.config.ConfigFactory - object MiscMessageSerializerSpec { val serializationTestOverrides = s""" diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/ProtobufSerializerSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/ProtobufSerializerSpec.scala index 3b9885398e2..f9e985e3437 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/ProtobufSerializerSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/ProtobufSerializerSpec.scala @@ -18,6 +18,7 @@ import java.lang.reflect.InvocationTargetException import scala.annotation.nowarn import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.remote.MessageSerializer import pekko.remote.ProtobufProtocol.MyMessage diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/SerializationTransportInformationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/SerializationTransportInformationSpec.scala index 4daf7b5c780..f89500618b9 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/SerializationTransportInformationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/SerializationTransportInformationSpec.scala @@ -17,6 +17,10 @@ import java.io.NotSerializableException import java.nio.charset.StandardCharsets import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.actor.ActorIdentity import pekko.actor.ActorRef import pekko.actor.ActorSystem @@ -31,9 +35,6 @@ import pekko.testkit.JavaSerializable import pekko.testkit.PekkoSpec import pekko.testkit.TestActors -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - object SerializationTransportInformationSpec { final case class TestMessage(from: ActorRef, to: ActorRef) diff --git a/remote/src/test/scala/org/apache/pekko/remote/serialization/SystemMessageSerializationSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/serialization/SystemMessageSerializationSpec.scala index d86908f051b..6ae9498d283 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/serialization/SystemMessageSerializationSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/serialization/SystemMessageSerializationSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.remote.serialization import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.actor.{ ActorInitializationException, ExtendedActorSystem, InternalActorRef } import pekko.dispatch.sysmsg._ import pekko.serialization.SerializationExtension import pekko.testkit.{ PekkoSpec, TestProbe } import pekko.testkit.JavaSerializable -import com.typesafe.config.ConfigFactory - object SystemMessageSerializationSpec { val serializationTestOverrides = """ diff --git a/remote/src/test/scala/org/apache/pekko/remote/transport/NettyTransportSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/transport/NettyTransportSpec.scala index fa3d3bddbdf..ff0cddb54f8 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/transport/NettyTransportSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/transport/NettyTransportSpec.scala @@ -20,10 +20,6 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration import org.apache.pekko -import pekko.actor.{ ActorSystem, Address, ExtendedActorSystem } -import pekko.remote.BoundAddressesExtension -import pekko.remote.transport.netty.NettyTransport.deriveByteBufAllocator -import pekko.testkit.SocketUtil import io.netty.buffer.{ AdaptiveByteBufAllocator, PooledByteBufAllocator, UnpooledByteBufAllocator } @@ -32,6 +28,11 @@ import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor.{ ActorSystem, Address, ExtendedActorSystem } +import pekko.remote.BoundAddressesExtension +import pekko.remote.transport.netty.NettyTransport.deriveByteBufAllocator +import pekko.testkit.SocketUtil + object NettyTransportSpec { val commonConfig = ConfigFactory.parseString(""" pekko.actor.provider = remote diff --git a/remote/src/test/scala/org/apache/pekko/remote/transport/ThrottlerHandleSpec.scala b/remote/src/test/scala/org/apache/pekko/remote/transport/ThrottlerHandleSpec.scala index 805e14ac659..bd46709418c 100644 --- a/remote/src/test/scala/org/apache/pekko/remote/transport/ThrottlerHandleSpec.scala +++ b/remote/src/test/scala/org/apache/pekko/remote/transport/ThrottlerHandleSpec.scala @@ -21,6 +21,7 @@ import scala.annotation.nowarn import scala.concurrent.Promise import org.apache.pekko + import pekko.actor.Address import pekko.remote.transport.AssociationHandle.HandleEventListener import pekko.remote.transport.ThrottlerTransportAdapter.{ Blackhole, TokenBucket, Unthrottled } diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorRefModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorRefModule.scala index 6a59afed5ce..41b9d376e4d 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorRefModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorRefModule.scala @@ -15,6 +15,8 @@ package org.apache.pekko.serialization.jackson // FIXME maybe move many things to `org.apache.pekko.serialization.jackson.internal` package? +import org.apache.pekko + import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.core.JsonTokenId @@ -23,7 +25,6 @@ import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.actor.ActorRef import pekko.annotation.InternalApi diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala index 34d0d829bb2..47e731fe3df 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala @@ -14,6 +14,7 @@ package org.apache.pekko.serialization.jackson import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.serialization.Serialization diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/AddressModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/AddressModule.scala index 0b47aa7316c..4b0e115d569 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/AddressModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/AddressModule.scala @@ -13,6 +13,8 @@ package org.apache.pekko.serialization.jackson +import org.apache.pekko + import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.core.JsonTokenId @@ -21,7 +23,6 @@ import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.actor.Address import pekko.actor.AddressFromURIString import pekko.annotation.InternalApi diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala index c19baad4f14..0fa676fb97f 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala @@ -16,6 +16,8 @@ package org.apache.pekko.serialization.jackson import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ +import org.apache.pekko + import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.databind.DeserializationContext @@ -25,7 +27,6 @@ import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer import com.fasterxml.jackson.datatype.jsr310.deser.DurationDeserializer import com.fasterxml.jackson.datatype.jsr310.ser.DurationSerializer -import org.apache.pekko import pekko.annotation.InternalApi /** diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala index 4fb52d3ff8a..65063e90942 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala @@ -13,6 +13,8 @@ package org.apache.pekko.serialization.jackson +import org.apache.pekko + import com.fasterxml.jackson.core.Version import com.fasterxml.jackson.core.util.VersionUtil import com.fasterxml.jackson.databind.BeanDescription @@ -28,7 +30,6 @@ import com.fasterxml.jackson.databind.deser.Deserializers import com.fasterxml.jackson.databind.ser.BeanSerializerModifier import com.fasterxml.jackson.databind.ser.Serializers -import org.apache.pekko import pekko.annotation.InternalApi /** diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala index e2d665ef31e..0f5b2fcef3c 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala @@ -21,7 +21,13 @@ import scala.collection.immutable import scala.jdk.OptionConverters._ import scala.util.{ Failure, Success } +import org.apache.pekko + +import com.typesafe.config.Config + import com.fasterxml.jackson.annotation.{ JsonAutoDetect, JsonCreator, PropertyAccessor } +import com.fasterxml.jackson.core.json.{ JsonReadFeature, JsonWriteFeature } +import com.fasterxml.jackson.core.util.{ BufferRecycler, JsonRecyclerPools, RecyclerPool } import com.fasterxml.jackson.core.{ JsonFactory, JsonFactoryBuilder, @@ -32,8 +38,8 @@ import com.fasterxml.jackson.core.{ StreamWriteConstraints, StreamWriteFeature } -import com.fasterxml.jackson.core.json.{ JsonReadFeature, JsonWriteFeature } -import com.fasterxml.jackson.core.util.{ BufferRecycler, JsonRecyclerPools, RecyclerPool } +import com.fasterxml.jackson.databind.cfg.EnumFeature +import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.databind.{ DeserializationFeature, MapperFeature, @@ -41,11 +47,8 @@ import com.fasterxml.jackson.databind.{ ObjectMapper, SerializationFeature } -import com.fasterxml.jackson.databind.cfg.EnumFeature -import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.module.paramnames.ParameterNamesModule -import org.apache.pekko import pekko.actor.{ ActorSystem, ClassicActorSystemProvider, @@ -59,8 +62,6 @@ import pekko.actor.setup.Setup import pekko.annotation.InternalStableApi import pekko.event.{ Logging, LoggingAdapter } -import com.typesafe.config.Config - object JacksonObjectMapperProvider extends ExtensionId[JacksonObjectMapperProvider] with ExtensionIdProvider { override def get(system: ActorSystem): JacksonObjectMapperProvider = super.get(system) override def get(system: ClassicActorSystemProvider): JacksonObjectMapperProvider = super.get(system) diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala index f749005a2f6..8e401190f89 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala @@ -18,15 +18,16 @@ import java.nio.ByteBuffer import java.util.zip.{ GZIPInputStream, GZIPOutputStream } import scala.annotation.tailrec -import scala.util.{ Failure, Success } import scala.util.control.NonFatal +import scala.util.{ Failure, Success } + +import org.apache.pekko import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.jsontype.impl.SubTypeValidator import com.fasterxml.jackson.dataformat.cbor.CBORFactory import net.jpountz.lz4.LZ4Factory -import org.apache.pekko import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.event.{ LogMarker, Logging } diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala index 3d170bd6757..d2538157699 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala @@ -13,12 +13,12 @@ package org.apache.pekko.serialization.jackson +import org.apache.pekko.serialization.{ SerializationExtension, Serializer, Serializers } + import com.fasterxml.jackson.core.{ JsonGenerator, JsonParser, ObjectCodec } -import com.fasterxml.jackson.databind.{ DeserializationContext, JsonNode, SerializerProvider } import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer - -import org.apache.pekko.serialization.{ SerializationExtension, Serializer, Serializers } +import com.fasterxml.jackson.databind.{ DeserializationContext, JsonNode, SerializerProvider } final class PekkoSerializationSerializer extends StdScalarSerializer[AnyRef](classOf[AnyRef]) with ActorSystemAccess { def serialization = SerializationExtension(currentSystem()) diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala index 59cd8a56ad8..7fb048c8a82 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala @@ -15,6 +15,8 @@ package org.apache.pekko.serialization.jackson // FIXME maybe move many things to `org.apache.pekko.serialization.jackson.internal` package? +import org.apache.pekko + import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.core.JsonTokenId @@ -23,7 +25,6 @@ import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.annotation.InternalApi import pekko.stream.SinkRef import pekko.stream.SourceRef diff --git a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/TypedActorRefModule.scala b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/TypedActorRefModule.scala index 0862ded911b..19e714a25da 100644 --- a/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/TypedActorRefModule.scala +++ b/serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/TypedActorRefModule.scala @@ -13,6 +13,8 @@ package org.apache.pekko.serialization.jackson +import org.apache.pekko + import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.core.JsonTokenId @@ -21,7 +23,6 @@ import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorRefResolver import pekko.actor.typed.scaladsl.adapter._ diff --git a/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonFactorySpec.scala b/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonFactorySpec.scala index 9192ee4927a..e2813ec7245 100644 --- a/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonFactorySpec.scala +++ b/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonFactorySpec.scala @@ -17,11 +17,7 @@ package org.apache.pekko.serialization.jackson -import com.fasterxml.jackson.core.util.JsonRecyclerPools.BoundedPool - import org.apache.pekko -import pekko.actor.{ ActorSystem, ExtendedActorSystem } -import pekko.testkit.TestKit import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -29,6 +25,11 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import com.fasterxml.jackson.core.util.JsonRecyclerPools.BoundedPool + +import pekko.actor.{ ActorSystem, ExtendedActorSystem } +import pekko.testkit.TestKit + class JacksonFactorySpec extends TestKit(ActorSystem("JacksonFactorySpec")) with AnyWordSpecLike with Matchers with BeforeAndAfterAll { diff --git a/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonSerializerSpec.scala b/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonSerializerSpec.scala index e4c15686d49..0b5fcf4137c 100644 --- a/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonSerializerSpec.scala +++ b/serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonSerializerSpec.scala @@ -27,8 +27,16 @@ import java.util.logging.FileHandler import scala.annotation.nowarn import scala.collection.immutable -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ + +import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonSubTypes @@ -54,7 +62,6 @@ import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.scala.JsonScalaEnumeration -import org.apache.pekko import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Address @@ -69,12 +76,6 @@ import pekko.serialization.SerializerWithStringManifest import pekko.testkit.TestActors import pekko.testkit.TestKit -import org.scalatest.BeforeAndAfterAll -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ScalaTestMessages { trait TestMessage diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorRefModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorRefModule.scala index f76d6cde8e1..e631a28faa7 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorRefModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorRefModule.scala @@ -15,6 +15,8 @@ package org.apache.pekko.serialization.jackson3 // FIXME maybe move many things to `org.apache.pekko.serialization.jackson3.internal` package? +import org.apache.pekko + import tools.jackson.core.JsonGenerator import tools.jackson.core.JsonParser import tools.jackson.core.JsonTokenId @@ -23,7 +25,6 @@ import tools.jackson.databind.SerializationContext import tools.jackson.databind.deser.std.StdScalarDeserializer import tools.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.actor.ActorRef import pekko.annotation.InternalApi diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorSystemAccess.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorSystemAccess.scala index 8d89662f4fb..e4c17da24f8 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorSystemAccess.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorSystemAccess.scala @@ -14,6 +14,7 @@ package org.apache.pekko.serialization.jackson3 import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.serialization.Serialization diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/AddressModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/AddressModule.scala index 6165efe01c8..7b9c92c9d0a 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/AddressModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/AddressModule.scala @@ -13,6 +13,8 @@ package org.apache.pekko.serialization.jackson3 +import org.apache.pekko + import tools.jackson.core.JsonGenerator import tools.jackson.core.JsonParser import tools.jackson.core.JsonTokenId @@ -21,7 +23,6 @@ import tools.jackson.databind.SerializationContext import tools.jackson.databind.deser.std.StdScalarDeserializer import tools.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.actor.Address import pekko.actor.AddressFromURIString import pekko.annotation.InternalApi diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/FiniteDurationModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/FiniteDurationModule.scala index 7eb3985a738..bb38728dd8f 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/FiniteDurationModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/FiniteDurationModule.scala @@ -16,6 +16,8 @@ package org.apache.pekko.serialization.jackson3 import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ +import org.apache.pekko + import tools.jackson.core.JsonGenerator import tools.jackson.core.JsonParser import tools.jackson.databind.DeserializationContext @@ -25,7 +27,6 @@ import tools.jackson.databind.ext.javatime.deser.DurationDeserializer import tools.jackson.databind.ext.javatime.ser.DurationSerializer import tools.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.annotation.InternalApi /** diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonModule.scala index 41256ad2e67..25c811d536c 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonModule.scala @@ -13,6 +13,8 @@ package org.apache.pekko.serialization.jackson3 +import org.apache.pekko + import com.fasterxml.jackson.annotation.JsonFormat import tools.jackson.core.Version import tools.jackson.core.util.VersionUtil @@ -28,7 +30,6 @@ import tools.jackson.databind.deser.Deserializers import tools.jackson.databind.ser.Serializers import tools.jackson.databind.ser.ValueSerializerModifier -import org.apache.pekko import pekko.annotation.InternalApi /** diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala index 7dbe434ab7a..e584e79e35a 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala @@ -22,10 +22,17 @@ import scala.jdk.CollectionConverters._ import scala.jdk.OptionConverters._ import scala.util.{ Failure, Success } +import org.apache.pekko + +import com.typesafe.config.Config + import com.fasterxml.jackson.annotation.{ JsonAutoDetect, PropertyAccessor } -import tools.jackson.core.{ StreamReadConstraints, StreamReadFeature, StreamWriteConstraints, StreamWriteFeature } import tools.jackson.core.json.{ JsonFactory, JsonReadFeature, JsonWriteFeature } import tools.jackson.core.util.{ BufferRecycler, JsonRecyclerPools, RecyclerPool } +import tools.jackson.core.{ StreamReadConstraints, StreamReadFeature, StreamWriteConstraints, StreamWriteFeature } +import tools.jackson.databind.cfg.{ DateTimeFeature, EnumFeature, MapperBuilder } +import tools.jackson.databind.introspect.VisibilityChecker +import tools.jackson.databind.json.JsonMapper import tools.jackson.databind.{ DeserializationFeature, JacksonModule, @@ -33,12 +40,8 @@ import tools.jackson.databind.{ ObjectMapper, SerializationFeature } -import tools.jackson.databind.cfg.{ DateTimeFeature, EnumFeature, MapperBuilder } -import tools.jackson.databind.introspect.VisibilityChecker -import tools.jackson.databind.json.JsonMapper import tools.jackson.dataformat.cbor.{ CBORFactory, CBORMapper } -import org.apache.pekko import pekko.actor.{ ActorSystem, ClassicActorSystemProvider, @@ -52,8 +55,6 @@ import pekko.actor.setup.Setup import pekko.annotation.InternalStableApi import pekko.event.{ Logging, LoggingAdapter } -import com.typesafe.config.Config - object JacksonObjectMapperProvider extends ExtensionId[JacksonObjectMapperProvider] with ExtensionIdProvider { override def get(system: ActorSystem): JacksonObjectMapperProvider = super.get(system) override def get(system: ClassicActorSystemProvider): JacksonObjectMapperProvider = super.get(system) diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala index 43a5633be5e..84b1b7f4e68 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala @@ -18,15 +18,16 @@ import java.nio.ByteBuffer import java.util.zip.{ GZIPInputStream, GZIPOutputStream } import scala.annotation.{ nowarn, tailrec } -import scala.util.{ Failure, Success } import scala.util.control.NonFatal +import scala.util.{ Failure, Success } + +import org.apache.pekko import net.jpountz.lz4.LZ4Factory import tools.jackson.databind.ObjectMapper import tools.jackson.databind.jsontype.impl.SubTypeValidator import tools.jackson.dataformat.cbor.CBORFactory -import org.apache.pekko import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.event.{ LogMarker, Logging } diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/PekkoSerializationModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/PekkoSerializationModule.scala index 53fec315a47..8a246df6695 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/PekkoSerializationModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/PekkoSerializationModule.scala @@ -13,12 +13,12 @@ package org.apache.pekko.serialization.jackson3 +import org.apache.pekko.serialization.{ SerializationExtension, Serializer, Serializers } + import tools.jackson.core.{ JsonGenerator, JsonParser } -import tools.jackson.databind.{ DeserializationContext, JsonNode, SerializationContext } import tools.jackson.databind.deser.std.StdScalarDeserializer import tools.jackson.databind.ser.std.StdScalarSerializer - -import org.apache.pekko.serialization.{ SerializationExtension, Serializer, Serializers } +import tools.jackson.databind.{ DeserializationContext, JsonNode, SerializationContext } final class PekkoSerializationSerializer extends StdScalarSerializer[AnyRef](classOf[AnyRef]) with ActorSystemAccess { def serialization = SerializationExtension(currentSystem()) diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/StreamRefModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/StreamRefModule.scala index 2756413fe1b..b81fd15beba 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/StreamRefModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/StreamRefModule.scala @@ -15,6 +15,8 @@ package org.apache.pekko.serialization.jackson3 // FIXME maybe move many things to `org.apache.pekko.serialization.jackson3.internal` package? +import org.apache.pekko + import tools.jackson.core.JsonGenerator import tools.jackson.core.JsonParser import tools.jackson.core.JsonTokenId @@ -23,7 +25,6 @@ import tools.jackson.databind.SerializationContext import tools.jackson.databind.deser.std.StdScalarDeserializer import tools.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.annotation.InternalApi import pekko.stream.SinkRef import pekko.stream.SourceRef diff --git a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/TypedActorRefModule.scala b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/TypedActorRefModule.scala index a38b9aff80c..969e42415ad 100644 --- a/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/TypedActorRefModule.scala +++ b/serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/TypedActorRefModule.scala @@ -13,6 +13,8 @@ package org.apache.pekko.serialization.jackson3 +import org.apache.pekko + import tools.jackson.core.JsonGenerator import tools.jackson.core.JsonParser import tools.jackson.core.JsonTokenId @@ -21,7 +23,6 @@ import tools.jackson.databind.SerializationContext import tools.jackson.databind.deser.std.StdScalarDeserializer import tools.jackson.databind.ser.std.StdScalarSerializer -import org.apache.pekko import pekko.actor.typed.ActorRef import pekko.actor.typed.ActorRefResolver import pekko.actor.typed.scaladsl.adapter._ diff --git a/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonFactorySpec.scala b/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonFactorySpec.scala index 808c2973fac..1df63baa3b3 100644 --- a/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonFactorySpec.scala +++ b/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonFactorySpec.scala @@ -17,11 +17,7 @@ package org.apache.pekko.serialization.jackson3 -import tools.jackson.core.util.JsonRecyclerPools.BoundedPool - import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.TestKit import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers @@ -29,6 +25,11 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.ConfigFactory +import tools.jackson.core.util.JsonRecyclerPools.BoundedPool + +import pekko.actor.ActorSystem +import pekko.testkit.TestKit + class JacksonFactorySpec extends TestKit(ActorSystem("JacksonFactorySpec")) with AnyWordSpecLike with Matchers with BeforeAndAfterAll { diff --git a/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonSerializerSpec.scala b/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonSerializerSpec.scala index 3b3193fb2b7..237b348a06d 100644 --- a/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonSerializerSpec.scala +++ b/serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonSerializerSpec.scala @@ -15,19 +15,31 @@ package org.apache.pekko.serialization.jackson3 import java.lang import java.nio.charset.StandardCharsets -import java.time.{ Duration, Instant, LocalDateTime } import java.time.temporal.ChronoUnit -import java.util.{ Arrays, Optional, UUID } +import java.time.{ Duration, Instant, LocalDateTime } import java.util.logging.FileHandler +import java.util.{ Arrays, Optional, UUID } import scala.annotation.nowarn import scala.collection.immutable -import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration +import scala.concurrent.duration._ + +import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.ConfigFactory import com.fasterxml.jackson.annotation.{ JsonIgnore, JsonSubTypes, JsonTypeInfo } -import tools.jackson.core.{ JsonGenerator, StreamReadFeature, StreamWriteFeature } import tools.jackson.core.`type`.TypeReference +import tools.jackson.core.{ JsonGenerator, StreamReadFeature, StreamWriteFeature } +import tools.jackson.databind.annotation.{ JsonDeserialize, JsonSerialize } +import tools.jackson.databind.cfg.DateTimeFeature +import tools.jackson.databind.exc.InvalidTypeIdException +import tools.jackson.databind.module.SimpleModule import tools.jackson.databind.{ DeserializationFeature, JacksonModule, @@ -35,25 +47,14 @@ import tools.jackson.databind.{ SerializationContext, SerializationFeature } -import tools.jackson.databind.annotation.{ JsonDeserialize, JsonSerialize } -import tools.jackson.databind.cfg.DateTimeFeature -import tools.jackson.databind.exc.InvalidTypeIdException -import tools.jackson.databind.module.SimpleModule import tools.jackson.module.scala.JsonScalaEnumeration -import org.apache.pekko import pekko.actor.{ ActorRef, ActorSystem, Address, BootstrapSetup, ExtendedActorSystem, Status } import pekko.actor.setup.ActorSystemSetup import pekko.actor.typed.scaladsl.Behaviors import pekko.serialization.{ Serialization, SerializationExtension, SerializerWithStringManifest } import pekko.testkit.{ TestActors, TestKit } -import org.scalatest.BeforeAndAfterAll -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.ConfigFactory - object ScalaTestMessages { trait TestMessage diff --git a/slf4j/src/main/scala/org/apache/pekko/event/slf4j/Slf4jLogger.scala b/slf4j/src/main/scala/org/apache/pekko/event/slf4j/Slf4jLogger.scala index c14a0780222..c077added5e 100644 --- a/slf4j/src/main/scala/org/apache/pekko/event/slf4j/Slf4jLogger.scala +++ b/slf4j/src/main/scala/org/apache/pekko/event/slf4j/Slf4jLogger.scala @@ -16,14 +16,15 @@ package org.apache.pekko.event.slf4j import scala.annotation.nowarn import org.apache.pekko + +import org.slf4j.{ Logger => SLFLogger, LoggerFactory => SLFLoggerFactory, MDC, Marker, MarkerFactory } + import pekko.actor._ import pekko.dispatch.RequiresMessageQueue import pekko.event.{ LogMarker, _ } import pekko.event.Logging._ import pekko.util.Helpers -import org.slf4j.{ Logger => SLFLogger, LoggerFactory => SLFLoggerFactory, MDC, Marker, MarkerFactory } - /** * Base trait for all classes that wants to be able use the SLF4J logging infrastructure. */ diff --git a/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggerSpec.scala b/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggerSpec.scala index cbaa2b2c7b0..5b5a20f80ff 100644 --- a/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggerSpec.scala +++ b/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggerSpec.scala @@ -18,17 +18,18 @@ import java.nio.charset.StandardCharsets import scala.concurrent.duration._ -import ch.qos.logback.core.OutputStreamAppender - import org.apache.pekko -import pekko.actor.{ Actor, DiagnosticActorLogging, Props } -import pekko.event.{ LogMarker, Logging } -import pekko.testkit.PekkoSpec import org.scalatest.BeforeAndAfterEach import org.slf4j.{ Marker, MarkerFactory } +import ch.qos.logback.core.OutputStreamAppender + +import pekko.actor.{ Actor, DiagnosticActorLogging, Props } +import pekko.event.{ LogMarker, Logging } +import pekko.testkit.PekkoSpec + object Slf4jLoggerSpec { // This test depends on logback configuration in src/test/resources/logback-test.xml diff --git a/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggingFilterSpec.scala b/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggingFilterSpec.scala index e2ee0816a5a..23374e5ea7e 100644 --- a/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggingFilterSpec.scala +++ b/slf4j/src/test/scala/org/apache/pekko/event/slf4j/Slf4jLoggingFilterSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.event.slf4j import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.actor.{ Actor, ActorLogging, Props } import pekko.actor.ActorRef import pekko.event.Logging @@ -28,8 +31,6 @@ import pekko.event.Logging.Warning import pekko.testkit.PekkoSpec import pekko.testkit.TestProbe -import org.scalatest.BeforeAndAfterEach - object Slf4jLoggingFilterSpec { // This test depends on logback configuration in src/test/resources/logback-test.xml diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala index 909be24d304..961c211f47d 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala @@ -24,6 +24,9 @@ import scala.jdk.DurationConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import org.reactivestreams.{ Publisher, Subscriber, Subscription } + import pekko.actor.{ ActorRef, ActorSystem, @@ -37,8 +40,6 @@ import pekko.stream.impl._ import pekko.testkit.{ TestActor, TestProbe } import pekko.testkit.TestActor.AutoPilot -import org.reactivestreams.{ Publisher, Subscriber, Subscription } - /** * Provides factory methods for various Publishers. */ diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/TestGraphStage.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/TestGraphStage.scala index 459ba03fcc3..e783262a2d4 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/TestGraphStage.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/TestGraphStage.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.testkit import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.NoSerializationVerificationNeeded import pekko.stream._ import pekko.stream.scaladsl.{ Sink, Source } diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/StreamTestKit.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/StreamTestKit.scala index 314425a9746..0ab02ba7063 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/StreamTestKit.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/StreamTestKit.scala @@ -19,6 +19,7 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ClassicActorSystemProvider import pekko.stream.{ Materializer, SystemMaterializer } import pekko.stream.impl.PhasedFusingActorMaterializer diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSink.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSink.scala index 9fa14e868cf..6c19d6768ec 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSink.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSink.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.testkit.javadsl import org.apache.pekko + import pekko.actor.ClassicActorSystemProvider import pekko.stream.javadsl.Sink import pekko.stream.testkit._ diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSource.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSource.scala index 74fed495784..0a3a82ef0a0 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSource.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/javadsl/TestSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.testkit.javadsl import org.apache.pekko + import pekko.actor.ClassicActorSystemProvider import pekko.stream.javadsl.Source import pekko.stream.testkit._ diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/StreamTestKit.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/StreamTestKit.scala index 3c8b3eef5fd..70a651ea7ed 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/StreamTestKit.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/StreamTestKit.scala @@ -15,10 +15,11 @@ package org.apache.pekko.stream.testkit.scaladsl import java.util.concurrent.TimeUnit.MILLISECONDS -import scala.concurrent.{ Await, ExecutionContext } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext } import org.apache.pekko + import pekko.actor.{ ActorRef, ActorSystem } import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSink.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSink.scala index 9e38a0d1831..98c15022b7f 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSink.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSink.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.testkit.scaladsl import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.stream._ diff --git a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSource.scala b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSource.scala index 371cb53831e..c789036869f 100644 --- a/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSource.scala +++ b/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/scaladsl/TestSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.testkit.scaladsl import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.stream._ diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpecKit.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpecKit.scala index b335c6357fc..ac1d82e89c5 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpecKit.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpecKit.scala @@ -19,6 +19,7 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.Cancellable import pekko.actor.Props diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/BaseTwoStreamsSetup.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/BaseTwoStreamsSetup.scala index 20df26bc2db..d01011d8b02 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/BaseTwoStreamsSetup.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/BaseTwoStreamsSetup.scala @@ -17,12 +17,13 @@ import scala.collection.immutable import scala.util.control.NoStackTrace import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.stream.scaladsl._ import pekko.stream.testkit.scaladsl.StreamTestKit._ import pekko.testkit.PekkoSpec -import org.reactivestreams.Publisher - abstract class BaseTwoStreamsSetup extends PekkoSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 pekko.stream.materializer.max-input-buffer-size = 2 diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ChainSetup.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ChainSetup.scala index 7e6e7b51244..c71cfe21a58 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ChainSetup.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ChainSetup.scala @@ -16,6 +16,9 @@ package org.apache.pekko.stream.testkit import scala.annotation.nowarn import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.NotUsed import pekko.actor.ActorRefFactory import pekko.actor.ActorSystem @@ -24,8 +27,6 @@ import pekko.stream.ActorMaterializerSettings import pekko.stream.Materializer import pekko.stream.scaladsl._ -import org.reactivestreams.Publisher - class ChainSetup[In, Out, M]( stream: Flow[In, In, NotUsed] => Flow[In, Out, M], val settings: ActorMaterializerSettings, diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ScriptedTest.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ScriptedTest.scala index 6b2cbeac99f..deacdf39a93 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ScriptedTest.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/ScriptedTest.scala @@ -20,6 +20,11 @@ import scala.annotation.tailrec import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + +import org.scalatest.matchers.should.Matchers + import pekko.NotUsed import pekko.actor.ActorSystem import pekko.stream.ActorMaterializerSettings @@ -31,10 +36,6 @@ import pekko.stream.scaladsl.Source import pekko.stream.testkit.TestPublisher._ import pekko.stream.testkit.TestSubscriber._ -import org.reactivestreams.Publisher - -import org.scalatest.matchers.should.Matchers - trait ScriptedTest extends Matchers { class ScriptException(msg: String) extends RuntimeException(msg) diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamSpec.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamSpec.scala index fea0f7df0c8..ad32251d41c 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamSpec.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamSpec.scala @@ -18,6 +18,11 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import org.scalatest.Failed + +import com.typesafe.config.{ Config, ConfigFactory } + import pekko.actor.ActorSystem import pekko.stream.Materializer import pekko.stream.impl.PhasedFusingActorMaterializer @@ -25,10 +30,6 @@ import pekko.stream.testkit.scaladsl.StreamTestKit.{ assertNoChildren, printDebu import pekko.testkit.PekkoSpec import pekko.testkit.TestKitUtils -import org.scalatest.Failed - -import com.typesafe.config.{ Config, ConfigFactory } - abstract class StreamSpec(_system: ActorSystem) extends PekkoSpec(_system) with StreamConfiguration { def this(config: Config) = diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestDefaultMailbox.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestDefaultMailbox.scala index cc2f4a732f0..1e4b0ca80d5 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestDefaultMailbox.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestDefaultMailbox.scala @@ -14,6 +14,9 @@ package org.apache.pekko.stream.testkit import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.ActorRefWithCell @@ -24,8 +27,6 @@ import pekko.dispatch.ProducesMessageQueue import pekko.dispatch.UnboundedMailbox import pekko.stream.impl.MaterializerGuardian -import com.typesafe.config.Config - /** * INTERNAL API * This mailbox is only used in tests to verify that stream actors are using diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestKitSpec.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestKitSpec.scala index c312e6e4b14..3efacac2590 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestKitSpec.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/StreamTestKitSpec.scala @@ -18,6 +18,7 @@ import java.util import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.scaladsl.Source import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit._ diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TestPublisherSubscriberSpec.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TestPublisherSubscriberSpec.scala index 918be688c3d..696d3f1c1a0 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TestPublisherSubscriberSpec.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TestPublisherSubscriberSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.stream.testkit import org.apache.pekko + +import org.reactivestreams.Subscription + import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source import pekko.stream.testkit.TestPublisher._ @@ -21,8 +24,6 @@ import pekko.stream.testkit.TestSubscriber._ import pekko.stream.testkit.scaladsl.StreamTestKit._ import pekko.testkit.PekkoSpec -import org.reactivestreams.Subscription - class TestPublisherSubscriberSpec extends PekkoSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 pekko.stream.materializer.max-input-buffer-size = 2 diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TwoStreamsSetup.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TwoStreamsSetup.scala index 90cc495ba64..a3a64b70a29 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TwoStreamsSetup.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/TwoStreamsSetup.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.testkit import org.apache.pekko -import pekko.stream._ -import pekko.stream.scaladsl._ import org.reactivestreams.Publisher +import pekko.stream._ +import pekko.stream.scaladsl._ + abstract class TwoStreamsSetup extends BaseTwoStreamsSetup { abstract class Fixture { diff --git a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/Utils.scala b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/Utils.scala index af5d722bbf4..947eb077e2c 100644 --- a/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/Utils.scala +++ b/stream-testkit/src/test/scala/org/apache/pekko/stream/testkit/Utils.scala @@ -16,11 +16,12 @@ package org.apache.pekko.stream.testkit import scala.util.control.NoStackTrace import org.apache.pekko -import pekko.actor.ActorRef -import pekko.actor.ActorRefWithCell import com.typesafe.config.ConfigFactory +import pekko.actor.ActorRef +import pekko.actor.ActorRefWithCell + object Utils { /** Sets the default-mailbox to the usual [[pekko.dispatch.UnboundedMailbox]] instead of [[StreamTestDefaultMailbox]]. */ diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala index 4d8f0bb60e3..8b392efc70e 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ActorSystemLifecycle.scala @@ -18,10 +18,14 @@ import java.util.concurrent.TimeoutException import scala.concurrent.Await import scala.concurrent.duration._ +import org.apache.pekko + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import org.testng.annotations.AfterClass import org.testng.annotations.BeforeClass -import org.apache.pekko import pekko.actor.ActorSystem import pekko.actor.ActorSystemImpl import pekko.event.Logging @@ -29,9 +33,6 @@ import pekko.testkit.EventFilter import pekko.testkit.PekkoSpec import pekko.testkit.TestEvent -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - trait ActorSystemLifecycle { protected var _system: ActorSystem = _ diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/CancelledSinkSubscriberTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/CancelledSinkSubscriberTest.scala index 407e92b8dc1..d0f2dd40b5a 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/CancelledSinkSubscriberTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/CancelledSinkSubscriberTest.scala @@ -13,12 +13,12 @@ package org.apache.pekko.stream.tck -import org.testng.SkipException - import org.apache.pekko.stream.scaladsl._ import org.reactivestreams.Subscriber +import org.testng.SkipException + class CancelledSinkSubscriberTest extends PekkoSubscriberBlackboxVerification[Int] { override def createSubscriber(): Subscriber[Int] = diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ConcatTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ConcatTest.scala index a241640f328..4fb1e1297f3 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ConcatTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/ConcatTest.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.tck import org.apache.pekko -import pekko.stream.scaladsl.Sink -import pekko.stream.scaladsl.Source import org.reactivestreams.Publisher +import pekko.stream.scaladsl.Sink +import pekko.stream.scaladsl.Source + class ConcatTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FanoutPublisherTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FanoutPublisherTest.scala index bd66c47e31b..84e11c16a59 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FanoutPublisherTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FanoutPublisherTest.scala @@ -16,11 +16,12 @@ package org.apache.pekko.stream.tck import scala.collection.immutable import org.apache.pekko -import pekko.stream.scaladsl.Sink -import pekko.stream.scaladsl.Source import org.reactivestreams.Publisher +import pekko.stream.scaladsl.Sink +import pekko.stream.scaladsl.Source + class FanoutPublisherTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FilePublisherTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FilePublisherTest.scala index 0c53ebbbe50..a3b61396b60 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FilePublisherTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FilePublisherTest.scala @@ -15,9 +15,12 @@ package org.apache.pekko.stream.tck import java.nio.file.Files +import org.apache.pekko + +import org.reactivestreams.Publisher + import org.testng.annotations.{ AfterClass, BeforeClass } -import org.apache.pekko import pekko.actor.ActorSystem import pekko.event.Logging import pekko.stream.scaladsl.{ FileIO, Sink } @@ -26,8 +29,6 @@ import pekko.testkit.{ EventFilter, TestEvent } import pekko.testkit.PekkoSpec import pekko.util.ByteString -import org.reactivestreams.Publisher - class FilePublisherTest extends PekkoPublisherVerification[ByteString] { val ChunkSize = 256 diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlatMapConcatDoubleSubscriberTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlatMapConcatDoubleSubscriberTest.scala index 9b40eee99a8..c595c3ca1db 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlatMapConcatDoubleSubscriberTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlatMapConcatDoubleSubscriberTest.scala @@ -13,8 +13,8 @@ package org.apache.pekko.stream.tck -import scala.concurrent.{ Await, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Promise } import org.apache.pekko.stream.scaladsl.{ Sink, Source } diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlattenTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlattenTest.scala index 27e1dfd2dd6..4d9674836cb 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlattenTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FlattenTest.scala @@ -14,12 +14,13 @@ package org.apache.pekko.stream.tck import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source import pekko.util.ConstantFun -import org.reactivestreams.Publisher - class FlattenTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FusableProcessorTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FusableProcessorTest.scala index 1cdb45a2df9..c24aabf896f 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FusableProcessorTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FusableProcessorTest.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.tck import org.apache.pekko -import pekko.stream._ -import pekko.stream.scaladsl.Flow import org.reactivestreams.Processor +import pekko.stream._ +import pekko.stream.scaladsl.Flow + class FusableProcessorTest extends PekkoIdentityProcessorVerification[Int] { override def createIdentityProcessor(maxBufferSize: Int): Processor[Int, Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FuturePublisherTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FuturePublisherTest.scala index 85190f5b166..b7ea7bba01f 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FuturePublisherTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/FuturePublisherTest.scala @@ -16,11 +16,12 @@ package org.apache.pekko.stream.tck import scala.concurrent.Promise import org.apache.pekko -import pekko.stream.scaladsl.Sink -import pekko.stream.scaladsl.Source import org.reactivestreams._ +import pekko.stream.scaladsl.Sink +import pekko.stream.scaladsl.Source + class FuturePublisherTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/GroupByTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/GroupByTest.scala index 7a07269a2df..c016fe51f54 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/GroupByTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/GroupByTest.scala @@ -17,12 +17,13 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.stream.impl.EmptyPublisher import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source -import org.reactivestreams.Publisher - class GroupByTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/InputStreamSourceTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/InputStreamSourceTest.scala index 1c2dad2ba4a..9ade801cb32 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/InputStreamSourceTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/InputStreamSourceTest.scala @@ -16,12 +16,13 @@ package org.apache.pekko.stream.tck import java.io.InputStream import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.stream.ActorAttributes import pekko.stream.scaladsl.{ Sink, StreamConverters } import pekko.util.ByteString -import org.reactivestreams.Publisher - class InputStreamSourceTest extends PekkoPublisherVerification[ByteString] { def createPublisher(elements: Long): Publisher[ByteString] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherTest.scala index 61daca038cd..290f85a4735 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherTest.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.tck import org.apache.pekko -import pekko.stream.scaladsl.Sink -import pekko.stream.scaladsl.Source import org.reactivestreams._ +import pekko.stream.scaladsl.Sink +import pekko.stream.scaladsl.Source + class IterablePublisherTest extends PekkoPublisherVerification[Int] { override def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherViaJavaFlowPublisherTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherViaJavaFlowPublisherTest.scala index b81ca2c16bf..d57789ee4e5 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherViaJavaFlowPublisherTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/IterablePublisherViaJavaFlowPublisherTest.scala @@ -16,11 +16,12 @@ package org.apache.pekko.stream.tck import java.util.concurrent.{ Flow => JavaFlow } import org.apache.pekko -import pekko.NotUsed -import pekko.stream.scaladsl.{ JavaFlowSupport, Sink, Source } import org.reactivestreams._ +import pekko.NotUsed +import pekko.stream.scaladsl.{ JavaFlowSupport, Sink, Source } + class IterablePublisherViaJavaFlowPublisherTest extends PekkoPublisherVerification[Int] { override def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoIdentityProcessorVerification.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoIdentityProcessorVerification.scala index b3f29b076d2..4b65bc44a5f 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoIdentityProcessorVerification.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoIdentityProcessorVerification.scala @@ -17,14 +17,14 @@ import java.util.concurrent.ExecutorService import java.util.concurrent.Executors import java.util.concurrent.TimeUnit -import org.scalatestplus.testng.TestNGSuiteLike -import org.testng.annotations.AfterClass - import org.apache.pekko.stream.testkit.TestPublisher -import org.reactivestreams.{ Processor, Publisher, Subscriber, Subscription } import org.reactivestreams.tck.IdentityProcessorVerification import org.reactivestreams.tck.TestEnvironment +import org.reactivestreams.{ Processor, Publisher, Subscriber, Subscription } + +import org.scalatestplus.testng.TestNGSuiteLike +import org.testng.annotations.AfterClass abstract class PekkoIdentityProcessorVerification[T](env: TestEnvironment, publisherShutdownTimeout: Long) extends IdentityProcessorVerification[T](env, publisherShutdownTimeout) diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoPublisherVerification.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoPublisherVerification.scala index d1649dd087e..604b3295413 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoPublisherVerification.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoPublisherVerification.scala @@ -15,8 +15,6 @@ package org.apache.pekko.stream.tck import scala.collection.immutable -import org.scalatestplus.testng.TestNGSuiteLike - import org.apache.pekko.stream.testkit.TestPublisher import org.reactivestreams.Publisher @@ -26,6 +24,8 @@ import org.reactivestreams.tck.TestEnvironment import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import org.scalatestplus.testng.TestNGSuiteLike + abstract class PekkoPublisherVerification[T](val env: TestEnvironment, publisherShutdownTimeout: Long) extends PublisherVerification[T](env, publisherShutdownTimeout) with TestNGSuiteLike diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoSubscriberVerification.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoSubscriberVerification.scala index 3de993f8398..00791f23046 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoSubscriberVerification.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PekkoSubscriberVerification.scala @@ -13,14 +13,14 @@ package org.apache.pekko.stream.tck -import org.scalatestplus.testng.TestNGSuiteLike - import org.apache.pekko.actor.ActorSystem import org.reactivestreams.tck.SubscriberBlackboxVerification import org.reactivestreams.tck.SubscriberWhiteboxVerification import org.reactivestreams.tck.TestEnvironment +import org.scalatestplus.testng.TestNGSuiteLike + abstract class PekkoSubscriberBlackboxVerification[T](env: TestEnvironment) extends SubscriberBlackboxVerification[T](env) with TestNGSuiteLike diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PrefixAndTailTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PrefixAndTailTest.scala index 1d184ded681..c979463ae1b 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PrefixAndTailTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/PrefixAndTailTest.scala @@ -17,11 +17,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko -import pekko.stream.scaladsl.Sink -import pekko.stream.scaladsl.Source import org.reactivestreams.Publisher +import pekko.stream.scaladsl.Sink +import pekko.stream.scaladsl.Source + class PrefixAndTailTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SingleElementSourceTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SingleElementSourceTest.scala index 765f673319d..c5e6eca65e7 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SingleElementSourceTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SingleElementSourceTest.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.tck import org.apache.pekko -import pekko.stream.scaladsl.Sink -import pekko.stream.scaladsl.Source import org.reactivestreams.Publisher +import pekko.stream.scaladsl.Sink +import pekko.stream.scaladsl.Source + class SingleElementSourceTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SinkholeSubscriberTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SinkholeSubscriberTest.scala index 77c30881017..3051e0095cc 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SinkholeSubscriberTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SinkholeSubscriberTest.scala @@ -17,16 +17,17 @@ import java.lang.{ Integer => JInt } import scala.concurrent.Promise +import org.apache.pekko + +import org.reactivestreams.tck.SubscriberWhiteboxVerification.{ SubscriberPuppet, WhiteboxSubscriberProbe } +import org.reactivestreams.tck.{ SubscriberWhiteboxVerification, TestEnvironment } +import org.reactivestreams.{ Subscriber, Subscription } + import org.scalatestplus.testng.TestNGSuiteLike -import org.apache.pekko import pekko.Done import pekko.stream.impl.SinkholeSubscriber -import org.reactivestreams.{ Subscriber, Subscription } -import org.reactivestreams.tck.{ SubscriberWhiteboxVerification, TestEnvironment } -import org.reactivestreams.tck.SubscriberWhiteboxVerification.{ SubscriberPuppet, WhiteboxSubscriberProbe } - class SinkholeSubscriberTest extends SubscriberWhiteboxVerification[JInt](new TestEnvironment()) with TestNGSuiteLike { override def createSubscriber(probe: WhiteboxSubscriberProbe[JInt]): Subscriber[JInt] = { new Subscriber[JInt] { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SplitWhenTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SplitWhenTest.scala index 7da16df48b4..9c003791e52 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SplitWhenTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/SplitWhenTest.scala @@ -17,12 +17,13 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.stream.impl.EmptyPublisher import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source -import org.reactivestreams.Publisher - class SplitWhenTest extends PekkoPublisherVerification[Int] { def createPublisher(elements: Long): Publisher[Int] = diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/TransformProcessorTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/TransformProcessorTest.scala index 572b3846e2e..2952ea39799 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/TransformProcessorTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/TransformProcessorTest.scala @@ -14,6 +14,9 @@ package org.apache.pekko.stream.tck import org.apache.pekko + +import org.reactivestreams.Processor + import pekko.stream.Attributes import pekko.stream.impl.fusing.GraphStages.SimpleLinearGraphStage import pekko.stream.scaladsl.Flow @@ -21,8 +24,6 @@ import pekko.stream.stage.GraphStageLogic import pekko.stream.stage.InHandler import pekko.stream.stage.OutHandler -import org.reactivestreams.Processor - class TransformProcessorTest extends PekkoIdentityProcessorVerification[Int] { override def createIdentityProcessor(maxBufferSize: Int): Processor[Int, Int] = { diff --git a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/VirtualPublisherTest.scala b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/VirtualPublisherTest.scala index 33f48068d7e..e68d45917f7 100644 --- a/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/VirtualPublisherTest.scala +++ b/stream-tests-tck/src/test/scala/org/apache/pekko/stream/tck/VirtualPublisherTest.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.tck import org.apache.pekko -import pekko.stream.impl.VirtualProcessor -import pekko.stream.scaladsl.Flow import org.reactivestreams.Processor +import pekko.stream.impl.VirtualProcessor +import pekko.stream.scaladsl.Flow + class VirtualProcessorTest extends PekkoIdentityProcessorVerification[Int] { override def createIdentityProcessor(maxBufferSize: Int): Processor[Int, Int] = { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/ActorMaterializerSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/ActorMaterializerSpec.scala index 15ee24a9576..3541b1a327a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/ActorMaterializerSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/ActorMaterializerSpec.scala @@ -20,6 +20,9 @@ import scala.concurrent.duration._ import scala.util.{ Failure, Try } import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.actor.{ Actor, ActorSystem, PoisonPill, Props } import pekko.actor.ExtendedActorSystem @@ -33,8 +36,6 @@ import pekko.stream.testkit.{ StreamSpec, TestPublisher } import pekko.testkit.{ ImplicitSender, TestProbe } import pekko.testkit.TestKit -import com.typesafe.config.ConfigFactory - object IndirectMaterializerCreation extends ExtensionId[IndirectMaterializerCreation] with ExtensionIdProvider { def createExtension(system: ExtendedActorSystem): IndirectMaterializerCreation = new IndirectMaterializerCreation(system) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/FusingSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/FusingSpec.scala index 1610f1c3fff..06dcbc8b26d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/FusingSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/FusingSpec.scala @@ -13,11 +13,11 @@ package org.apache.pekko.stream -import scala.concurrent.{ duration, Await, Promise } - -import duration._ +import scala.concurrent.{ Await, Promise, duration } import org.apache.pekko + +import duration._ import pekko.Done import pekko.stream.QueueOfferResult import pekko.stream.impl.UnfoldResourceSource diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/SourceLocationAttributeSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/SourceLocationAttributeSpec.scala index d27fe302607..abd6674bc51 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/SourceLocationAttributeSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/SourceLocationAttributeSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream import org.apache.pekko + import pekko.stream.scaladsl.Flow import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/StreamAttributeDocSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/StreamAttributeDocSpec.scala index 84ddcf2f03c..d9b9daf350b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/StreamAttributeDocSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/StreamAttributeDocSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream import scala.concurrent.Future import org.apache.pekko + import pekko.Done import pekko.stream.scaladsl.Keep import pekko.stream.scaladsl.RunnableGraph diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/StreamDispatcherSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/StreamDispatcherSpec.scala index 46db8b0ac14..8d28ac560ab 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/StreamDispatcherSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/StreamDispatcherSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream import org.apache.pekko + import pekko.dispatch.Dispatchers import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/SystemMaterializerSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/SystemMaterializerSpec.scala index 6cfa1c5ff70..989f020ffab 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/SystemMaterializerSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/SystemMaterializerSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.stream import scala.concurrent.Future import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import pekko.stream.scaladsl.Keep import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source import pekko.stream.testkit.StreamSpec -import org.scalatest.concurrent.ScalaFutures - class SystemMaterializerSpec extends StreamSpec with ScalaFutures { def compileOnly(): Unit = { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FanoutPublisherBehaviorSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FanoutPublisherBehaviorSpec.scala index 94357b9cf0a..769b4eec8b0 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FanoutPublisherBehaviorSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FanoutPublisherBehaviorSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.{ AbruptStageTerminationException, ActorAttributes, diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FixedBufferSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FixedBufferSpec.scala index a3d27efaf65..78818f8c88c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FixedBufferSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/FixedBufferSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.annotation.nowarn import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.ActorAttributes.MaxFixedBufferSize import pekko.stream.ActorMaterializerSettings diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/GraphStageLogicSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/GraphStageLogicSpec.scala index 82c04bcc0b4..c49e2ecdd4a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/GraphStageLogicSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/GraphStageLogicSpec.scala @@ -16,6 +16,9 @@ package org.apache.pekko.stream.impl import scala.concurrent.duration.Duration import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import pekko.NotUsed import pekko.stream._ import pekko.stream.impl.fusing._ @@ -25,8 +28,6 @@ import pekko.stream.stage.GraphStageLogic.{ EagerTerminateInput, EagerTerminateO import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.concurrent.ScalaFutures - class GraphStageLogicSpec extends StreamSpec with GraphInterpreterSpecKit with ScalaFutures { object emit1234 extends GraphStage[FlowShape[Int, Int]] { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/LinearTraversalBuilderSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/LinearTraversalBuilderSpec.scala index 8c2075972d7..e72607e4c38 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/LinearTraversalBuilderSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/LinearTraversalBuilderSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.impl.TraversalTestUtils._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/SubInletOutletSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/SubInletOutletSpec.scala index 35926830b30..2ebf0586069 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/SubInletOutletSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/SubInletOutletSpec.scala @@ -18,6 +18,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.Done import pekko.NotUsed import pekko.stream.Attributes diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TimeoutsSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TimeoutsSpec.scala index 3e2ac42cc9b..e3b47d4052d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TimeoutsSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TimeoutsSpec.scala @@ -20,6 +20,10 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.stream._ import pekko.stream.scaladsl._ @@ -28,9 +32,6 @@ import pekko.stream.testkit.TestPublisher import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.Utils._ -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - class TimeoutsSpec extends StreamSpec { "InitialTimeout" must { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalBuilderSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalBuilderSpec.scala index 9bff87c4aca..00130ed4124 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalBuilderSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalBuilderSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.concurrent.Promise import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalTestUtils.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalTestUtils.scala index f16b136bfdb..d1e979e475c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalTestUtils.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/TraversalTestUtils.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.impl.StreamLayout.AtomicModule diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreterSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreterSpec.scala index 84375f78b88..78f27c7e595 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreterSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreterSpec.scala @@ -20,6 +20,11 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher +import org.reactivestreams.Subscriber +import org.reactivestreams.Subscription + import pekko.Done import pekko.stream._ import pekko.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor } @@ -36,10 +41,6 @@ import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.Utils._ import pekko.testkit.{ EventFilter, TestLatch } -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber -import org.reactivestreams.Subscription - class ActorGraphInterpreterSpec extends StreamSpec { "ActorGraphInterpreter" must { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/AsyncCallbackSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/AsyncCallbackSpec.scala index 7806e1d6bbb..dff5cbc48e7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/AsyncCallbackSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/AsyncCallbackSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.fusing import scala.concurrent.{ Await, Future, Promise } import org.apache.pekko + import pekko.Done import pekko.actor.ActorRef import pekko.stream._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ChasingEventsSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ChasingEventsSpec.scala index e1e1acb1f07..03f037f30af 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ChasingEventsSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/ChasingEventsSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.stream._ import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterFailureModesSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterFailureModesSpec.scala index b0c271b6c13..eb1feb50efa 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterFailureModesSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterFailureModesSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.Utils.TE import pekko.testkit.EventFilter diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterPortsSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterPortsSpec.scala index c44b3520b11..03056eaae12 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterPortsSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterPortsSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.stream.SubscriptionWithCancelException import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.Utils._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpec.scala index 5e58a44213f..a34466d84fa 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.stream.scaladsl.{ Balance, Broadcast, Merge, Zip } import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSpec.scala index 8ba3ced7e85..82b63d3d417 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.fusing import scala.annotation.nowarn import org.apache.pekko + import pekko.stream._ import pekko.stream.impl.fusing.GraphStages.SimpleLinearGraphStage import pekko.stream.stage._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterStressSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterStressSpec.scala index fa1402a27de..8e3e38d1334 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterStressSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterStressSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.stream.SubscriptionWithCancelException import pekko.stream.testkit.StreamSpec import pekko.testkit.LongRunningTest diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSupervisionSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSupervisionSpec.scala index 08d01c729d4..64f199251dc 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSupervisionSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/InterpreterSupervisionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.fusing import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.Supervision import pekko.stream.testkit.StreamSpec import pekko.util.ConstantFun diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/KeepGoingStageSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/KeepGoingStageSpec.scala index de33e57318c..e34e1b98348 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/KeepGoingStageSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/KeepGoingStageSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.NoSerializationVerificationNeeded import pekko.stream.Attributes diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/LifecycleInterpreterSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/LifecycleInterpreterSpec.scala index 4cf3d3cd169..c21b02d35ca 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/LifecycleInterpreterSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/LifecycleInterpreterSpec.scala @@ -16,7 +16,9 @@ package org.apache.pekko.stream.impl.fusing import scala.concurrent.duration._ import org.apache.pekko -import pekko.stream.{ Attributes, ClosedShape } + +import pekko.stream.Attributes +import pekko.stream.ClosedShape import pekko.stream.impl.fusing.GraphStages.SimpleLinearGraphStage import pekko.stream.stage._ import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/io/TLSUtilsSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/io/TLSUtilsSpec.scala index a28765cfb4f..cd5c6993305 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/impl/io/TLSUtilsSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/impl/io/TLSUtilsSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.stream.impl.io import javax.net.ssl.{ SSLContext, SSLEngine, SSLParameters } import org.apache.pekko -import pekko.stream.TLSClientAuth -import pekko.stream.TLSProtocol.NegotiateNewSession import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike +import pekko.stream.TLSClientAuth +import pekko.stream.TLSProtocol.NegotiateNewSession + class TLSUtilsSpec extends AnyWordSpecLike with Matchers { "TlsUtils.applySessionParameters" must { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/ByteStringParserSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/ByteStringParserSpec.scala index 142e96e513a..f7b158bad97 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/ByteStringParserSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/ByteStringParserSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.Attributes import pekko.stream.ThrottleMode import pekko.stream.impl.io.ByteStringParser diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSinkSpec.scala index e3cfc925246..0cad6e327bf 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSinkSpec.scala @@ -13,8 +13,8 @@ package org.apache.pekko.stream.io -import java.nio.file._ import java.nio.file.StandardOpenOption.{ CREATE, WRITE } +import java.nio.file._ import scala.annotation.nowarn import scala.collection.mutable.ListBuffer @@ -22,9 +22,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Success +import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import com.google.common.jimfs.{ Configuration, Jimfs } -import org.apache.pekko import pekko.stream._ import pekko.stream.SystemMaterializer import pekko.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor } @@ -34,8 +37,6 @@ import pekko.stream.testkit._ import pekko.stream.testkit.Utils._ import pekko.util.ByteString -import org.scalatest.concurrent.ScalaFutures - @nowarn class FileSinkSpec extends StreamSpec(UnboundedMailboxConfig) with ScalaFutures { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSourceSpec.scala index 5df868de8e0..930a2ec6ed8 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/FileSourceSpec.scala @@ -21,9 +21,10 @@ import scala.annotation.nowarn import scala.concurrent.Future import scala.concurrent.duration._ +import org.apache.pekko + import com.google.common.jimfs.{ Configuration, Jimfs } -import org.apache.pekko import pekko.actor.ActorRef import pekko.stream._ import pekko.stream.IOResult._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSinkSpec.scala index 7c01419e707..af0bdddee76 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSinkSpec.scala @@ -24,6 +24,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream._ import pekko.stream.Attributes.inputBuffer import pekko.stream.impl.io.InputStreamSinkStage diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSourceSpec.scala index fa6de2b7ed0..04175d38fa6 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/InputStreamSourceSpec.scala @@ -20,6 +20,7 @@ import scala.annotation.nowarn import scala.util.Success import org.apache.pekko + import pekko.Done import pekko.stream.{ AbruptStageTerminationException, diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSinkSpec.scala index d986dced469..667cdb8c391 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSinkSpec.scala @@ -19,6 +19,9 @@ import scala.annotation.nowarn import scala.util.Success import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import pekko.Done import pekko.stream.{ ActorMaterializer, ActorMaterializerSettings, IOOperationIncompleteException, Materializer } import pekko.stream.scaladsl.{ Source, StreamConverters } @@ -27,8 +30,6 @@ import pekko.stream.testkit.Utils._ import pekko.testkit.TestProbe import pekko.util.ByteString -import org.scalatest.concurrent.ScalaFutures - @nowarn class OutputStreamSinkSpec extends StreamSpec(UnboundedMailboxConfig) with ScalaFutures { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSourceSpec.scala index 318b312f32e..75011cfaea5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/OutputStreamSourceSpec.scala @@ -19,11 +19,12 @@ import java.util.concurrent.TimeoutException import scala.concurrent.Await import scala.concurrent.Future -import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero +import scala.concurrent.duration._ import scala.util.Random import org.apache.pekko + import pekko.stream._ import pekko.stream.Attributes.inputBuffer import pekko.stream.impl.io.OutputStreamSourceStage diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpHelper.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpHelper.scala index f5c64d357ef..c4cc2e312b1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpHelper.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpHelper.scala @@ -19,6 +19,7 @@ import scala.collection.immutable.Queue import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.io.IO import pekko.io.Tcp diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpSpec.scala index 3d5fb1954bc..add541e2619 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpSpec.scala @@ -26,6 +26,13 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration +import org.scalatest.concurrent.PatienceConfiguration.Timeout + +import com.typesafe.config.Config +import com.typesafe.config.ConfigFactory + import pekko.Done import pekko.NotUsed import pekko.actor.Actor @@ -54,12 +61,6 @@ import pekko.testkit.TestProbe import pekko.testkit.WithLogCapturing import pekko.util.ByteString -import org.scalatest.concurrent.PatienceConfiguration -import org.scalatest.concurrent.PatienceConfiguration.Timeout - -import com.typesafe.config.Config -import com.typesafe.config.ConfigFactory - @nowarn("msg=never used") class NonResolvingDnsActor(cache: SimpleDnsCache, config: Config) extends Actor { def receive = { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageEdgeCasesSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageEdgeCasesSpec.scala index 5f6f471179d..4e06a84e76d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageEdgeCasesSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageEdgeCasesSpec.scala @@ -25,6 +25,9 @@ import scala.concurrent.duration._ import scala.util.{ Success, Try } import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.stream._ import pekko.stream.TLSProtocol._ @@ -34,8 +37,6 @@ import pekko.stream.testkit.StreamSpec import pekko.testkit.TestDuration import pekko.util.ByteString -import com.typesafe.config.ConfigFactory - /** * Edge cases for the [[TlsGraphStage]] path that are awkward to express in the * shared [[TlsGraphStageSpec]] matrix: fragmented TLS records, user-side diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageIsolatedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageIsolatedSpec.scala index 1ddc3d78b4f..a4100d50e5a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageIsolatedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsGraphStageIsolatedSpec.scala @@ -31,6 +31,7 @@ import scala.util.Success import com.typesafe.config.{ Config, ConfigFactory } import org.apache.pekko + import pekko.NotUsed import pekko.actor.Cancellable import pekko.event.LoggingAdapter diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsSpec.scala index 32c152bf13d..3b49b38e901 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/TlsSpec.scala @@ -26,6 +26,7 @@ import scala.concurrent.duration._ import scala.util.{ Random, Success } import org.apache.pekko + import pekko.NotUsed import pekko.pattern.{ after => later } import pekko.stream._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CodecSpecSupport.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CodecSpecSupport.scala index 54b9228e20b..84b13d6a588 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CodecSpecSupport.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CodecSpecSupport.scala @@ -14,14 +14,15 @@ package org.apache.pekko.stream.io.compression import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.testkit.TestKit -import pekko.util.ByteString import org.scalatest.BeforeAndAfterAll import org.scalatest.Suite import org.scalatest.matchers.should.Matchers +import pekko.actor.ActorSystem +import pekko.testkit.TestKit +import pekko.util.ByteString + trait CodecSpecSupport extends Matchers with BeforeAndAfterAll { self: Suite => def readAs(string: String, charset: String = "UTF8") = diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CoderSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CoderSpec.scala index af7191b0d78..87d7a913fa0 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CoderSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CoderSpec.scala @@ -23,14 +23,15 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.Inspectors +import org.scalatest.wordspec.AnyWordSpec + import pekko.NotUsed import pekko.stream.impl.io.compression.Compressor import pekko.stream.scaladsl.{ Compression, Flow, Sink, Source } import pekko.util.ByteString -import org.scalatest.Inspectors -import org.scalatest.wordspec.AnyWordSpec - abstract class CoderSpec(codecName: String) extends AnyWordSpec with CodecSpecSupport with Inspectors { import CompressionTestingTools._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CompressionTestingTools.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CompressionTestingTools.scala index 7296c17cd49..5d410cc62f5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CompressionTestingTools.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CompressionTestingTools.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.io.compression import scala.annotation.tailrec -import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.duration.Duration +import scala.concurrent.{ Await, ExecutionContext, Future } import scala.util.{ Failure, Success } import org.apache.pekko + import pekko.stream.Materializer import pekko.stream.scaladsl.Source import pekko.util.ByteString diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/DeflateSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/DeflateSpec.scala index 90a7f3551b8..2bf8530131f 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/DeflateSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/DeflateSpec.scala @@ -17,6 +17,7 @@ import java.io.{ InputStream, OutputStream } import java.util.zip._ import org.apache.pekko + import pekko.stream.impl.io.compression.{ Compressor, DeflateCompressor } import pekko.stream.scaladsl.{ Compression, Flow } import pekko.util.ByteString diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipSpec.scala index 177bbc0974e..b7b2c97e1ef 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipSpec.scala @@ -18,6 +18,7 @@ import java.nio.charset.StandardCharsets import java.util.zip.{ GZIPInputStream, GZIPOutputStream, ZipException } import org.apache.pekko + import pekko.stream.impl.io.compression.{ Compressor, GzipCompressor } import pekko.stream.scaladsl.{ Compression, Flow } import pekko.util.ByteString diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipWithCustomCompressionLevelSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipWithCustomCompressionLevelSpec.scala index e106e8cc65f..7e97c7ee85a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipWithCustomCompressionLevelSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/GzipWithCustomCompressionLevelSpec.scala @@ -17,6 +17,7 @@ import java.nio.charset.StandardCharsets import java.util.zip.{ Deflater, ZipException } import org.apache.pekko + import pekko.stream.impl.io.compression.{ Compressor, GzipCompressor } import pekko.stream.scaladsl.{ Compression, Flow } import pekko.util.ByteString diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSinkSpec.scala index 060226b677e..6b96d6dce9d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSinkSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Props } import pekko.stream.Attributes.inputBuffer import pekko.stream.Materializer diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSourceSpec.scala index 6681782968a..6c269dab4ab 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefBackpressureSourceSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Status import pekko.stream.CompletionStrategy import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSinkSpec.scala index 3d6fc888442..c511f7798d5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSinkSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.actor.{ Actor, ActorRef, Props } import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSourceSpec.scala index dda34e17aee..598ab8ba5c1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ActorRefSourceSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.Done import pekko.actor.{ ActorRef, ActorSystem, Kill, PoisonPill, Status } import pekko.stream.{ OverflowStrategy, _ } @@ -25,8 +28,6 @@ import pekko.stream.testkit._ import pekko.stream.testkit.Utils._ import pekko.stream.testkit.scaladsl._ -import org.reactivestreams.Publisher - @nowarn("msg=deprecated") class ActorRefSourceSpec extends StreamSpec { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AggregateWithBoundarySpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AggregateWithBoundarySpec.scala index 023baf3d679..7f3bd1491b7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AggregateWithBoundarySpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AggregateWithBoundarySpec.scala @@ -18,6 +18,12 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike + +import com.typesafe.config.{ ConfigFactory, ConfigValueFactory } + import pekko.actor.ActorSystem import pekko.stream.ActorAttributes import pekko.stream.OverflowStrategy @@ -25,11 +31,6 @@ import pekko.stream.Supervision import pekko.stream.testkit.{ StreamSpec, TestPublisher, TestSubscriber } import pekko.testkit.{ ExplicitlyTriggeredScheduler, PekkoSpec } -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike - -import com.typesafe.config.{ ConfigFactory, ConfigValueFactory } - class AggregateWithBoundarySpec extends StreamSpec { "split aggregator by size" in { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AttributesSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AttributesSpec.scala index cbb797d0ea8..c541aa92b38 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AttributesSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/AttributesSpec.scala @@ -18,6 +18,9 @@ import java.util.concurrent.{ CompletionStage, TimeUnit } import scala.annotation.nowarn import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.{ Done, NotUsed } import pekko.actor.ActorSystem import pekko.dispatch.Dispatchers @@ -30,8 +33,6 @@ import pekko.stream.stage._ import pekko.stream.testkit._ import pekko.testkit.TestKit -import com.typesafe.config.ConfigFactory - object AttributesSpec { class AttributesSource(_initialAttributes: Attributes = Attributes.none) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BidiFlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BidiFlowSpec.scala index fbb9b53e241..929958bc28d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BidiFlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BidiFlowSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BoundedSourceQueueSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BoundedSourceQueueSpec.scala index 926800035fc..3663f30e8ae 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BoundedSourceQueueSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/BoundedSourceQueueSpec.scala @@ -13,20 +13,21 @@ package org.apache.pekko.stream.scaladsl -import java.util.concurrent.{ CountDownLatch, ThreadLocalRandom } import java.util.concurrent.atomic.AtomicLong +import java.util.concurrent.{ CountDownLatch, ThreadLocalRandom } import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration.Timeout + import pekko.stream.QueueOfferResult import pekko.stream.testkit.{ StreamSpec, TestSubscriber } import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit.TestDuration import pekko.testkit.WithLogCapturing -import org.scalatest.concurrent.PatienceConfiguration.Timeout - class BoundedSourceQueueSpec extends StreamSpec("""pekko.loglevel = debug |pekko.loggers = ["org.apache.pekko.testkit.SilenceAllTestEventListener"] |""".stripMargin) with WithLogCapturing { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CancellationStrategySpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CancellationStrategySpec.scala index 05419c522c9..5b66721c98e 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CancellationStrategySpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CancellationStrategySpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream.Attributes import pekko.stream.Attributes.CancellationStrategy diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CollectionSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CollectionSinkSpec.scala index 687f64ae675..cc32b9b8aea 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CollectionSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CollectionSinkSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.Future import org.apache.pekko + import pekko.stream.AbruptTerminationException import pekko.stream.Materializer import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CompressionSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CompressionSpec.scala index 0b358da9f4c..a65faa6faad 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CompressionSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CompressionSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import java.nio.charset.StandardCharsets import org.apache.pekko + import pekko.stream.impl.io.compression.DeflateCompressor import pekko.stream.impl.io.compression.GzipCompressor import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlowSpec.scala index d16943ba320..e90eb3f859c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlowSpec.scala @@ -20,12 +20,6 @@ import scala.util.Try import scala.xml.Node import org.apache.pekko -import pekko.Done -import pekko.NotUsed -import pekko.stream._ -import pekko.stream.testkit._ -import pekko.stream.testkit.scaladsl.TestSource -import pekko.testkit.TestProbe import org.reactivestreams.Publisher import org.reactivestreams.Subscriber @@ -33,6 +27,13 @@ import org.reactivestreams.Subscription import org.scalatest.Assertion +import pekko.Done +import pekko.NotUsed +import pekko.stream._ +import pekko.stream.testkit._ +import pekko.stream.testkit.scaladsl.TestSource +import pekko.testkit.TestProbe + class CoupledTerminationFlowSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 """) with ScriptedTest { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/EagerFutureSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/EagerFutureSinkSpec.scala index 10d0374a6c4..36c08b3311f 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/EagerFutureSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/EagerFutureSinkSpec.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.stream.{ AbruptStageTerminationException, Materializer } import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.Utils._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FailedSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FailedSourceSpec.scala index 01a96f1025c..6b4e5b26ab4 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FailedSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FailedSourceSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestSubscriber import pekko.testkit.DefaultTimeout diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToAllSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToAllSpec.scala index 5bdcdbde896..ab3e8417f41 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToAllSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToAllSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToSpec.scala index c78b25ebb82..a1c79c00196 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAlsoToSpec.scala @@ -17,13 +17,14 @@ package org.apache.pekko.stream.scaladsl +import scala.concurrent.duration._ + import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink import pekko.stream.testkit.scaladsl.TestSource -import scala.concurrent.duration._ - class FlowAlsoToSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 """) { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAppendSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAppendSpec.scala index eddb44bcac4..1e2e5613ab0 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAppendSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAppendSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.stream.testkit.StreamSpec -import pekko.stream.testkit.TestSubscriber import org.reactivestreams.Subscriber import org.scalatest.matchers.should.Matchers +import pekko.actor.ActorSystem +import pekko.stream.testkit.StreamSpec +import pekko.stream.testkit.TestSubscriber + class FlowAppendSpec extends StreamSpec with River { "Flow" should { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAskSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAskSpec.scala index 06e9e8080ca..b587282776b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAskSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowAskSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.Actor import pekko.actor.ActorRef import pekko.actor.PoisonPill diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBatchSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBatchSpec.scala index 7360c15c3cc..0f4eed08f87 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBatchSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBatchSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.OverflowStrategy import pekko.stream.Supervision diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBufferSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBufferSpec.scala index 64d0c9d16e7..754554ca966 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBufferSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowBufferSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.BufferOverflowException import pekko.stream.OverflowStrategy import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectFirstSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectFirstSpec.scala index 84a7bcf1aed..c35b6ab64e7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectFirstSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectFirstSpec.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.OverflowStrategy import pekko.stream.Supervision._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectSpec.scala index 9eadecdab29..01cc9e89974 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import java.util.concurrent.ThreadLocalRandom.{ current => random } import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.Supervision._ import pekko.stream.testkit.ScriptedTest diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala index ebb85fc667d..dbd0e9c03f3 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.OverflowStrategy import pekko.stream.Supervision._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCompileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCompileSpec.scala index 12381c01668..3f5979b3a96 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCompileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCompileSpec.scala @@ -18,11 +18,12 @@ import scala.collection.immutable.Seq import scala.concurrent.Future import org.apache.pekko -import pekko.NotUsed -import pekko.stream.testkit.StreamSpec import org.reactivestreams.Publisher +import pekko.NotUsed +import pekko.stream.testkit.StreamSpec + @nowarn // unused vars are used in shouldNot compile tests class FlowCompileSpec extends StreamSpec { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllLazySpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllLazySpec.scala index c9dc5f65877..0e6c570fc57 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllLazySpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllLazySpec.scala @@ -19,6 +19,7 @@ import java.util.concurrent.atomic.AtomicBoolean import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllSpec.scala index 89bf57b86b1..e34800b22e1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatAllSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.NotUsed import pekko.stream.testkit._ import pekko.util.ConstantFun diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatSpec.scala index e4aa94abe67..230c84e7c57 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConcatSpec.scala @@ -24,6 +24,11 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.reactivestreams.Publisher + +import org.scalatest.concurrent.ScalaFutures + import pekko.NotUsed import pekko.stream.ActorAttributes.supervisionStrategy import pekko.stream.KillSwitches @@ -34,10 +39,6 @@ import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.scaladsl.StreamTestKit._ import pekko.stream.testkit.scaladsl.TestSink -import org.reactivestreams.Publisher - -import org.scalatest.concurrent.ScalaFutures - abstract class AbstractFlowConcatSpec extends BaseTwoStreamsSetup { override type Outputs = Int diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConflateSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConflateSpec.scala index b7e70f94023..f12ee107ecf 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConflateSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowConflateSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.ActorAttributes.supervisionStrategy import pekko.stream.Attributes.inputBuffer diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDelaySpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDelaySpec.scala index e486eb98fc5..11e087081c1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDelaySpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDelaySpec.scala @@ -18,6 +18,11 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration +import org.scalatest.time.Milliseconds +import org.scalatest.time.Span + import pekko.Done import pekko.stream._ import pekko.stream.Attributes._ @@ -29,10 +34,6 @@ import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit.TestDuration import pekko.testkit.TimingTest -import org.scalatest.concurrent.PatienceConfiguration -import org.scalatest.time.Milliseconds -import org.scalatest.time.Span - class FlowDelaySpec extends StreamSpec { "A Delay" must { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDetacherSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDetacherSpec.scala index 9c9c6aa7441..57b8bbfbbf0 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDetacherSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDetacherSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDispatcherSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDispatcherSpec.scala index 3b3917cf59a..c286f07e5d2 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDispatcherSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDispatcherSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn import org.apache.pekko + import pekko.stream.ActorMaterializer import pekko.stream.ActorMaterializerSettings import pekko.stream.Materializer diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnCancelSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnCancelSpec.scala index 9f219b0aa6d..3e1d770382d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnCancelSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnCancelSpec.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.Done import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnFirstSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnFirstSpec.scala index 6ced5fa70db..d3108ccb49c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnFirstSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDoOnFirstSpec.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.scaladsl import java.util.concurrent.atomic.AtomicInteger import org.apache.pekko + import pekko.Done import pekko.stream.{ ActorAttributes, Supervision } import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropRepeatedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropRepeatedSpec.scala index 3ccb33cab6b..6f07a306168 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropRepeatedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropRepeatedSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.Supervision._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropWhileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropWhileSpec.scala index 71856311ea2..2645f9ce547 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropWhileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowDropWhileSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.Supervision._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExpandSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExpandSpec.scala index 3b958c538ce..985bf20bb41 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExpandSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExpandSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.Supervision import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExtrapolateSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExtrapolateSpec.scala index e288a271858..0a858a3422d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExtrapolateSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowExtrapolateSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.Supervision import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFilterSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFilterSpec.scala index db5fc6a6134..693159f697d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFilterSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFilterSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.Attributes import pekko.stream.Supervision._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapConcatParallelismSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapConcatParallelismSpec.scala index 59c61b8ff99..ef51c08e11d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapConcatParallelismSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapConcatParallelismSpec.scala @@ -27,14 +27,15 @@ import scala.concurrent.duration.DurationInt import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.time.{ Seconds, Span } + import pekko.NotUsed import pekko.pattern.FutureTimeoutSupport import pekko.stream._ import pekko.stream.testkit.{ ScriptedTest, StreamSpec } import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.time.{ Seconds, Span } - class FlowFlatMapConcatParallelismSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 """) with ScriptedTest with FutureTimeoutSupport { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapPrefixSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapPrefixSpec.scala index 3c24383da99..cd1f107e28d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapPrefixSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlatMapPrefixSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.stream.{ AbruptStageTerminationException, diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlattenMergeSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlattenMergeSpec.scala index 28d44ecaca6..b246cb8a0aa 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlattenMergeSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFlattenMergeSpec.scala @@ -23,6 +23,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.exceptions.TestFailedException + import pekko.NotUsed import pekko.pattern.FutureTimeoutSupport import pekko.stream._ @@ -35,8 +38,6 @@ import pekko.stream.testkit.Utils.TE import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit.TestLatch -import org.scalatest.exceptions.TestFailedException - class FlowFlattenMergeSpec extends StreamSpec with FutureTimeoutSupport { import system.dispatcher diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldAsyncSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldAsyncSpec.scala index 3b31515d84e..1e561676201 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldAsyncSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldAsyncSpec.scala @@ -20,6 +20,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration.Timeout + import pekko.NotUsed import pekko.stream.ActorAttributes.supervisionStrategy import pekko.stream.Supervision.restartingDecider @@ -29,8 +32,6 @@ import pekko.stream.testkit._ import pekko.stream.testkit.Utils._ import pekko.testkit.LongRunningTest -import org.scalatest.concurrent.PatienceConfiguration.Timeout - class FlowFoldAsyncSpec extends StreamSpec { implicit def ec: ExecutionContextExecutor = system.dispatcher diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldSpec.scala index c8007f4b1c9..f374f4349d6 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream.ActorAttributes import pekko.stream.Supervision diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldWhileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldWhileSpec.scala index 93eab05ac28..2c7937bc1b5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldWhileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFoldWhileSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.testkit.StreamSpec class FlowFoldWhileSpec extends StreamSpec { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowForeachSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowForeachSpec.scala index 34c788aa02d..1a67d00bc4a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowForeachSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowForeachSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.Utils._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFutureFlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFutureFlowSpec.scala index 85fd6b6bd69..43f14ef1d38 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFutureFlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowFutureFlowSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ AbruptStageTerminationException, Attributes, Materializer, NeverMaterializedException } import pekko.stream.SubscriptionWithCancelException.NonFailureCancellation diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupBySpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupBySpec.scala index 4aef5e112e0..757eadf2067 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupBySpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupBySpec.scala @@ -23,6 +23,11 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + +import org.scalatest.concurrent.PatienceConfiguration.Timeout + import pekko.Done import pekko.NotUsed import pekko.actor.ActorSystem @@ -38,10 +43,6 @@ import pekko.stream.testkit.scaladsl.TestSource import pekko.testkit.TestLatch import pekko.util.ByteString -import org.reactivestreams.Publisher - -import org.scalatest.concurrent.PatienceConfiguration.Timeout - object FlowGroupBySpec { implicit class Lift[M](val f: SubFlow[Int, M, Source[Int, M]#Repr, RunnableGraph[M]]) extends AnyVal { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedAdjacentByWeightedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedAdjacentByWeightedSpec.scala index 4a18b5e9a76..571d06bae8f 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedAdjacentByWeightedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedAdjacentByWeightedSpec.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.{ ActorAttributes, Supervision } import pekko.stream.testkit.{ ScriptedTest, StreamSpec } import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedSpec.scala index cbd25b35f8b..fc8830e3d45 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedSpec.scala @@ -18,6 +18,7 @@ import java.util.concurrent.ThreadLocalRandom.{ current => random } import scala.collection.immutable import org.apache.pekko + import pekko.stream.testkit.ScriptedTest import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWeightedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWeightedSpec.scala index 62630fa2a4b..ef69ecccb1b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWeightedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWeightedSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.{ ScriptedTest, StreamSpec, TestPublisher, TestSubscriber } import pekko.testkit.TimingTest diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWithinSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWithinSpec.scala index 53165db4324..b8b00b5c2b7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWithinSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowGroupedWithinSpec.scala @@ -19,6 +19,7 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.Supervision import pekko.stream.ThrottleMode diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIdleInjectSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIdleInjectSpec.scala index 5a3b937e995..c85ae748782 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIdleInjectSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIdleInjectSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestPublisher import pekko.stream.testkit.TestSubscriber diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInitialDelaySpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInitialDelaySpec.scala index 33b9102b53d..bf2dc6bf72c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInitialDelaySpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInitialDelaySpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestSubscriber diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveAllSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveAllSpec.scala index 44d6490faac..d8dd590b450 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveAllSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveAllSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import java.util.StringJoiner import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.StreamTestKit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveSpec.scala index d6e5b12265e..07d530880f8 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowInterleaveSpec.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko -import pekko.stream.testkit._ -import pekko.stream.testkit.scaladsl.StreamTestKit._ import org.reactivestreams.Publisher +import pekko.stream.testkit._ +import pekko.stream.testkit.scaladsl.StreamTestKit._ + class FlowInterleaveSpec extends BaseTwoStreamsSetup { override type Outputs = Int diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIntersperseSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIntersperseSpec.scala index 7addeb93338..3232e88b91a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIntersperseSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIntersperseSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink import pekko.stream.testkit.scaladsl.TestSource diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIteratorSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIteratorSpec.scala index 86158edbc4a..06e62743f90 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIteratorSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowIteratorSpec.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowJoinSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowJoinSpec.scala index e812367e876..b49adc02ff2 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowJoinSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowJoinSpec.scala @@ -16,13 +16,14 @@ package org.apache.pekko.stream.scaladsl import scala.collection.immutable import org.apache.pekko + +import org.scalatest.time._ + import pekko.stream.FlowShape import pekko.stream.OverflowStrategy import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl._ -import org.scalatest.time._ - class FlowJoinSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 """) { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowKillSwitchSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowKillSwitchSpec.scala index 6850d9df8ce..1e6fccc964e 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowKillSwitchSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowKillSwitchSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.Done import pekko.stream.ClosedShape import pekko.stream.KillSwitches diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitSpec.scala index 71e10c62c45..b1b8a743bf4 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.Await import org.apache.pekko + import pekko.stream.StreamLimitReachedException import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitWeightedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitWeightedSpec.scala index 4726c1a5239..fa970d01e01 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitWeightedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLimitWeightedSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.Await import org.apache.pekko + import pekko.stream.StreamLimitReachedException import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogSpec.scala index 7c9f0a78c90..76a484c978d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.NotUsed import pekko.event.{ DummyClassForStringSources, Logging } import pekko.stream._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogWithMarkerSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogWithMarkerSpec.scala index 039c420f32c..a6d061d4953 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogWithMarkerSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowLogWithMarkerSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.NotUsed import pekko.event.{ DummyClassForStringSources, LogMarker, Logging } import pekko.stream._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncPartitionedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncPartitionedSpec.scala index 1920af03c23..d3cf8ec189c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncPartitionedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncPartitionedSpec.scala @@ -25,6 +25,11 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.compatible.Assertion +import org.scalatest.time.Millis +import org.scalatest.time.Span + import pekko.Done import pekko.stream.ActorAttributes import pekko.stream.Attributes @@ -38,10 +43,6 @@ import pekko.testkit.TestLatch import pekko.testkit.TestProbe import pekko.testkit.WithLogCapturing -import org.scalatest.compatible.Assertion -import org.scalatest.time.Millis -import org.scalatest.time.Span - // Tests ported from akka/akka-core#31582 and akka/akka-core#31882, // adapted for Pekko's mapAsyncPartitioned API (no perPartition parameter). // Pekko's implementation always processes at most one element per partition at a time. diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncSpec.scala index 37ad2fb3530..2ddb139a627 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncSpec.scala @@ -26,6 +26,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration.Timeout + import pekko.stream.ActorAttributes import pekko.stream.ActorAttributes.supervisionStrategy import pekko.stream.Attributes @@ -39,8 +42,6 @@ import pekko.testkit.TestDuration import pekko.testkit.TestLatch import pekko.testkit.TestProbe -import org.scalatest.concurrent.PatienceConfiguration.Timeout - class FlowMapAsyncSpec extends StreamSpec { "A Flow with mapAsync" must { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncUnorderedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncUnorderedSpec.scala index 8c7f5ca5950..cce6fdeb8b1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncUnorderedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapAsyncUnorderedSpec.scala @@ -25,6 +25,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.scalatest.concurrent.PatienceConfiguration.Timeout + import pekko.stream.ActorAttributes.supervisionStrategy import pekko.stream.Attributes import pekko.stream.Supervision.resumingDecider @@ -35,8 +38,6 @@ import pekko.testkit.TestDuration import pekko.testkit.TestLatch import pekko.testkit.TestProbe -import org.scalatest.concurrent.PatienceConfiguration.Timeout - class FlowMapAsyncUnorderedSpec extends StreamSpec { "A Flow with mapAsyncUnordered" must { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapConcatSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapConcatSpec.scala index ac172b4553d..86c69fd23f1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapConcatSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapConcatSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.Supervision import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapErrorSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapErrorSpec.scala index 85d30ee0022..31eae8e261c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapErrorSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapErrorSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapWithResourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapWithResourceSpec.scala index 967bbeff1db..cfadd232466 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapWithResourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMapWithResourceSpec.scala @@ -24,14 +24,15 @@ import java.util.concurrent.atomic.AtomicInteger import scala.annotation.{ nowarn, tailrec } import scala.collection.mutable.ListBuffer -import scala.concurrent.{ Await, Promise } import scala.concurrent.duration.DurationInt +import scala.concurrent.{ Await, Promise } import scala.util.Success import scala.util.control.NoStackTrace +import org.apache.pekko + import com.google.common.jimfs.{ Configuration, Jimfs } -import org.apache.pekko import pekko.Done import pekko.stream.{ AbruptTerminationException, ActorAttributes, ActorMaterializer, Attributes, SystemMaterializer } import pekko.stream.ActorAttributes.supervisionStrategy @@ -39,7 +40,7 @@ import pekko.stream.Supervision.{ restartingDecider, resumingDecider, stoppingDe import pekko.stream.impl.{ PhasedFusingActorMaterializer, StreamSupervisor } import pekko.stream.impl.StreamSupervisor.Children import pekko.stream.testkit.{ StreamSpec, TestSubscriber } -import pekko.stream.testkit.Utils.{ assertDispatcher, TE, UnboundedMailboxConfig } +import pekko.stream.testkit.Utils.{ TE, UnboundedMailboxConfig, assertDispatcher } import pekko.stream.testkit.scaladsl.{ TestSink, TestSource } import pekko.testkit.{ EventFilter, TestDuration } import pekko.util.ByteString diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeAllSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeAllSpec.scala index 26f7cd5f973..1e7d5243bf5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeAllSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeAllSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeSpec.scala index ceda36540d3..2131e441131 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMergeSpec.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko -import pekko.stream.testkit._ -import pekko.stream.testkit.scaladsl.StreamTestKit._ import org.reactivestreams.Publisher +import pekko.stream.testkit._ +import pekko.stream.testkit.scaladsl.StreamTestKit._ + class FlowMergeSpec extends BaseTwoStreamsSetup { override type Outputs = Int diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMonitorSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMonitorSpec.scala index ac6a04d853d..b8476b63ac0 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMonitorSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowMonitorSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.FlowMonitorState import pekko.stream.FlowMonitorState._ import pekko.stream.Materializer diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnCompleteSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnCompleteSpec.scala index 120130e5a7a..a8b1317cd42 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnCompleteSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnCompleteSpec.scala @@ -19,6 +19,7 @@ import scala.util.Success import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.stream.Materializer import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorCompleteSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorCompleteSpec.scala index 48a88288a4a..97bd1eaf94a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorCompleteSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorCompleteSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.TimeoutException import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorContinueSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorContinueSpec.scala index 8a153a6a67f..e9f165b13d2 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorContinueSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOnErrorContinueSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.TimeoutException import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOrElseSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOrElseSpec.scala index 573b06d5987..7cad55c7b03 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOrElseSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowOrElseSpec.scala @@ -17,6 +17,7 @@ import scala.collection.immutable.Seq import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.TestPublisher import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.Utils.TE diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPrefixAndTailSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPrefixAndTailSpec.scala index cca5fa171b2..5318dd1762c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPrefixAndTailSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPrefixAndTailSpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.testkit.TestDuration diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPublisherSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPublisherSinkSpec.scala index 34c0cc5de8e..5c403d5e611 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPublisherSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowPublisherSinkSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.StreamSpec class FlowPublisherSinkSpec extends StreamSpec { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverSpec.scala index 0a6870e1757..b5e270c1c8a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit.EventFilter diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverWithSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverWithSpec.scala index 823340eed98..37250576914 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverWithSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowRecoverWithSpec.scala @@ -14,19 +14,20 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn -import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Future, Promise } import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import pekko.stream._ import pekko.stream.stage.{ GraphStage, GraphStageLogic } import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.Utils._ import pekko.stream.testkit.scaladsl.TestSink -import com.typesafe.config.ConfigFactory - @nowarn // tests deprecated APIs class FlowRecoverWithSpec extends StreamSpec(ConfigFactory.parseString(""" diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowReduceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowReduceSpec.scala index 05501407265..3ecde2ae93b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowReduceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowReduceSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.Supervision import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanAsyncSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanAsyncSpec.scala index 30ce6713026..ab5e98420bd 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanAsyncSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanAsyncSpec.scala @@ -21,6 +21,9 @@ import scala.concurrent.duration._ import scala.util.Failure import org.apache.pekko + +import org.scalatest.matchers.should.Matchers + import pekko.pattern import pekko.stream.ActorAttributes import pekko.stream.Supervision @@ -30,8 +33,6 @@ import pekko.stream.testkit.TestSubscriber.Probe import pekko.stream.testkit.Utils.TE import pekko.stream.testkit.scaladsl._ -import org.scalatest.matchers.should.Matchers - class FlowScanAsyncSpec extends StreamSpec with Matchers { implicit val executionContext: ExecutionContextExecutor = system.dispatcher diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanSpec.scala index 02f82347cbf..0a726b5f415 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowScanSpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream.ActorAttributes import pekko.stream.Supervision diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSectionSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSectionSpec.scala index bef11c7797e..abb3aa1445e 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSectionSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSectionSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.actor.ActorRef import pekko.stream.ActorAttributes._ import pekko.stream.Attributes._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSlidingSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSlidingSpec.scala index a1e10a8cae7..fbb48363d69 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSlidingSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSlidingSpec.scala @@ -15,16 +15,17 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn +import org.apache.pekko + +import com.typesafe.config.ConfigFactory + import org.scalacheck.Gen import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks -import org.apache.pekko import pekko.pattern.pipe import pekko.stream.{ ActorMaterializer, ActorMaterializerSettings, Materializer } import pekko.stream.testkit._ -import com.typesafe.config.ConfigFactory - @nowarn class FlowSlidingSpec extends StreamSpec(ConfigFactory.parseString(""" diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSpec.scala index c9f8f7cd33a..b84ac1dd06b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSpec.scala @@ -23,6 +23,11 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.reactivestreams.{ Publisher, Subscriber } + +import com.typesafe.config.ConfigFactory + import pekko.NotUsed import pekko.stream._ import pekko.stream.impl._ @@ -31,10 +36,6 @@ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.{ TestSink, TestSource } import pekko.testkit.TestDuration -import org.reactivestreams.{ Publisher, Subscriber } - -import com.typesafe.config.ConfigFactory - object FlowSpec { class Fruit extends Serializable class Apple extends Fruit diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitAfterSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitAfterSpec.scala index 9f8144fed3a..9ecb0cd9367 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitAfterSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitAfterSpec.scala @@ -17,18 +17,19 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.NotUsed import pekko.stream._ import pekko.stream.StreamSubscriptionTimeoutTerminationMode -import pekko.stream.Supervision.{ resumingDecider, Decider } +import pekko.stream.Supervision.{ Decider, resumingDecider } import pekko.stream.impl.SubscriptionTimeoutException import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestPublisher import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.Utils._ -import org.reactivestreams.Publisher - object FlowSplitAfterSpec { implicit class Lift[M](val f: SubFlow[Int, M, Source[Int, M]#Repr, RunnableGraph[M]]) extends AnyVal { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitWhenSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitWhenSpec.scala index d9ea36e09f8..e52a4604072 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitWhenSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSplitWhenSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.Done import pekko.NotUsed import pekko.stream._ @@ -28,8 +31,6 @@ import pekko.stream.testkit._ import pekko.stream.testkit.Utils._ import pekko.stream.testkit.scaladsl.TestSink -import org.reactivestreams.Publisher - class FlowSplitWhenSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 pekko.stream.materializer.max-input-buffer-size = 2 diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapConcatSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapConcatSpec.scala index 0df9cf52322..6f39665c588 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapConcatSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapConcatSpec.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.Supervision import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapSpec.scala index 54f4e574941..7bc57f309d9 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowStatefulMapSpec.scala @@ -23,6 +23,7 @@ import scala.util.Success import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.stream.{ AbruptStageTerminationException, ActorAttributes, ActorMaterializer, ClosedShape, Supervision } import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSupervisionSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSupervisionSpec.scala index a949c3e9922..34e6199aa2b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSupervisionSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSupervisionSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.NotUsed import pekko.stream.ActorAttributes import pekko.stream.Supervision diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSwitchSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSwitchSpec.scala index 6a318ef18f6..68f0a3c564a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSwitchSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSwitchSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Await import scala.concurrent.duration.DurationInt import org.apache.pekko + +import org.scalatest.exceptions.TestFailedException + import pekko.NotUsed import pekko.stream.Attributes import pekko.stream.Outlet @@ -30,8 +33,6 @@ import pekko.stream.testkit.Utils.TE import pekko.stream.testkit.scaladsl.TestSink import pekko.stream.testkit.scaladsl.TestSource -import org.scalatest.exceptions.TestFailedException - class FlowSwitchSpec extends StreamSpec { import FlowSwitchSpec._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeSpec.scala index cc51de854bd..18d9aaf63d6 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.impl.ActorSubscriberMessage.OnComplete import pekko.stream.impl.ActorSubscriberMessage.OnNext import pekko.stream.impl.RequestMore diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeWhileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeWhileSpec.scala index e41db970550..39ed52853d9 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeWhileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowTakeWhileSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.ActorAttributes._ import pekko.stream.Supervision._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowThrottleSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowThrottleSpec.scala index 19d693d4e54..04d80710668 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowThrottleSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowThrottleSpec.scala @@ -22,6 +22,7 @@ import scala.util.Random import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.stream._ import pekko.stream.ThrottleMode.{ Enforcing, Shaping } diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchSpec.scala index e2f8ed54893..43bcf9cd695 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.Actor import pekko.actor.PoisonPill import pekko.actor.Props diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchTerminationSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchTerminationSpec.scala index 437dc9f6d17..35bb7e817cf 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchTerminationSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWatchTerminationSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.pattern.pipe import pekko.stream._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWireTapSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWireTapSpec.scala index 7fb38db8f7f..77f0b68686a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWireTapSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWireTapSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.stream.testkit._ import pekko.stream.testkit.Utils._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextLogSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextLogSpec.scala index af76e6c09ae..b4edaa639ad 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextLogSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextLogSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.event.Logging import pekko.stream._ import pekko.stream.Attributes.LogLevels diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextSpec.scala index 0325cc1650a..93143d0e3a9 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextSpec.scala @@ -20,6 +20,7 @@ import scala.jdk.CollectionConverters._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextThrottleSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextThrottleSpec.scala index e1355ef64bb..537db371410 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextThrottleSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowWithContextThrottleSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ThrottleMode.Shaping import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowZipAllSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowZipAllSpec.scala index 01f0b3a570a..b63a9108d5d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowZipAllSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowZipAllSpec.scala @@ -14,11 +14,12 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko -import pekko.stream.testkit.{ BaseTwoStreamsSetup, TestSubscriber } -import pekko.stream.testkit.scaladsl.StreamTestKit._ import org.reactivestreams.Publisher +import pekko.stream.testkit.{ BaseTwoStreamsSetup, TestSubscriber } +import pekko.stream.testkit.scaladsl.StreamTestKit._ + class FlowZipAllSpec extends BaseTwoStreamsSetup { override type Outputs = (Int, Int) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ForComprehensionsCompileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ForComprehensionsCompileSpec.scala index 1e6fde98f22..153c839bd5f 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ForComprehensionsCompileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ForComprehensionsCompileSpec.scala @@ -23,6 +23,7 @@ import scala.concurrent.Await import scala.concurrent.duration.DurationInt import org.apache.pekko + import pekko.Done import pekko.japi.Util import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FramingSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FramingSpec.scala index ef67db1023d..b3b5d190ead 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FramingSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FramingSpec.scala @@ -23,6 +23,7 @@ import scala.concurrent.duration._ import scala.util.Random import org.apache.pekko + import pekko.stream._ import pekko.stream.scaladsl.Framing.FramingException import pekko.stream.stage._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FromMaterializationSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FromMaterializationSpec.scala index 68ad985e45f..967c3e95a10 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FromMaterializationSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FromMaterializationSpec.scala @@ -14,10 +14,11 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.Attributes import pekko.stream.Attributes.Attribute -import pekko.stream.scaladsl.AttributesSpec.{ whateverAttribute, WhateverAttribute } +import pekko.stream.scaladsl.AttributesSpec.{ WhateverAttribute, whateverAttribute } import pekko.stream.testkit.StreamSpec class FromMaterializerSpec extends StreamSpec { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBackedFlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBackedFlowSpec.scala index df8328d1d90..159aa5372b7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBackedFlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBackedFlowSpec.scala @@ -16,15 +16,16 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn import org.apache.pekko -import pekko.stream._ -import pekko.stream.ActorMaterializer -import pekko.stream.ActorMaterializerSettings -import pekko.stream.testkit._ import org.reactivestreams.Subscriber import com.typesafe.config.ConfigFactory +import pekko.stream._ +import pekko.stream.ActorMaterializer +import pekko.stream.ActorMaterializerSettings +import pekko.stream.testkit._ + object GraphFlowSpec { val source1 = Source(0 to 3) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBalanceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBalanceSpec.scala index ca103b07d85..ee2317d3a61 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBalanceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBalanceSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBroadcastSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBroadcastSpec.scala index 0b9b3c38842..96212485904 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBroadcastSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphBroadcastSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphConcatSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphConcatSpec.scala index c778c0fad67..fc62a816291 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphConcatSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphConcatSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.Promise import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.StreamTestKit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphDSLCompileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphDSLCompileSpec.scala index dd016220977..5adb7afd8e5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphDSLCompileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphDSLCompileSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.impl.fusing.GraphStages diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMatValueSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMatValueSpec.scala index 33360342749..a271af6a267 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMatValueSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMatValueSpec.scala @@ -21,6 +21,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.Done import pekko.NotUsed import pekko.stream._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeLatestSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeLatestSpec.scala index dc7fb7357e2..9ebfb525461 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeLatestSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeLatestSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.StreamTestKit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePreferredSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePreferredSpec.scala index 64ee4fbe64c..4685836f24e 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePreferredSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePreferredSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit.TwoStreamsSetup diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedNSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedNSpec.scala index 7fcc5fba26c..ecf68e256e6 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedNSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedNSpec.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream.Attributes import pekko.stream.Attributes.Attribute diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedSpec.scala index df9eacc7c71..47f1d0b19ca 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergePrioritizedSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ ClosedShape, Inlet, Outlet } import pekko.stream.testkit.{ TestSubscriber, TwoStreamsSetup } diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSequenceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSequenceSpec.scala index 38c4f8323d4..63e17bd2bd0 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSequenceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSequenceSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSortedSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSortedSpec.scala index f97a2e85264..e458b6cc5ed 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSortedSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSortedSpec.scala @@ -15,11 +15,12 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn +import org.apache.pekko + import org.scalacheck.Gen import org.scalacheck.Shrink import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks -import org.apache.pekko import pekko.stream._ import pekko.stream.testkit.TwoStreamsSetup diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSpec.scala index e75f2598c7c..ac3af2999cb 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphMergeSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.StreamTestKit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphOpsIntegrationSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphOpsIntegrationSpec.scala index cef5e97de79..d41a6990ea9 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphOpsIntegrationSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphOpsIntegrationSpec.scala @@ -19,6 +19,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.NotUsed import pekko.stream._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartialSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartialSpec.scala index 83ed4d4bdae..49d497bbbf5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartialSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartialSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ClosedShape import pekko.stream.FlowShape import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartitionSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartitionSpec.scala index 99980ecfab3..2aaf7a05b78 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartitionSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphPartitionSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ActorAttributes import pekko.stream.ClosedShape import pekko.stream.OverflowStrategy diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphStageTimersSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphStageTimersSpec.scala index 385b41dc0d3..b892e6b6418 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphStageTimersSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphStageTimersSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorRef import pekko.stream.Attributes import pekko.stream.impl.fusing.GraphStages.SimpleLinearGraphStage diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipSpec.scala index c1e64bd0a9d..6df5e1af0a7 100755 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ClosedShape import pekko.stream.OverflowStrategy import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipWithSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipWithSpec.scala index 159b5c16111..0f2b7a09ac1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipWithSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphUnzipWithSpec.scala @@ -19,6 +19,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.Done import pekko.NotUsed import pekko.stream._ @@ -28,8 +31,6 @@ import pekko.stream.testkit.Utils.TE import pekko.testkit.EventFilter import pekko.testkit.TestProbe -import org.reactivestreams.Publisher - class GraphUnzipWithSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 2 """) { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphWireTapSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphWireTapSpec.scala index edf775a714c..2eccb7a5eef 100755 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphWireTapSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphWireTapSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestSpec.scala index 858ed28fb39..58f4405cba3 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestSpec.scala @@ -15,10 +15,13 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ +import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import org.scalacheck.Gen import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks -import org.apache.pekko import pekko.stream.ClosedShape import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestPublisher @@ -27,8 +30,6 @@ import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.scaladsl.TestSink import pekko.stream.testkit.scaladsl.TestSource -import org.scalatest.concurrent.ScalaFutures - object GraphZipLatestSpec { val someString = "someString" val someInt = 1 diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestWithSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestWithSpec.scala index 1149eda4ee1..01ab488c607 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestWithSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipLatestWithSpec.scala @@ -16,12 +16,13 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + +import org.reactivestreams.Publisher + import pekko.stream._ import pekko.stream.testkit._ import pekko.testkit.EventFilter -import org.reactivestreams.Publisher - class GraphZipLatestWithSpec extends TwoStreamsSetup { import GraphDSL.Implicits._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipNSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipNSpec.scala index ad62175d2d1..3ac3c25dc92 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipNSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipNSpec.scala @@ -17,6 +17,7 @@ import scala.collection.immutable import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.StreamTestKit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipSpec.scala index 3be67e01348..521065f5e75 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.StreamTestKit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithNSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithNSpec.scala index 260456aba12..5c7676113c5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithNSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithNSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.TwoStreamsSetup diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithSpec.scala index 5428dce8c7d..e24030583dc 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphZipWithSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HeadSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HeadSinkSpec.scala index d1503f3a1c5..c0de72551a9 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HeadSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HeadSinkSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Future import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.AbruptTerminationException import pekko.stream.Materializer import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HubSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HubSpec.scala index b32c8746b10..d9aab9af92b 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HubSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/HubSpec.scala @@ -14,10 +14,13 @@ package org.apache.pekko.stream.scaladsl import scala.collection.immutable -import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import org.apache.pekko + +import org.scalatest.time.{ Seconds, Span } + import pekko.Done import pekko.stream.KillSwitches import pekko.stream.ThrottleMode @@ -31,8 +34,6 @@ import pekko.stream.testkit.scaladsl.TestSource import pekko.testkit.EventFilter import pekko.testkit.TestDuration -import org.scalatest.time.{ Seconds, Span } - class HubSpec extends StreamSpec { implicit val ec: ExecutionContext = system.dispatcher diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/JsonFramingSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/JsonFramingSpec.scala index ba43a00f521..025bac8f3a7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/JsonFramingSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/JsonFramingSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.impl.JsonObjectParser import pekko.stream.scaladsl.Framing.FramingException import pekko.stream.scaladsl.JsonFraming.PartialObjectException diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazyFlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazyFlowSpec.scala index 87c2a1d87e9..240c9b07b80 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazyFlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazyFlowSpec.scala @@ -14,10 +14,11 @@ package org.apache.pekko.stream.scaladsl import scala.collection.immutable -import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.stream.{ AbruptStageTerminationException, Attributes, Materializer, NeverMaterializedException } import pekko.stream.Attributes.Attribute diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySinkSpec.scala index e65f919b822..162d2fad6e3 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySinkSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.Future import org.apache.pekko + import pekko.Done import pekko.stream._ import pekko.stream.Attributes.Attribute diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySourceSpec.scala index 034bc3d4d24..de20b69ec99 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/LazySourceSpec.scala @@ -20,6 +20,9 @@ import scala.concurrent.Future import scala.concurrent.Promise import org.apache.pekko + +import org.scalatest.concurrent.ScalaFutures + import pekko.Done import pekko.NotUsed import pekko.stream._ @@ -34,8 +37,6 @@ import pekko.stream.testkit.Utils.TE import pekko.testkit.DefaultTimeout import pekko.testkit.TestProbe -import org.scalatest.concurrent.ScalaFutures - class LazySourceSpec extends StreamSpec with DefaultTimeout with ScalaFutures { import system.dispatcher diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/MaybeSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/MaybeSourceSpec.scala index c0e94a34182..050073648f9 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/MaybeSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/MaybeSourceSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.{ AbruptStageTerminationException, KillSwitches, Materializer } import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestSubscriber diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/NeverSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/NeverSourceSpec.scala index 00ee750ede1..2d1bec94361 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/NeverSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/NeverSourceSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.testkit.{ StreamSpec, TestSubscriber } import pekko.testkit.DefaultTimeout diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/PublisherSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/PublisherSinkSpec.scala index a2f858c0177..402cc2c85af 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/PublisherSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/PublisherSinkSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ClosedShape import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSinkSpec.scala index 73ac82167fa..6a836c3b0bd 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSinkSpec.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.pattern.pipe import pekko.stream.AbruptTerminationException import pekko.stream.Attributes.inputBuffer diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSourceSpec.scala index 559369ce261..f1a7e4e9c0e 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/QueueSourceSpec.scala @@ -18,6 +18,9 @@ import scala.concurrent._ import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.time.Span + import pekko.Done import pekko.actor.Status import pekko.pattern.pipe @@ -30,8 +33,6 @@ import pekko.stream.testkit.TestSubscriber import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit.TestProbe -import org.scalatest.time.Span - class QueueSourceSpec extends StreamSpec { implicit val ec: ExecutionContextExecutor = system.dispatcher val pause = 300.millis diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RestartSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RestartSpec.scala index 726f9d382c3..aa21813d987 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RestartSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RestartSpec.scala @@ -22,6 +22,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.Done import pekko.NotUsed import pekko.event.Logging diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RetryFlowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RetryFlowSpec.scala index 25b25720b3d..7429873ef61 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RetryFlowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RetryFlowSpec.scala @@ -17,13 +17,14 @@ import scala.concurrent.duration._ import scala.util.{ Failure, Success, Try } import org.apache.pekko + +import org.scalatest.matchers.{ MatchResult, Matcher } + import pekko.NotUsed import pekko.stream.OverflowStrategy import pekko.stream.testkit.{ StreamSpec, TestPublisher, TestSubscriber } import pekko.stream.testkit.scaladsl.{ TestSink, TestSource } -import org.scalatest.matchers.{ MatchResult, Matcher } - class RetryFlowSpec extends StreamSpec(""" pekko.stream.materializer.initial-input-buffer-size = 1 pekko.stream.materializer.max-input-buffer-size = 1 diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ReverseArrowSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ReverseArrowSpec.scala index 9ca05e3b750..eb788106fa4 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ReverseArrowSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/ReverseArrowSpec.scala @@ -17,6 +17,7 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream._ import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RunnableGraphSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RunnableGraphSpec.scala index b80ab315309..4a78b400d16 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RunnableGraphSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/RunnableGraphSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.Attributes import pekko.stream.javadsl diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SeqSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SeqSinkSpec.scala index a715befb2e5..997653ea2fe 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SeqSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SeqSinkSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Await import scala.concurrent.Future import org.apache.pekko + import pekko.stream.AbruptTerminationException import pekko.stream.Materializer import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkAsJavaStreamSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkAsJavaStreamSpec.scala index 1bab31323b4..4df2ea7916c 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkAsJavaStreamSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkAsJavaStreamSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import java.util.stream.Collectors import org.apache.pekko + import pekko.stream._ import pekko.stream.impl.PhasedFusingActorMaterializer import pekko.stream.impl.StreamSupervisor diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkForeachAsyncSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkForeachAsyncSpec.scala index 64df36cc8cd..3d25fc796f1 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkForeachAsyncSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkForeachAsyncSpec.scala @@ -24,6 +24,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.stream.ActorAttributes.supervisionStrategy import pekko.stream.Supervision.resumingDecider diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkSpec.scala index 11689a3ac70..98c5c2c3816 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SinkSpec.scala @@ -15,10 +15,15 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.nowarn import scala.collection.immutable -import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import org.apache.pekko + +import org.reactivestreams.Publisher + +import org.scalatest.concurrent.ScalaFutures + import pekko.Done import pekko.stream._ import pekko.stream.ActorAttributes.supervisionStrategy @@ -26,10 +31,6 @@ import pekko.stream.testkit._ import pekko.stream.testkit.scaladsl.{ TestSink, TestSource } import pekko.testkit.DefaultTimeout -import org.reactivestreams.Publisher - -import org.scalatest.concurrent.ScalaFutures - class SinkSpec extends StreamSpec with DefaultTimeout with ScalaFutures { import GraphDSL.Implicits._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceFromPublisherSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceFromPublisherSpec.scala index 1d16dacb6ad..687587df82e 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceFromPublisherSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceFromPublisherSpec.scala @@ -14,14 +14,15 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AsyncWordSpecLike + import pekko.actor.ActorSystem import pekko.stream.Attributes import pekko.stream.testkit.TestPublisher import pekko.testkit.TestKit -import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AsyncWordSpecLike - class SourceFromPublisherSpec extends TestKit(ActorSystem("source-from-publisher-spec")) with AsyncWordSpecLike diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceSinkSpec.scala index 568c5f9de59..459bb9b388f 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceSinkSpec.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.{ Attributes, StreamSubscriptionTimeoutTerminationMode } import pekko.stream.ActorAttributes.StreamSubscriptionTimeout import pekko.stream.testkit.StreamSpec diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceWithContextSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceWithContextSpec.scala index 363a0133cc7..c0435422a59 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceWithContextSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SourceWithContextSpec.scala @@ -20,6 +20,7 @@ import scala.jdk.CollectionConverters._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala index 3c7f2cd265e..43296a0a2dc 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala @@ -18,6 +18,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor.ActorPath import pekko.actor.ActorRef import pekko.actor.Kill diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamConvertersSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamConvertersSpec.scala index 5d164e17fc7..f8bb694a406 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamConvertersSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamConvertersSpec.scala @@ -14,7 +14,6 @@ package org.apache.pekko.stream.scaladsl import java.util -import java.util.{ Spliterator, Spliterators } import java.util.function.BiConsumer import java.util.function.BinaryOperator import java.util.function.Supplier @@ -23,20 +22,22 @@ import java.util.stream.BaseStream import java.util.stream.Collector import java.util.stream.Collector.Characteristics import java.util.stream.Collectors +import java.util.{ Spliterator, Spliterators } import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko + +import org.scalatest.time.Millis +import org.scalatest.time.Span + import pekko.stream.ActorAttributes import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.Utils.TE import pekko.testkit.DefaultTimeout import pekko.util.ByteString -import org.scalatest.time.Millis -import org.scalatest.time.Span - class StreamConvertersSpec extends StreamSpec with DefaultTimeout { implicit val config: PatienceConfig = PatienceConfig(timeout = Span(timeout.duration.toMillis, Millis)) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamRefsSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamRefsSpec.scala index d877cac479e..a05ae1385a7 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamRefsSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamRefsSpec.scala @@ -13,16 +13,19 @@ package org.apache.pekko.stream.scaladsl +import java.util.concurrent.CountDownLatch + import scala.collection.immutable -import scala.concurrent.{ Await, Future } import scala.concurrent.Promise import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import scala.util.Try import scala.util.control.NoStackTrace -import java.util.concurrent.CountDownLatch - import org.apache.pekko + +import com.typesafe.config._ + import pekko.{ Done, NotUsed } import pekko.actor.{ Actor, ActorIdentity, ActorLogging, ActorRef, ActorSystem, ActorSystemImpl, Identify, Props } import pekko.actor.Status.Failure @@ -34,8 +37,6 @@ import pekko.stream.testkit.scaladsl._ import pekko.testkit.{ PekkoSpec, TestKit, TestProbe } import pekko.util.ByteString -import com.typesafe.config._ - object StreamRefsSpec { object DataSourceActor { diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SubstreamSubscriptionTimeoutSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SubstreamSubscriptionTimeoutSpec.scala index 5f604ab63d1..dfd02665b52 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SubstreamSubscriptionTimeoutSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/SubstreamSubscriptionTimeoutSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.Await import org.apache.pekko + import pekko.stream.impl.SubscriptionTimeoutException import pekko.stream.testkit._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TakeLastSinkSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TakeLastSinkSpec.scala index 3103a5d34e5..1a69bed9478 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TakeLastSinkSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TakeLastSinkSpec.scala @@ -18,11 +18,12 @@ import scala.collection.immutable import scala.concurrent.{ Await, Future } import org.apache.pekko -import pekko.stream.{ AbruptTerminationException, ActorMaterializer, ActorMaterializerSettings, Materializer } -import pekko.stream.testkit.{ StreamSpec, TestPublisher } import com.typesafe.config.ConfigFactory +import pekko.stream.{ AbruptTerminationException, ActorMaterializer, ActorMaterializerSettings, Materializer } +import pekko.stream.testkit.{ StreamSpec, TestPublisher } + @nowarn class TakeLastSinkSpec extends StreamSpec(ConfigFactory.parseString(""" diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TickSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TickSourceSpec.scala index d85f0593c04..649474c96d4 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TickSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/TickSourceSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.stream.ClosedShape import pekko.stream.testkit._ import pekko.testkit.TimingTest diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceAsyncSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceAsyncSourceSpec.scala index 829762e0aca..5bb6f3a74e3 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceAsyncSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceAsyncSourceSpec.scala @@ -22,6 +22,7 @@ import scala.concurrent.Promise import scala.concurrent.duration._ import org.apache.pekko + import pekko.Done import pekko.stream.ActorAttributes import pekko.stream.Materializer diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceSourceSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceSourceSpec.scala index 1920105db26..32729a36a03 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceSourceSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/UnfoldResourceSourceSpec.scala @@ -20,10 +20,11 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ +import org.apache.pekko + import com.google.common.jimfs.Configuration import com.google.common.jimfs.Jimfs -import org.apache.pekko import pekko.stream.ActorAttributes import pekko.stream.ActorAttributes._ import pekko.stream.Supervision._ diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/WithContextUsageSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/WithContextUsageSpec.scala index 9e111437869..fe5633624d5 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/WithContextUsageSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/WithContextUsageSpec.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.NotUsed import pekko.stream.testkit.StreamSpec import pekko.stream.testkit.TestSubscriber.Probe diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/snapshot/MaterializerStateSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/snapshot/MaterializerStateSpec.scala index d1bcb75823a..acbae22119a 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/snapshot/MaterializerStateSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/snapshot/MaterializerStateSpec.scala @@ -19,6 +19,7 @@ import javax.net.ssl.SSLContext import scala.concurrent.Promise import org.apache.pekko + import pekko.stream.{ FlowShape, Materializer } import pekko.stream.scaladsl.{ Flow, GraphDSL, Keep, Merge, Partition, Sink, Source, Tcp } import pekko.stream.testkit.scaladsl.TestSink diff --git a/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala b/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala index c22bde92c24..ad832049a54 100644 --- a/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala +++ b/stream-typed-tests/src/test/scala/org/apache/pekko/stream/MapAsyncPartitionedSpec.scala @@ -21,14 +21,20 @@ import java.time.Instant import java.util.concurrent.{ ExecutorService, Executors } import scala.annotation.nowarn -import scala.concurrent.{ blocking, ExecutionContext, Future } import scala.concurrent.duration.{ DurationInt, FiniteDuration } +import scala.concurrent.{ ExecutionContext, Future, blocking } import scala.util.Random +import org.apache.pekko + +import org.scalatest.BeforeAndAfterAll +import org.scalatest.concurrent.ScalaFutures +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers + import org.scalacheck.{ Arbitrary, Gen } import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks -import org.apache.pekko import pekko.actor.typed.ActorSystem import pekko.actor.typed.scaladsl.Behaviors import pekko.stream.scaladsl.{ @@ -47,11 +53,6 @@ import pekko.stream.testkit.scaladsl.TestSink import pekko.testkit.TestKitExtension import pekko.util.JavaVersion -import org.scalatest.BeforeAndAfterAll -import org.scalatest.concurrent.ScalaFutures -import org.scalatest.flatspec.AnyFlatSpec -import org.scalatest.matchers.should.Matchers - private object MapAsyncPartitionedSpec { object TestData { diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala index 1e086f31dd8..9394bc3d57c 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.jdk.DurationConverters.JavaDurationOps import org.apache.pekko + import pekko.NotUsed import pekko.actor.typed.ActorRef import pekko.japi.Pair diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala index b4719d8f991..057e47aa877 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.actor.typed._ import pekko.stream.javadsl._ diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala index cea0acd0c4c..ffa8296e69b 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.typed.javadsl import org.apache.pekko + import pekko.actor.typed._ import pekko.japi.JavaPartialFunction import pekko.japi.function diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/PubSub.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/PubSub.scala index 7551e6967a6..f04045c06e0 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/PubSub.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/PubSub.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.typed.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.actor.typed.ActorRef import pekko.actor.typed.pubsub.Topic diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorFlow.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorFlow.scala index d7dcd21dab7..66551234c62 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorFlow.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorFlow.scala @@ -18,6 +18,7 @@ import scala.concurrent.ExecutionContext import scala.concurrent.Future import org.apache.pekko + import pekko.NotUsed import pekko.actor.typed.ActorRef import pekko.pattern.{ AskTimeoutException, StatusReply } diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSink.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSink.scala index dc06e97f5e0..fc70e1f5bbb 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSink.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSink.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.typed.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.actor.typed._ import pekko.stream.scaladsl._ diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSource.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSource.scala index 5e79f4fd650..dfa505b2e89 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSource.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.typed.scaladsl import org.apache.pekko + import pekko.actor.typed._ import pekko.stream.{ CompletionStrategy, OverflowStrategy } import pekko.stream.scaladsl._ diff --git a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/PubSub.scala b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/PubSub.scala index a009afaca81..2f564afec7d 100644 --- a/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/PubSub.scala +++ b/stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/PubSub.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.typed.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.actor.typed.ActorRef import pekko.actor.typed.pubsub.Topic diff --git a/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/ActorSourceSinkSpec.scala b/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/ActorSourceSinkSpec.scala index 4e8de89532b..ee8866a0ede 100644 --- a/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/ActorSourceSinkSpec.scala +++ b/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/ActorSourceSinkSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.stream.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl._ import pekko.actor.typed.ActorRef import pekko.actor.typed.scaladsl.Behaviors @@ -22,8 +25,6 @@ import pekko.stream.scaladsl.Keep import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source -import org.scalatest.wordspec.AnyWordSpecLike - object ActorSourceSinkSpec { sealed trait AckProto diff --git a/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/MaterializerForTypedSpec.scala b/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/MaterializerForTypedSpec.scala index 254033e3f2a..6776164e4f1 100644 --- a/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/MaterializerForTypedSpec.scala +++ b/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/MaterializerForTypedSpec.scala @@ -17,6 +17,9 @@ import scala.concurrent.Future import scala.util.Success import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.Done import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -26,8 +29,6 @@ import pekko.stream.Materializer import pekko.stream.scaladsl.Sink import pekko.stream.scaladsl.Source -import org.scalatest.wordspec.AnyWordSpecLike - class MaterializerForTypedSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "Materialization in typed" should { diff --git a/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/PubSubSpec.scala b/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/PubSubSpec.scala index 025ce988a52..daabeeb6500 100644 --- a/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/PubSubSpec.scala +++ b/stream-typed/src/test/scala/org/apache/pekko/stream/typed/scaladsl/PubSubSpec.scala @@ -14,6 +14,9 @@ package org.apache.pekko.stream.typed.scaladsl import org.apache.pekko + +import org.scalatest.wordspec.AnyWordSpecLike + import pekko.actor.testkit.typed.scaladsl.LogCapturing import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import pekko.actor.typed.internal.pubsub.TopicImpl @@ -22,8 +25,6 @@ import pekko.stream.OverflowStrategy import pekko.stream.scaladsl.Source import pekko.stream.testkit.scaladsl.TestSink -import org.scalatest.wordspec.AnyWordSpecLike - class PubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing { "PubSub.source" should { diff --git a/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala b/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala index 2a3d85060f6..fedeea3571a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala @@ -19,6 +19,9 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.ActorContext import pekko.actor.ActorRef import pekko.actor.ActorRefFactory @@ -30,8 +33,6 @@ import pekko.stream.impl.streamref.StreamRefDefaultSettings import pekko.stream.stage.GraphStageLogic import pekko.util.Helpers.toRootLowerCase -import com.typesafe.config.Config - @InternalApi private[pekko] object ActorMaterializer { diff --git a/stream/src/main/scala/org/apache/pekko/stream/Attributes.scala b/stream/src/main/scala/org/apache/pekko/stream/Attributes.scala index 5cb92358865..e7cc586780f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/Attributes.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/Attributes.scala @@ -23,10 +23,11 @@ import scala.annotation.tailrec import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import scala.jdk.OptionConverters._ -import scala.reflect.{ classTag, ClassTag } +import scala.reflect.{ ClassTag, classTag } import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.ActorSystem import pekko.annotation.ApiMayChange import pekko.annotation.DoNotInherit diff --git a/stream/src/main/scala/org/apache/pekko/stream/BoundedSourceQueue.scala b/stream/src/main/scala/org/apache/pekko/stream/BoundedSourceQueue.scala index cf55dee581c..6d7e0291505 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/BoundedSourceQueue.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/BoundedSourceQueue.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream import org.apache.pekko + import pekko.annotation.DoNotInherit /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/Graph.scala b/stream/src/main/scala/org/apache/pekko/stream/Graph.scala index cc0548aa90a..be905a26c49 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/Graph.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/Graph.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.impl.TraversalBuilder import pekko.stream.scaladsl.GenericGraph diff --git a/stream/src/main/scala/org/apache/pekko/stream/IOResult.scala b/stream/src/main/scala/org/apache/pekko/stream/IOResult.scala index 4e0e68a20a1..1d84bd247dc 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/IOResult.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/IOResult.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.Done /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/KillSwitch.scala b/stream/src/main/scala/org/apache/pekko/stream/KillSwitch.scala index 018538fa01f..1c54692ac81 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/KillSwitch.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/KillSwitch.scala @@ -20,6 +20,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.stream.stage._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala b/stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala index b7ca9219d2e..fd2cdba4448 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala @@ -20,10 +20,11 @@ package org.apache.pekko.stream import scala.collection.mutable import scala.concurrent.ExecutionContext import scala.concurrent.Future -import scala.util.{ Failure, Success, Try } import scala.util.control.{ NoStackTrace, NonFatal } +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.event.Logging import pekko.event.Logging.LogLevel diff --git a/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala b/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala index dd5c56b92ba..19fd90d99e9 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala @@ -18,6 +18,7 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.actor.ActorRef import pekko.actor.ActorSystem import pekko.actor.Cancellable diff --git a/stream/src/main/scala/org/apache/pekko/stream/MaterializerLoggingProvider.scala b/stream/src/main/scala/org/apache/pekko/stream/MaterializerLoggingProvider.scala index fa912b00141..a3e159f578a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/MaterializerLoggingProvider.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/MaterializerLoggingProvider.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.event.LoggingAdapter diff --git a/stream/src/main/scala/org/apache/pekko/stream/OverflowStrategy.scala b/stream/src/main/scala/org/apache/pekko/stream/OverflowStrategy.scala index 3d655e20ed8..d7736c71631 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/OverflowStrategy.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/OverflowStrategy.scala @@ -13,9 +13,9 @@ package org.apache.pekko.stream -import OverflowStrategies._ - import org.apache.pekko + +import OverflowStrategies._ import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.event.Logging import pekko.event.Logging.LogLevel diff --git a/stream/src/main/scala/org/apache/pekko/stream/RestartSettings.scala b/stream/src/main/scala/org/apache/pekko/stream/RestartSettings.scala index 896aded630e..17df4666767 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/RestartSettings.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/RestartSettings.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.event.Logging import pekko.event.Logging.LogLevel import pekko.japi.function diff --git a/stream/src/main/scala/org/apache/pekko/stream/Shape.scala b/stream/src/main/scala/org/apache/pekko/stream/Shape.scala index bd4253edc8d..9d15acfcea4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/Shape.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/Shape.scala @@ -18,6 +18,7 @@ import scala.collection.immutable import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.Collections.EmptyImmutableSeq diff --git a/stream/src/main/scala/org/apache/pekko/stream/SslTlsOptions.scala b/stream/src/main/scala/org/apache/pekko/stream/SslTlsOptions.scala index 964001c6fc0..ece0b4c1adf 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/SslTlsOptions.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/SslTlsOptions.scala @@ -19,6 +19,7 @@ import scala.annotation.varargs import scala.collection.immutable import org.apache.pekko + import pekko.util.ByteString /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/StreamRefs.scala b/stream/src/main/scala/org/apache/pekko/stream/StreamRefs.scala index 3bca3fedad5..1e7666f7c75 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/StreamRefs.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/StreamRefs.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream import scala.language.implicitConversions import org.apache.pekko + import pekko.NotUsed import pekko.actor.ActorRef import pekko.actor.ActorSystem diff --git a/stream/src/main/scala/org/apache/pekko/stream/StreamTimeoutException.scala b/stream/src/main/scala/org/apache/pekko/stream/StreamTimeoutException.scala index f91ae71ec94..4c65ebf15cb 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/StreamTimeoutException.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/StreamTimeoutException.scala @@ -21,6 +21,7 @@ import scala.concurrent.TimeoutException import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.annotation.DoNotInherit /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala b/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala index b388de38bb9..bdf30ca2640 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala @@ -19,6 +19,7 @@ import scala.concurrent.Promise import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider import pekko.actor.Deploy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorMaterializerImpl.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorMaterializerImpl.scala index 34b0685193d..c3d08244a50 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorMaterializerImpl.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorMaterializerImpl.scala @@ -21,6 +21,7 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ import org.apache.pekko + import pekko.actor._ import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala index 9c159f622d4..1e0e9aea35a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala @@ -16,13 +16,14 @@ package org.apache.pekko.stream.impl import scala.annotation.nowarn import org.apache.pekko + +import org.reactivestreams.{ Subscriber, Subscription } + import pekko.actor._ import pekko.annotation.InternalApi import pekko.event.Logging import pekko.stream.impl.ActorSubscriberMessage.{ OnComplete, OnError, OnNext, OnSubscribe } -import org.reactivestreams.{ Subscriber, Subscription } - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala index 80ab09ca63e..a9da7f459b5 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala @@ -20,11 +20,12 @@ import scala.collection.immutable import scala.util.control.NoStackTrace import org.apache.pekko -import pekko.actor.{ Actor, ActorRef, Terminated } -import pekko.annotation.InternalApi -import org.reactivestreams.{ Publisher, Subscriber } import org.reactivestreams.Subscription +import org.reactivestreams.{ Publisher, Subscriber } + +import pekko.actor.{ Actor, ActorRef, Terminated } +import pekko.annotation.InternalApi /** * INTERNAL API diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSinkStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSinkStage.scala index 1c1d1f02920..928fd6aea74 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSinkStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSinkStage.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import java.util import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSource.scala index e8f51ecf87c..fe722f7cd36 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSinkStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSinkStage.scala index 70d418b5d61..64e5cabc3e0 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSinkStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSinkStage.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.actor.{ ActorRef, Terminated } import pekko.annotation.InternalApi import pekko.stream.{ AbruptStageTerminationException, Attributes, Inlet, SinkShape } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala index 0d73f712319..21a015a20cd 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.{ ActorRef, FunctionRef, Kill, PoisonPill } import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorSubscriberMessage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorSubscriberMessage.scala index 43737bdad04..2cdffa36c76 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ActorSubscriberMessage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ActorSubscriberMessage.scala @@ -14,12 +14,13 @@ package org.apache.pekko.stream.impl import org.apache.pekko + +import org.reactivestreams.Subscription + import pekko.actor.DeadLetterSuppression import pekko.actor.NoSerializationVerificationNeeded import pekko.annotation.InternalApi -import org.reactivestreams.Subscription - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/BoundedSourceQueue.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/BoundedSourceQueue.scala index 00e27b54d90..fe63a2d3e90 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/BoundedSourceQueue.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/BoundedSourceQueue.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import org.apache.pekko + import pekko.annotation.InternalApi import pekko.dispatch.AbstractBoundedNodeQueue import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Buffers.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Buffers.scala index 8e377bd4bcc..04bdab3df85 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Buffers.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Buffers.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import java.{ util => ju } import org.apache.pekko + import pekko.annotation.{ InternalApi, InternalStableApi } import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/EmptySource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/EmptySource.scala index bf5bc2eed91..90e67bf7f5a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/EmptySource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/EmptySource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FailedConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FailedConcat.scala index 00efb5f40dc..521fd38d3cf 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FailedConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FailedConcat.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FailedSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FailedSource.scala index 78d68f690d9..13f79c78edd 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FailedSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FailedSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, Outlet, SourceShape } import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala index ea16196600c..4fc7b23b69d 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala @@ -16,14 +16,15 @@ package org.apache.pekko.stream.impl import scala.annotation.nowarn import org.apache.pekko + +import org.reactivestreams.{ Subscriber, Subscription } + import pekko.actor._ import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.stream.AbruptTerminationException import pekko.stream.ActorAttributes import pekko.stream.Attributes -import org.reactivestreams.{ Subscriber, Subscription } - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala index c8b2a12e481..1d141d55622 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala @@ -17,14 +17,15 @@ import scala.annotation.nowarn import scala.collection.immutable import org.apache.pekko + +import org.reactivestreams.Subscription + import pekko.actor._ import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.stream.AbruptTerminationException import pekko.stream.ActorAttributes import pekko.stream.Attributes -import org.reactivestreams.Subscription - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala index cce6a22e8f8..8b569eecab0 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala @@ -24,6 +24,9 @@ import scala.collection.immutable import scala.util.control.NoStackTrace import org.apache.pekko + +import org.reactivestreams.{ Publisher, Subscriber } + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.ActorAttributes.StreamSubscriptionTimeout @@ -38,8 +41,6 @@ import pekko.stream.stage.{ TimerGraphStageLogic } -import org.reactivestreams.{ Publisher, Subscriber } - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FutureConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FutureConcat.scala index 509fb1cf211..a1398d45fe0 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FutureConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FutureConcat.scala @@ -21,6 +21,7 @@ import scala.concurrent.{ ExecutionContext, Future } import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala index ddaeddc9337..3b68e7f9248 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.impl import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet, Supervision } import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/JavaFlowAndRsConverters.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/JavaFlowAndRsConverters.scala index 73b4fe21677..dbbdd92afb9 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/JavaFlowAndRsConverters.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/JavaFlowAndRsConverters.scala @@ -15,10 +15,11 @@ package org.apache.pekko.stream.impl import java.util.concurrent.Flow -import JavaFlowAndRsConverters.Implicits._ +import org.apache.pekko + import org.{ reactivestreams => rs } -import org.apache.pekko +import JavaFlowAndRsConverters.Implicits._ import pekko.annotation.InternalApi /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamConcat.scala index 03e3f46a3b1..7b76a48f202 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamConcat.scala @@ -21,6 +21,7 @@ import scala.jdk.CollectionConverters._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamSource.scala index 1fea035977a..35b676c9890 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamSource.scala @@ -17,6 +17,7 @@ import java.util.Spliterator import java.util.function.Consumer import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.impl.fusing.GraphStages.ValuePresentedSource diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala index f3431cb9096..9756168a69b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.annotation.switch import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.scaladsl.Framing.FramingException import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/LazySource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/LazySource.scala index 0f7ed2661b6..28904938f05 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/LazySource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/LazySource.scala @@ -17,6 +17,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.Attributes.SourceLocation diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/MaterializerGuardian.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/MaterializerGuardian.scala index c200bbf6510..bd802b48cb5 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/MaterializerGuardian.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/MaterializerGuardian.scala @@ -17,6 +17,7 @@ import scala.annotation.nowarn import scala.concurrent.Promise import org.apache.pekko + import pekko.actor.Actor import pekko.actor.Props import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/MaybeSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/MaybeSource.scala index dcd5676b29c..95d5a9a1e81 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/MaybeSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/MaybeSource.scala @@ -18,6 +18,7 @@ import scala.concurrent.Promise import scala.util.Try import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Messages.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Messages.scala index 51a9ac7046b..6e2b86d0251 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Messages.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Messages.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.actor.{ DeadLetterSuppression, NoSerializationVerificationNeeded } import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala index 0f9574a1013..d037e3dee7f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala @@ -16,14 +16,15 @@ package org.apache.pekko.stream.impl import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + +import org.reactivestreams._ + import pekko.NotUsed import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.event.Logging import pekko.stream._ import pekko.stream.impl.StreamLayout.AtomicModule -import org.reactivestreams._ - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala index 9445ae796bb..b546e803b6f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala @@ -22,6 +22,11 @@ import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import org.reactivestreams.Processor +import org.reactivestreams.Publisher +import org.reactivestreams.Subscriber + import pekko.NotUsed import pekko.actor.ActorContext import pekko.actor.ActorRef @@ -51,10 +56,6 @@ import pekko.stream.stage.InHandler import pekko.stream.stage.OutHandler import pekko.util.OptionVal -import org.reactivestreams.Processor -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala index 8872c212b3f..9b921625984 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.Done import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ReactiveStreamsCompliance.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ReactiveStreamsCompliance.scala index 0dc761c282a..2695222ad3b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ReactiveStreamsCompliance.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ReactiveStreamsCompliance.scala @@ -16,11 +16,12 @@ package org.apache.pekko.stream.impl import scala.util.control.NonFatal import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.stream.SubscriptionWithCancelException import org.reactivestreams.{ Subscriber, Subscription } +import pekko.annotation.InternalApi +import pekko.stream.SubscriptionWithCancelException + /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/RepeatConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/RepeatConcat.scala index 2ea912e0a1e..e6d885b4950 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/RepeatConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/RepeatConcat.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/ResizableMultiReaderRingBuffer.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/ResizableMultiReaderRingBuffer.scala index 1e5c684c78b..a9c5bb1f220 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/ResizableMultiReaderRingBuffer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/ResizableMultiReaderRingBuffer.scala @@ -16,10 +16,10 @@ package org.apache.pekko.stream.impl import scala.annotation.tailrec import scala.util.control.NoStackTrace -import ResizableMultiReaderRingBuffer.{ Cursor, Cursors, NothingToReadException } - import org.apache.pekko.annotation.InternalApi +import ResizableMultiReaderRingBuffer.{ Cursor, Cursors, NothingToReadException } + /** * INTERNAL API * A mutable RingBuffer that can grow in size and supports multiple readers. diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/RetryFlowCoordinator.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/RetryFlowCoordinator.scala index 54505a9a6fb..38b972c46ce 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/RetryFlowCoordinator.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/RetryFlowCoordinator.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.concurrent.duration._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.pattern.RetrySupport import pekko.stream.{ Attributes, BidiShape, Inlet, Outlet } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/SetupStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/SetupStage.scala index 966fd14d565..495e18478f6 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/SetupStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/SetupStage.scala @@ -18,6 +18,7 @@ import scala.concurrent.Promise import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.Attributes.SourceLocation diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/SingleConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/SingleConcat.scala index 7d900f47121..0d13bb3c1e7 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/SingleConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/SingleConcat.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.Attributes import pekko.stream.FlowShape diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/SinkholeSubscriber.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/SinkholeSubscriber.scala index 2e43555e3c6..0be5d1dc0ac 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/SinkholeSubscriber.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/SinkholeSubscriber.scala @@ -16,11 +16,12 @@ package org.apache.pekko.stream.impl import scala.concurrent.Promise import org.apache.pekko -import pekko.Done -import pekko.annotation.InternalApi import org.reactivestreams.{ Subscriber, Subscription } +import pekko.Done +import pekko.annotation.InternalApi + /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala index b05574af60e..21b30d7e8f6 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala @@ -26,6 +26,10 @@ import scala.util.Try import scala.util.control.NonFatal import org.apache.pekko + +import org.reactivestreams.Publisher +import org.reactivestreams.Subscriber + import pekko.NotUsed import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi @@ -42,9 +46,6 @@ import pekko.stream.scaladsl.{ Keep, Sink, SinkQueueWithCancel, Source } import pekko.stream.stage._ import pekko.util.OptionVal -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Stages.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Stages.scala index 78584949e4d..3efe07a9cc7 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Stages.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Stages.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.Attributes._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala index c59f15e9c74..0972734f3c7 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala @@ -19,16 +19,17 @@ import scala.annotation.tailrec import scala.util.control.NonFatal import org.apache.pekko -import pekko.annotation.InternalApi -import pekko.stream._ -import pekko.stream.impl.Stages.DefaultAttributes -import pekko.util.OptionVal import org.reactivestreams.Processor import org.reactivestreams.Publisher import org.reactivestreams.Subscriber import org.reactivestreams.Subscription +import pekko.annotation.InternalApi +import pekko.stream._ +import pekko.stream.impl.Stages.DefaultAttributes +import pekko.util.OptionVal + /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/StreamSubscriptionTimeout.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/StreamSubscriptionTimeout.scala index bfd720ff055..5581a434148 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/StreamSubscriptionTimeout.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/StreamSubscriptionTimeout.scala @@ -18,13 +18,14 @@ import scala.concurrent.duration.FiniteDuration import scala.util.control.NoStackTrace import org.apache.pekko + +import org.reactivestreams._ + import pekko.actor._ import pekko.annotation.InternalApi import pekko.stream.StreamSubscriptionTimeoutSettings import pekko.stream.StreamSubscriptionTimeoutTerminationMode.{ CancelTermination, NoopTermination, WarnTermination } -import org.reactivestreams._ - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/SubFlowImpl.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/SubFlowImpl.scala index 978f1f6cf9d..77cdd279e23 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/SubFlowImpl.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/SubFlowImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl import org.apache.pekko + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Throttle.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Throttle.scala index 9b241d1377d..c351f1353aa 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Throttle.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Throttle.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.{ FiniteDuration, _ } import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala index f644a958e76..cbe7c700c1f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala @@ -18,6 +18,7 @@ import java.util.concurrent.TimeUnit import scala.concurrent.duration.{ Duration, FiniteDuration } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Transfer.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Transfer.scala index dc187a2f083..5e080c157f0 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Transfer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Transfer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor.Actor import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala index 658f668890a..c128aea1269 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala @@ -18,6 +18,7 @@ import scala.collection.immutable.Map.Map1 import scala.language.existentials import org.apache.pekko + import pekko.annotation.{ DoNotInherit, InternalApi } import pekko.stream._ import pekko.stream.impl.StreamLayout.AtomicModule diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/Unfold.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/Unfold.scala index 9bcd869b5cf..95dae63aa4c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/Unfold.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/Unfold.scala @@ -20,8 +20,9 @@ import scala.concurrent.Future import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi -import pekko.japi.{ function, Pair } +import pekko.japi.{ Pair, function } import pekko.stream._ import pekko.stream.Attributes.SourceLocation import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSource.scala index aa8f216f945..58f962e7912 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSource.scala @@ -17,6 +17,7 @@ import scala.annotation.tailrec import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSourceAsync.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSourceAsync.scala index fff8b10a583..f2da8c41dcf 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSourceAsync.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSourceAsync.scala @@ -13,12 +13,13 @@ package org.apache.pekko.stream.impl -import scala.concurrent.{ ExecutionContext, Future } import scala.concurrent.ExecutionContext.parasitic -import scala.util.{ Failure, Success, Try } +import scala.concurrent.{ ExecutionContext, Future } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.Done import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala index 81108073008..494e8460239 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala @@ -23,6 +23,11 @@ import scala.concurrent.Promise import scala.util.control.NonFatal import org.apache.pekko + +import org.reactivestreams.Publisher +import org.reactivestreams.Subscriber +import org.reactivestreams.Subscription + import pekko.Done import pekko.actor._ import pekko.annotation.InternalApi @@ -41,10 +46,6 @@ import pekko.stream.stage.InHandler import pekko.stream.stage.OutHandler import pekko.util.OptionVal -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber -import org.reactivestreams.Subscription - /** * INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/AggregateWithBoundary.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/AggregateWithBoundary.scala index 296ac9f548c..8ad1b94ede8 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/AggregateWithBoundary.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/AggregateWithBoundary.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.ActorAttributes.SupervisionStrategy import pekko.stream.Supervision diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ArraySource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ArraySource.scala index afbbbf2b3db..343edf3c674 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ArraySource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ArraySource.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, Outlet, SourceShape } import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala index 115791c2462..b3cffc13825 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala @@ -21,6 +21,7 @@ import scala.annotation.nowarn import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala index 91ff94fb569..aad9ed47944 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala @@ -21,6 +21,7 @@ import scala.annotation.nowarn import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet, Supervision } import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CountSink.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CountSink.scala index 6a665061d58..b840b0b3313 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CountSink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CountSink.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.impl.fusing import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ AbruptStageTerminationException, Attributes, Inlet, SinkShape } import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnCancel.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnCancel.scala index 9b528b9e03c..7c09d010236 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnCancel.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnCancel.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet, SubscriptionWithCancelException } import pekko.stream.Attributes.SourceLocation diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnFirst.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnFirst.scala index 5eebe576550..ade05517f7c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnFirst.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DoOnFirst.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.impl.fusing import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.ActorAttributes.SupervisionStrategy import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DropRepeated.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DropRepeated.scala index 222d55b3a51..6bb99bb594b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DropRepeated.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/DropRepeated.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.impl.fusing import scala.util.control.NonFatal import org.apache.pekko + import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet, Supervision } import pekko.stream.ActorAttributes.SupervisionStrategy import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlatMapPrefix.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlatMapPrefix.scala index 4cce4491e19..69961a67567 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlatMapPrefix.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlatMapPrefix.scala @@ -18,6 +18,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.Attributes.SourceLocation diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlattenConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlattenConcat.scala index 197f8801d08..818e7bf9330 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlattenConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlattenConcat.scala @@ -22,6 +22,7 @@ import scala.concurrent.Future import scala.util.{ Failure, Try } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Graph, Inlet, Outlet, SourceShape, SubscriptionWithCancelException } import pekko.stream.impl.{ Buffer => BufferImpl, FailedSource, JavaStreamSource, TraversalBuilder } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FutureFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FutureFlow.scala index 6cb4d2c5585..17ce0dde4b0 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FutureFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FutureFlow.scala @@ -13,12 +13,13 @@ package org.apache.pekko.stream.impl.fusing -import scala.concurrent.{ Future, Promise } import scala.concurrent.ExecutionContext -import scala.util.{ Failure, Success, Try } +import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ AbruptStageTerminationException, diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala index 10f06936c9a..0e272824885 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala @@ -19,6 +19,7 @@ import scala.concurrent.Promise import scala.util.control.NonFatal import org.apache.pekko + import pekko.Done import pekko.actor.ActorRef import pekko.annotation.{ InternalApi, InternalStableApi } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala index 2ac39c9c08d..0cf12b207cc 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala @@ -16,12 +16,13 @@ package org.apache.pekko.stream.impl.fusing import java.util.concurrent.atomic.{ AtomicBoolean, AtomicReference } import scala.annotation.unchecked.uncheckedVariance -import scala.concurrent.{ Future, Promise } import scala.concurrent.ExecutionContext import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ Future, Promise } import scala.util.Try import org.apache.pekko + import pekko.Done import pekko.actor.Cancellable import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GroupedAdjacentByWeighted.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GroupedAdjacentByWeighted.scala index 5bed5f5f2c4..f81a368dccb 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GroupedAdjacentByWeighted.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GroupedAdjacentByWeighted.scala @@ -21,6 +21,7 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.ActorAttributes.SupervisionStrategy import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/InflightSources.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/InflightSources.scala index 588f1de2cf2..a99712766ef 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/InflightSources.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/InflightSources.scala @@ -18,10 +18,11 @@ package org.apache.pekko.stream.impl.fusing import scala.collection.immutable -import scala.util.{ Success, Try } import scala.util.control.NonFatal +import scala.util.{ Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IterableSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IterableSource.scala index 31edf9eac7a..4009549f9ce 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IterableSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IterableSource.scala @@ -21,6 +21,7 @@ import scala.collection.immutable import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, Outlet, SourceShape, Supervision } import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IteratorSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IteratorSource.scala index 8877586c8c1..d44e7b2e885 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IteratorSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IteratorSource.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.impl.fusing import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, Outlet, SourceShape, Supervision } import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala index 360e6f0a409..4853c8d85f7 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala @@ -22,6 +22,7 @@ import scala.concurrent.Future import scala.util.Try import org.apache.pekko + import pekko.stream.Attributes import pekko.stream.Attributes.SourceLocation import pekko.stream.Outlet diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazySingleSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazySingleSource.scala index 26757b3b88e..c918641916b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazySingleSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazySingleSource.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.stream.Attributes import pekko.stream.Attributes.SourceLocation import pekko.stream.Outlet diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/MapConcat.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/MapConcat.scala index 3af67f9e376..cf69cb25701 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/MapConcat.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/MapConcat.scala @@ -21,6 +21,7 @@ import scala.util.control.Exception.Catcher import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet, Supervision } import pekko.stream.ActorAttributes.SupervisionStrategy diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala index ecf9bd4670b..561b5625637 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala @@ -21,11 +21,12 @@ import scala.collection.immutable import scala.collection.immutable.VectorBuilder import scala.concurrent.Future import scala.concurrent.duration.{ FiniteDuration, _ } -import scala.util.{ Failure, Success, Try } -import scala.util.control.{ NoStackTrace, NonFatal } import scala.util.control.Exception.Catcher +import scala.util.control.{ NoStackTrace, NonFatal } +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor.{ ActorRef, Terminated } import pekko.annotation.InternalApi import pekko.event._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/RangeSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/RangeSource.scala index e8078e38545..29be4ec3929 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/RangeSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/RangeSource.scala @@ -20,6 +20,7 @@ package org.apache.pekko.stream.impl.fusing import scala.collection.immutable import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, Outlet, SourceShape } import pekko.stream.impl.ReactiveStreamsCompliance diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/SourceSink.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/SourceSink.scala index 2a447293fa8..becaaf4e46c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/SourceSink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/SourceSink.scala @@ -19,6 +19,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko import org.apache.pekko.stream.impl.Stages.DefaultAttributes + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.stream.{ ActorAttributes, Attributes, Inlet, SinkShape, StreamSubscriptionTimeoutTerminationMode } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala index e750eca6158..1c983b4a3e4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala @@ -21,10 +21,11 @@ import scala.collection.immutable import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import scala.jdk.CollectionConverters._ -import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala index 1bcd953ec6f..a8c741b79e6 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.Attributes import pekko.stream.FlowShape diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala index 25c671d7643..0e382b2fa37 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.impl.fusing import org.apache.pekko + import pekko.annotation.InternalApi import pekko.japi.Pair import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/ByteStringParser.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/ByteStringParser.scala index bd818670260..e275904a8e8 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/ByteStringParser.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/ByteStringParser.scala @@ -17,6 +17,7 @@ import scala.annotation.tailrec import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream._ import pekko.stream.stage._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/FileOutputStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/FileOutputStage.scala index fd665b51a6d..9b3cb7a1b58 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/FileOutputStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/FileOutputStage.scala @@ -23,6 +23,7 @@ import scala.util.Success import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ AbruptStageTerminationException, diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/IOSources.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/IOSources.scala index 4a0cd6bdef1..fde13549e19 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/IOSources.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/IOSources.scala @@ -19,10 +19,11 @@ import java.nio.file.{ Files, NoSuchFileException, Path, StandardOpenOption } import scala.annotation.tailrec import scala.concurrent.{ Future, Promise } -import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.Done import pekko.stream.{ IOResult, _ } import pekko.stream.Attributes.InputBuffer diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSinkStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSinkStage.scala index be3d18e7849..4f14d84e356 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSinkStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSinkStage.scala @@ -14,13 +14,14 @@ package org.apache.pekko.stream.impl.io import java.io.{ IOException, InputStream } -import java.util.concurrent.{ BlockingQueue, LinkedBlockingDeque, TimeUnit } import java.util.concurrent.atomic.AtomicBoolean +import java.util.concurrent.{ BlockingQueue, LinkedBlockingDeque, TimeUnit } import scala.annotation.tailrec import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ AbruptStageTerminationException, Attributes, Inlet, SinkShape } import pekko.stream.Attributes.InputBuffer diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSource.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSource.scala index 5a483700adf..4dfd657e241 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSource.scala @@ -19,6 +19,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ AbruptStageTerminationException, diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamGraphStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamGraphStage.scala index d3d62df0b23..8eae9c83880 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamGraphStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamGraphStage.scala @@ -19,6 +19,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.control.NonFatal import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.{ Attributes, IOOperationIncompleteException, IOResult, Inlet, SinkShape } import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamSourceStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamSourceStage.scala index a4904761a5f..99c30782d93 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamSourceStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/OutputStreamSourceStage.scala @@ -21,6 +21,7 @@ import scala.concurrent.duration.FiniteDuration import scala.util.control.NonFatal import org.apache.pekko + import pekko.stream.{ Attributes, Outlet, SourceShape } import pekko.stream.Attributes.InputBuffer import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala index 9f220074d89..594d4619f56 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala @@ -14,16 +14,17 @@ package org.apache.pekko.stream.impl.io import java.nio.ByteBuffer -import javax.net.ssl._ import javax.net.ssl.SSLEngineResult.HandshakeStatus import javax.net.ssl.SSLEngineResult.HandshakeStatus._ import javax.net.ssl.SSLEngineResult.Status._ +import javax.net.ssl._ import scala.annotation.tailrec -import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala index caef6e4cd4c..ec5d6e4dbfe 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala @@ -19,11 +19,12 @@ import java.util.concurrent.atomic.{ AtomicBoolean, AtomicLong } import scala.annotation.nowarn import scala.collection.immutable -import scala.concurrent.{ Future, Promise } import scala.concurrent.ExecutionContext import scala.concurrent.duration.{ Duration, FiniteDuration } +import scala.concurrent.{ Future, Promise } import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.actor.{ ActorRef, Terminated } import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala index ab03f2e3cef..92803a58d3a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala @@ -18,17 +18,18 @@ package org.apache.pekko.stream.impl.io import java.nio.ByteBuffer -import javax.net.ssl._ import javax.net.ssl.SSLEngineResult.HandshakeStatus import javax.net.ssl.SSLEngineResult.HandshakeStatus._ import javax.net.ssl.SSLEngineResult.Status._ +import javax.net.ssl._ import scala.annotation.{ switch, tailrec } import scala.concurrent.duration.Duration -import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal +import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.io.{ BufferPool, Tcp } import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsModule.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsModule.scala index 4c9b1e1c9f4..b429d07492a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsModule.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsModule.scala @@ -18,6 +18,7 @@ import javax.net.ssl.{ SSLEngine, SSLSession } import scala.util.Try import org.apache.pekko + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/CompressionUtils.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/CompressionUtils.scala index d6150f48f38..7dc7937bd35 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/CompressionUtils.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/CompressionUtils.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.io.compression import org.apache.pekko + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.stream.Attributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/Compressor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/Compressor.scala index b109d4d0557..debf8231b78 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/Compressor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/Compressor.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.io.compression import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateCompressor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateCompressor.scala index 999f2e51a02..3ee5e171a99 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateCompressor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateCompressor.scala @@ -18,6 +18,7 @@ import java.util.zip.Deflater import scala.annotation.tailrec import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.{ ByteString, ByteStringBuilder } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressor.scala index d120eaf0c26..aaf3026119f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.io.compression import java.util.zip.Inflater import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.Attributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressorBase.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressorBase.scala index 922bdf7ba91..5e9867c118a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressorBase.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/DeflateDecompressorBase.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.io.compression import java.util.zip.Inflater import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.impl.io.ByteStringParser import pekko.stream.impl.io.ByteStringParser.{ ParseResult, ParseStep } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipCompressor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipCompressor.scala index e9545ea509d..3f54ac1fc8f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipCompressor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipCompressor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.io.compression import java.util.zip.{ CRC32, Deflater } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipDecompressor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipDecompressor.scala index b3983fc598b..04f23cc4691 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipDecompressor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/GzipDecompressor.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.io.compression import java.util.zip.{ CRC32, Inflater, ZipException } import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.Attributes import pekko.stream.impl.io.ByteStringParser diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SinkRefImpl.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SinkRefImpl.scala index 2be9ac1b28e..46e45abfac4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SinkRefImpl.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SinkRefImpl.scala @@ -19,6 +19,7 @@ import scala.annotation.nowarn import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.Done import pekko.NotUsed import pekko.actor.{ ActorRef, Terminated } diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SourceRefImpl.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SourceRefImpl.scala index 284ec19a289..befef6d99f0 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SourceRefImpl.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SourceRefImpl.scala @@ -18,6 +18,7 @@ import java.util.concurrent.atomic.AtomicBoolean import scala.annotation.nowarn import org.apache.pekko + import pekko.NotUsed import pekko.actor.{ ActorRef, Terminated } import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefDefaultSettings.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefDefaultSettings.scala index d16ab302907..c331cd8dcbf 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefDefaultSettings.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefDefaultSettings.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.impl.streamref import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.annotation.InternalApi /** INTERNAL API */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefResolverImpl.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefResolverImpl.scala index 2ee07812f39..43052014be2 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefResolverImpl.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefResolverImpl.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.streamref import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.stream.SinkRef diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsMaster.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsMaster.scala index 0bd307f85e2..e5a9cfeedc4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsMaster.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsMaster.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.streamref import org.apache.pekko + import pekko.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import pekko.actor.ClassicActorSystemProvider import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsProtocol.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsProtocol.scala index 50a4ce0a567..aff6c4d484b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsProtocol.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsProtocol.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.impl.streamref import org.apache.pekko + import pekko.actor.{ ActorRef, DeadLetterSuppression } import pekko.annotation.InternalApi import pekko.stream.impl.ReactiveStreamsCompliance diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/BidiFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/BidiFlow.scala index b7e0c9b2dd5..98d87e8b68c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/BidiFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/BidiFlow.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.japi.function import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Compression.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Compression.scala index f143528da06..bebcf0aedc6 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Compression.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Compression.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.scaladsl import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/DelayStrategy.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/DelayStrategy.scala index 9f4addc0a84..1406ff56fb9 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/DelayStrategy.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/DelayStrategy.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.annotation.InternalApi import pekko.stream.scaladsl diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/FileIO.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/FileIO.scala index 0deca90a7c1..e80541404b9 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/FileIO.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/FileIO.scala @@ -20,7 +20,8 @@ import java.util.concurrent.CompletionStage import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.stream.{ javadsl, scaladsl, IOResult } + +import pekko.stream.{ IOResult, javadsl, scaladsl } import pekko.stream.scaladsl.SinkToCompletionStage import pekko.stream.scaladsl.SourceToCompletionStage import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala index 2f5d6bc70bb..17a101e9d87 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala @@ -28,9 +28,12 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import scala.util.control.NonFatal +import org.apache.pekko + +import org.reactivestreams.Processor + import org.jspecify.annotations.Nullable -import org.apache.pekko import pekko.Done import pekko.NotUsed import pekko.actor.ActorRef @@ -45,8 +48,6 @@ import pekko.stream.impl.fusing.{ StatefulMapConcat, ZipWithIndexJava } import pekko.util.ConstantFun import pekko.util.Timeout -import org.reactivestreams.Processor - object Flow { /** Create a `Flow` which can process elements of type `T`. */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala index 68c6699fe3d..25bbcac9e79 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala @@ -24,14 +24,15 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import org.jspecify.annotations.Nullable + import pekko.annotation.ApiMayChange import pekko.event.{ LogMarker, LoggingAdapter, MarkerLoggingAdapter } -import pekko.japi.{ function, Pair } +import pekko.japi.{ Pair, function } import pekko.stream._ import pekko.util.ConstantFun -import org.jspecify.annotations.Nullable - object FlowWithContext { def create[In, Ctx](): FlowWithContext[In, Ctx, In, Ctx, pekko.NotUsed] = diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Framing.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Framing.scala index 6de4eeb2f31..453b3768d28 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Framing.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Framing.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.javadsl import java.nio.ByteOrder import org.apache.pekko + import pekko.NotUsed import pekko.stream.scaladsl import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Graph.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Graph.scala index f897bde130f..2ee7b222dd9 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Graph.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Graph.scala @@ -21,8 +21,9 @@ import scala.annotation.unchecked.uncheckedVariance import scala.jdk.CollectionConverters._ import org.apache.pekko + import pekko.NotUsed -import pekko.japi.{ function, Pair } +import pekko.japi.{ Pair, function } import pekko.stream._ import pekko.stream.scaladsl.GenericGraph import pekko.util.ConstantFun diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Hub.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Hub.scala index c6595b1f270..6a89968835e 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Hub.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Hub.scala @@ -18,6 +18,7 @@ import java.util.function.ToLongBiFunction import scala.annotation.nowarn import org.apache.pekko + import pekko.NotUsed import pekko.annotation.DoNotInherit import pekko.japi.function diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/JsonFraming.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/JsonFraming.scala index 04f01a66e8b..cc04fc6b267 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/JsonFraming.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/JsonFraming.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Keep.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Keep.scala index 9681028c0ee..9d0e12f593c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Keep.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Keep.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.japi.Pair import pekko.japi.function diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/MergeLatest.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/MergeLatest.scala index a896cbf11d2..02dde8ca283 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/MergeLatest.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/MergeLatest.scala @@ -16,7 +16,8 @@ package org.apache.pekko.stream.javadsl import scala.jdk.CollectionConverters._ import org.apache.pekko -import pekko.stream.{ scaladsl, UniformFanInShape } + +import pekko.stream.{ UniformFanInShape, scaladsl } import pekko.stream.stage.GraphStage /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Queue.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Queue.scala index 43ae19a8af3..0738f7fc81d 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Queue.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Queue.scala @@ -22,6 +22,7 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.Done import pekko.stream.QueueOfferResult diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartFlow.scala index d47a7893231..34fb3738a68 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartFlow.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.japi.function.Creator import pekko.stream.RestartSettings diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSink.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSink.scala index c0d665b4b07..18cdcc316fd 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSink.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.japi.function.Creator import pekko.stream.RestartSettings diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSource.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSource.scala index dfcfef50f23..f286754a7bc 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RestartSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.javadsl import org.apache.pekko + import pekko.NotUsed import pekko.japi.function.Creator import pekko.stream.RestartSettings diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RetryFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RetryFlow.scala index f45a2129b61..e34b44a3cba 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/RetryFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/RetryFlow.scala @@ -19,6 +19,7 @@ import scala.jdk.DurationConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.japi.Pair import pekko.stream.scaladsl diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala index fbf1becfbde..1186540f814 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala @@ -24,9 +24,12 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import scala.util.Try +import org.apache.pekko + +import org.reactivestreams.{ Publisher, Subscriber } + import org.jspecify.annotations.Nullable -import org.apache.pekko import pekko._ import pekko.actor.{ ActorRef, ClassicActorSystemProvider, Status } import pekko.japi.function @@ -36,8 +39,6 @@ import pekko.stream.impl.LinearTraversalBuilder import pekko.stream.scaladsl.SinkToCompletionStage import pekko.util.ConstantFun.scalaAnyToUnit -import org.reactivestreams.{ Publisher, Subscriber } - /** Java API */ object Sink { diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala index 1b10205833e..03a334bcb03 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala @@ -17,11 +17,11 @@ import java.util import java.util.Optional import java.util.concurrent.{ CompletableFuture, CompletionStage } -import scala.annotation.{ nowarn, varargs } import scala.annotation.unchecked.uncheckedVariance +import scala.annotation.{ nowarn, varargs } import scala.collection.immutable -import scala.concurrent.Promise import scala.concurrent.ExecutionContext +import scala.concurrent.Promise import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import scala.jdk.FutureConverters._ @@ -30,10 +30,15 @@ import scala.reflect.ClassTag import scala.util.control.NonFatal import org.apache.pekko + +import org.reactivestreams.{ Publisher, Subscriber } + +import org.jspecify.annotations.Nullable + import pekko.{ Done, NotUsed } import pekko.actor.{ ActorRef, Cancellable, ClassicActorSystemProvider } import pekko.event.{ LogMarker, LoggingAdapter, MarkerLoggingAdapter } -import pekko.japi.{ function, JavaPartialFunction, Pair } +import pekko.japi.{ JavaPartialFunction, Pair, function } import pekko.japi.function.Creator import pekko.stream._ import pekko.stream.impl.{ LinearTraversalBuilder, UnfoldAsyncJava, UnfoldJava } @@ -41,9 +46,6 @@ import pekko.stream.impl.Stages.DefaultAttributes import pekko.stream.impl.fusing.{ RangeSource, StatefulMapConcat, ZipWithIndexJava } import pekko.util._ -import org.jspecify.annotations.Nullable -import org.reactivestreams.{ Publisher, Subscriber } - /** Java API */ object Source { private[this] val _empty = new Source[Any, NotUsed](scaladsl.Source.empty) diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala index e46bff7ae0c..d47ec1ba76e 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala @@ -24,6 +24,9 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import org.apache.pekko + +import org.jspecify.annotations.Nullable + import pekko.actor.ClassicActorSystemProvider import pekko.annotation.ApiMayChange import pekko.event.{ LogMarker, LoggingAdapter, MarkerLoggingAdapter } @@ -32,8 +35,6 @@ import pekko.japi.function import pekko.stream._ import pekko.util.ConstantFun -import org.jspecify.annotations.Nullable - object SourceWithContext { /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/StatefulMapConcatAccumulator.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/StatefulMapConcatAccumulator.scala index 52d7b17f036..7248a61714e 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/StatefulMapConcatAccumulator.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/StatefulMapConcatAccumulator.scala @@ -22,6 +22,7 @@ import java.util.Collections import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.japi.function /** diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/StreamConverters.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/StreamConverters.scala index 967fc24db5c..ab2cc1fc730 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/StreamConverters.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/StreamConverters.scala @@ -20,6 +20,7 @@ import java.util.stream.Collector import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.NotUsed import pekko.japi.function import pekko.stream.{ javadsl, scaladsl } diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala index f06f63d10cb..65f3e429819 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala @@ -13,8 +13,8 @@ package org.apache.pekko.stream.javadsl -import java.util.{ Comparator, Optional } import java.util.concurrent.CompletionStage +import java.util.{ Comparator, Optional } import scala.annotation.unchecked.uncheckedVariance import scala.annotation.varargs @@ -26,12 +26,13 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import scala.util.control.NonFatal +import org.apache.pekko + import org.jspecify.annotations.Nullable -import org.apache.pekko import pekko.NotUsed import pekko.event.{ LogMarker, LoggingAdapter, MarkerLoggingAdapter } -import pekko.japi.{ function, Pair } +import pekko.japi.{ Pair, function } import pekko.stream._ import pekko.stream.impl.Stages.DefaultAttributes import pekko.stream.impl.fusing.{ StatefulMapConcat, ZipWithIndexJava } diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala index da703a4562d..c0132ab4737 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala @@ -13,8 +13,8 @@ package org.apache.pekko.stream.javadsl -import java.util.{ Comparator, Optional } import java.util.concurrent.CompletionStage +import java.util.{ Comparator, Optional } import scala.annotation.unchecked.uncheckedVariance import scala.annotation.varargs @@ -26,12 +26,13 @@ import scala.jdk.OptionConverters._ import scala.reflect.ClassTag import scala.util.control.NonFatal +import org.apache.pekko + import org.jspecify.annotations.Nullable -import org.apache.pekko import pekko.NotUsed import pekko.event.{ LogMarker, LoggingAdapter, MarkerLoggingAdapter } -import pekko.japi.{ function, Pair } +import pekko.japi.{ Pair, function } import pekko.stream._ import pekko.stream.impl.Stages.DefaultAttributes import pekko.stream.impl.fusing.{ StatefulMapConcat, ZipWithIndexJava } diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/TLS.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/TLS.scala index 30747abdbe5..e27c8c81fcd 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/TLS.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/TLS.scala @@ -18,6 +18,7 @@ import javax.net.ssl.{ SSLEngine, SSLSession } import scala.util.Try import org.apache.pekko + import pekko.NotUsed import pekko.japi.function import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala index 70c47793bb5..e9983a65f9b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala @@ -28,6 +28,7 @@ import scala.util.Failure import scala.util.Success import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.actor.ActorSystem import pekko.actor.ClassicActorSystemProvider diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala index 508b8a25cae..a0c8096486f 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration.FiniteDuration import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ BidiShape, _ } import pekko.stream.impl.{ LinearTraversalBuilder, Timers, TraversalBuilder } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Compression.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Compression.scala index 967ff09a877..2cd221c2065 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Compression.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Compression.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import java.util.zip.Deflater import org.apache.pekko + import pekko.NotUsed import pekko.stream.impl.io.compression._ import pekko.util.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlow.scala index aa21da6b9d5..570af30909b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/CoupledTerminationFlow.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream._ import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FileIO.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FileIO.scala index ac314fbf7ed..c6f1a9f9f8c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FileIO.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FileIO.scala @@ -13,12 +13,13 @@ package org.apache.pekko.stream.scaladsl -import java.nio.file.{ OpenOption, Path } import java.nio.file.StandardOpenOption._ +import java.nio.file.{ OpenOption, Path } import scala.concurrent.Future import org.apache.pekko + import pekko.stream.IOResult import pekko.stream.impl.Stages.DefaultAttributes import pekko.stream.impl.io._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala index a6a89a9d059..c33deb7bfdf 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala @@ -22,6 +22,12 @@ import scala.reflect.ClassTag import scala.util.control.NonFatal import org.apache.pekko + +import org.reactivestreams.Processor +import org.reactivestreams.Publisher +import org.reactivestreams.Subscriber +import org.reactivestreams.Subscription + import pekko.Done import pekko.NotUsed import pekko.actor.ActorRef @@ -57,11 +63,6 @@ import pekko.util.ConstantFun import pekko.util.OptionVal import pekko.util.Timeout -import org.reactivestreams.Processor -import org.reactivestreams.Publisher -import org.reactivestreams.Subscriber -import org.reactivestreams.Subscription - /** * A `Flow` is a set of stream processing steps that has one open input and one open output. */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala index 40cf9ce25fb..5e768bac3d5 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.japi.Pair diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala index 9c7ad02806a..8cd37910573 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala @@ -21,6 +21,7 @@ import scala.concurrent.duration.FiniteDuration import scala.reflect.ClassTag import org.apache.pekko + import pekko.NotUsed import pekko.annotation.ApiMayChange import pekko.event.{ LogMarker, LoggingAdapter, MarkerLoggingAdapter } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala index 61d966e3ee6..c7afabf9e1a 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala @@ -19,6 +19,7 @@ import scala.annotation.tailrec import scala.reflect.ClassTag import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ Attributes, FlowShape, Inlet, Outlet } import pekko.stream.impl.Stages.DefaultAttributes diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala index 5135f156513..acb2b198de8 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala @@ -22,6 +22,7 @@ import scala.concurrent.Promise import scala.util.control.{ NoStackTrace, NonFatal } import org.apache.pekko + import pekko.NotUsed import pekko.annotation.InternalApi import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala index 32e647841f7..52fa8f1eda2 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala @@ -15,9 +15,9 @@ package org.apache.pekko.stream.scaladsl import java.util import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.atomic.{ AtomicLong, AtomicReference } import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.atomic.AtomicReferenceArray +import java.util.concurrent.atomic.{ AtomicLong, AtomicReference } import scala.annotation.tailrec import scala.collection.immutable @@ -27,6 +27,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success, Try } import org.apache.pekko + import pekko.NotUsed import pekko.annotation.DoNotInherit import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JavaFlowSupport.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JavaFlowSupport.scala index a8cb7148da6..65247c16e62 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JavaFlowSupport.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JavaFlowSupport.scala @@ -18,6 +18,7 @@ import java.util.{ concurrent => juc } import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.NotUsed import pekko.stream.impl.JavaFlowAndRsConverters import pekko.stream.scaladsl diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JsonFraming.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JsonFraming.scala index 7f57d54425d..3a6773978a5 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JsonFraming.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/JsonFraming.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.util.control.NonFatal import org.apache.pekko + import pekko.NotUsed import pekko.stream.Attributes import pekko.stream.impl.JsonObjectParser diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/MergeLatest.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/MergeLatest.scala index 93ec3597f8d..2da6049b9da 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/MergeLatest.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/MergeLatest.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.collection.immutable import org.apache.pekko + import pekko.stream.{ Attributes, Inlet, Outlet, UniformFanInShape } import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Queue.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Queue.scala index 9382d11ab55..6f5530a3dfc 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Queue.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Queue.scala @@ -22,6 +22,7 @@ import scala.jdk.FutureConverters._ import scala.jdk.OptionConverters._ import org.apache.pekko + import pekko.Done import pekko.annotation.InternalApi import pekko.stream.QueueOfferResult diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartFlow.scala index fa229be69b8..f232dd48bfd 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartFlow.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration._ import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.NotUsed import pekko.event.Logging import pekko.pattern.RetrySupport diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSink.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSink.scala index 2f87c533f20..6a330b88bb7 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSink.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ Attributes, Inlet, RestartSettings, SinkShape } import pekko.stream.stage.{ GraphStage, GraphStageLogic } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSource.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSource.scala index 31138018dd4..547b0673f98 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartSource.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ Attributes, Outlet, RestartSettings, SourceShape } import pekko.stream.stage.{ GraphStage, GraphStageLogic } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RetryFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RetryFlow.scala index b0817f92fe4..d121b598d7d 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RetryFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/RetryFlow.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.concurrent.duration._ import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.stream.impl.RetryFlowCoordinator diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala index 7828e4b503f..77d3e0fd6f8 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala @@ -21,7 +21,10 @@ import scala.concurrent.Future import scala.util.{ Failure, Success, Try } import org.apache.pekko -import pekko.{ util, Done, NotUsed } + +import org.reactivestreams.{ Publisher, Subscriber } + +import pekko.{ Done, NotUsed, util } import pekko.actor.ActorRef import pekko.annotation.InternalApi import pekko.stream._ @@ -30,8 +33,6 @@ import pekko.stream.impl.Stages.DefaultAttributes import pekko.stream.impl.fusing.{ CountSink, GraphStages, SourceSink } import pekko.stream.stage._ -import org.reactivestreams.{ Publisher, Subscriber } - /** * A `Sink` is a set of stream processing steps that has one open input. * Can be used as a `Subscriber` diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala index e4b5fc9bbe2..7a93cac446b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala @@ -15,15 +15,18 @@ package org.apache.pekko.stream.scaladsl import java.util.concurrent.CompletionStage -import scala.annotation.{ switch, tailrec, varargs } import scala.annotation.unchecked.uncheckedVariance -import scala.collection.{ immutable, AbstractIterator } -import scala.concurrent.{ Future, Promise } +import scala.annotation.{ switch, tailrec, varargs } +import scala.collection.{ AbstractIterator, immutable } import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ Future, Promise } import scala.jdk.FutureConverters._ import scala.util.control.NonFatal import org.apache.pekko + +import org.reactivestreams.{ Publisher, Subscriber } + import pekko.{ Done, NotUsed } import pekko.actor.{ ActorRef, Cancellable } import pekko.annotation.InternalApi @@ -43,8 +46,6 @@ import pekko.stream.impl.fusing.GraphStages._ import pekko.stream.stage.GraphStageWithMaterializedValue import pekko.util.ConstantFun -import org.reactivestreams.{ Publisher, Subscriber } - /** * A `Source` is a set of stream processing steps that has one open output. It can comprise * any number of internal sources and transformations that are wired together, or it can be diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SourceWithContext.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SourceWithContext.scala index e97b2066968..c5492c5e6a7 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SourceWithContext.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SourceWithContext.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.annotation.ApiMayChange import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala index 7ca4c230740..b8816a13538 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala @@ -18,6 +18,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.japi.function import pekko.stream.{ javadsl, scaladsl } diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamConverters.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamConverters.scala index d010f59b46a..3a128e59911 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamConverters.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamConverters.scala @@ -17,11 +17,12 @@ import java.io.{ InputStream, OutputStream } import java.util.Spliterators import java.util.stream.{ Collector, StreamSupport } -import scala.concurrent.{ Await, Future } -import scala.concurrent.duration._ import scala.concurrent.duration.Duration._ +import scala.concurrent.duration._ +import scala.concurrent.{ Await, Future } import org.apache.pekko + import pekko.NotUsed import pekko.stream.{ Attributes, IOResult, SinkShape } import pekko.stream.impl._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamRefs.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamRefs.scala index d90dc983c33..74fb0f374b6 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamRefs.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamRefs.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.scaladsl import org.apache.pekko + import pekko.stream.{ SinkRef, SourceRef } import pekko.stream.impl.streamref.{ SinkRefStageImpl, SourceRefStageImpl } import pekko.util.OptionVal diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SubFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SubFlow.scala index ab2bc07f075..033b3a0cdff 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SubFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/SubFlow.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.scaladsl import scala.annotation.unchecked.uncheckedVariance import org.apache.pekko + import pekko.annotation.DoNotInherit import pekko.stream._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/TLS.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/TLS.scala index ce15dc94c08..9049fc17423 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/TLS.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/TLS.scala @@ -18,14 +18,15 @@ import javax.net.ssl.{ SSLContext, SSLEngine, SSLSession } import scala.util.{ Success, Try } import org.apache.pekko + +import com.typesafe.config.{ ConfigException, ConfigFactory } + import pekko.NotUsed import pekko.stream._ import pekko.stream.TLSProtocol._ import pekko.stream.impl.io.{ TlsGraphStage, TlsModule } import pekko.util.ByteString -import com.typesafe.config.{ ConfigException, ConfigFactory } - /** * Stream cipher support based upon JSSE. * diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Tcp.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Tcp.scala index f0ea8dc996e..968a966cee4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Tcp.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Tcp.scala @@ -29,6 +29,7 @@ import scala.util.Try import scala.util.control.NoStackTrace import org.apache.pekko + import pekko.Done import pekko.NotUsed import pekko.actor._ diff --git a/stream/src/main/scala/org/apache/pekko/stream/serialization/StreamRefSerializer.scala b/stream/src/main/scala/org/apache/pekko/stream/serialization/StreamRefSerializer.scala index 5badc9b2a5e..3f884c4e774 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/serialization/StreamRefSerializer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/serialization/StreamRefSerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.stream.serialization import java.nio.charset.StandardCharsets import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.annotation.InternalApi import pekko.protobufv3.internal.ByteString diff --git a/stream/src/main/scala/org/apache/pekko/stream/snapshot/MaterializerState.scala b/stream/src/main/scala/org/apache/pekko/stream/snapshot/MaterializerState.scala index e22bf920201..e5d9078e053 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/snapshot/MaterializerState.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/snapshot/MaterializerState.scala @@ -14,10 +14,11 @@ package org.apache.pekko.stream.snapshot import scala.collection.immutable -import scala.concurrent.{ ExecutionContext, Future } import scala.concurrent.duration._ +import scala.concurrent.{ ExecutionContext, Future } import org.apache.pekko + import pekko.actor.{ ActorPath, ActorRef } import pekko.actor.ActorSystem import pekko.annotation.{ ApiMayChange, DoNotInherit, InternalApi } diff --git a/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala b/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala index bae071f83a9..78a46c3592b 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala @@ -15,16 +15,17 @@ package org.apache.pekko.stream.stage import java.lang.invoke.{ MethodHandles, VarHandle } import java.util.Spliterator -import java.util.concurrent.{ CompletionStage, ConcurrentHashMap } import java.util.concurrent.atomic.AtomicReference +import java.util.concurrent.{ CompletionStage, ConcurrentHashMap } import scala.annotation.nowarn import scala.annotation.tailrec import scala.collection.{ immutable, mutable } -import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ Await, Future, Promise } import org.apache.pekko + import pekko.{ Done, NotUsed } import pekko.actor._ import pekko.annotation.InternalApi diff --git a/stream/src/main/scala/org/apache/pekko/stream/stage/StageLogging.scala b/stream/src/main/scala/org/apache/pekko/stream/stage/StageLogging.scala index ff68a4cc871..8b908912ec5 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/stage/StageLogging.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/stage/StageLogging.scala @@ -14,6 +14,7 @@ package org.apache.pekko.stream.stage import org.apache.pekko + import pekko.event.LoggingAdapter import pekko.event.NoLogging import pekko.stream.MaterializerLoggingProvider diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/CallingThreadDispatcher.scala b/testkit/src/main/scala/org/apache/pekko/testkit/CallingThreadDispatcher.scala index 49be17a601e..32d8308b452 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/CallingThreadDispatcher.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/CallingThreadDispatcher.scala @@ -18,11 +18,14 @@ import java.util.concurrent.TimeUnit import java.util.concurrent.locks.ReentrantLock import scala.annotation.tailrec -import scala.concurrent.duration._ import scala.concurrent.duration.Duration +import scala.concurrent.duration._ import scala.util.control.NonFatal import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ ActorCell, ActorInitializationException, @@ -46,8 +49,6 @@ import pekko.dispatch.{ import pekko.dispatch.sysmsg.{ Resume, Suspend, SystemMessage } import pekko.util.Switch -import com.typesafe.config.Config - /* * Locking rules: * diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/ExplicitlyTriggeredScheduler.scala b/testkit/src/main/scala/org/apache/pekko/testkit/ExplicitlyTriggeredScheduler.scala index 50693aae0f5..af92de2bdd6 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/ExplicitlyTriggeredScheduler.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/ExplicitlyTriggeredScheduler.scala @@ -25,12 +25,13 @@ import scala.jdk.CollectionConverters._ import scala.util.Try import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.Cancellable import pekko.actor.Scheduler import pekko.event.LoggingAdapter -import com.typesafe.config.Config - /** * For testing: scheduler that does not look at the clock, but must be * progressed manually by calling `timePasses`. diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestActorRef.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestActorRef.scala index 9fa56ee363f..d70169cec30 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestActorRef.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestActorRef.scala @@ -20,6 +20,7 @@ import scala.concurrent.Await import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor._ import pekko.dispatch._ import pekko.pattern.ask diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala index 39419075117..daf02a08d10 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala @@ -21,6 +21,7 @@ import scala.reflect.ClassTag import scala.util.matching.Regex import org.apache.pekko + import pekko.actor.{ ActorSystem, DeadLetter, UnhandledMessage } import pekko.actor.Dropped import pekko.actor.NoSerializationVerificationNeeded diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestFSMRef.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestFSMRef.scala index 50b5af67bec..cbe0d74b538 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestFSMRef.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestFSMRef.scala @@ -17,6 +17,7 @@ import scala.concurrent.duration.FiniteDuration import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor._ /** diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestJavaSerializer.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestJavaSerializer.scala index 77fed41cb04..fcb7204016f 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestJavaSerializer.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestJavaSerializer.scala @@ -16,6 +16,7 @@ package org.apache.pekko.testkit import java.io.{ ByteArrayOutputStream, ObjectOutputStream } import org.apache.pekko + import pekko.actor.ExtendedActorSystem import pekko.io.UnsynchronizedByteArrayInputStream import pekko.serialization.{ BaseSerializer, JavaSerializer } diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala index 02d712ad715..27cbd21fead 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala @@ -13,8 +13,8 @@ package org.apache.pekko.testkit -import java.util.concurrent._ import java.util.concurrent.TimeUnit +import java.util.concurrent._ import java.util.concurrent.atomic.AtomicInteger import scala.annotation.nowarn @@ -26,6 +26,7 @@ import scala.reflect.ClassTag import scala.util.control.NonFatal import org.apache.pekko + import pekko.actor._ import pekko.actor.DeadLetter import pekko.actor.IllegalActorStateException diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestKitExtension.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestKitExtension.scala index 95dec7e8775..e04f8b43add 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestKitExtension.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestKitExtension.scala @@ -16,12 +16,13 @@ package org.apache.pekko.testkit import scala.concurrent.duration.FiniteDuration import org.apache.pekko + +import com.typesafe.config.Config + import pekko.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId } import pekko.actor.ClassicActorSystemProvider import pekko.util.Timeout -import com.typesafe.config.Config - object TestKitExtension extends ExtensionId[TestKitSettings] { override def get(system: ActorSystem): TestKitSettings = super.get(system) override def get(system: ClassicActorSystemProvider): TestKitSettings = super.get(system) diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/TestLatch.scala b/testkit/src/main/scala/org/apache/pekko/testkit/TestLatch.scala index 02d30642b0b..9638f757cd1 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/TestLatch.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/TestLatch.scala @@ -15,9 +15,9 @@ package org.apache.pekko.testkit import java.util.concurrent.{ CountDownLatch, TimeUnit, TimeoutException } -import scala.concurrent.{ Awaitable, CanAwait } import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration +import scala.concurrent.{ Awaitable, CanAwait } import org.apache.pekko.actor.ActorSystem diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/EventFilter.scala b/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/EventFilter.scala index 98797c6ba39..e9e88f57a91 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/EventFilter.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/EventFilter.scala @@ -16,6 +16,7 @@ package org.apache.pekko.testkit.javadsl import java.util.function.Supplier import org.apache.pekko + import pekko.actor.ActorSystem import pekko.event.Logging import pekko.testkit.{ DebugFilter, ErrorFilter, InfoFilter, WarningFilter } diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/TestKit.scala b/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/TestKit.scala index fd05fd9f132..e9c9cb4a6ae 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/TestKit.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/javadsl/TestKit.scala @@ -13,8 +13,8 @@ package org.apache.pekko.testkit.javadsl -import java.util.{ List => JList } import java.util.function.{ Function => JFunction, Supplier } +import java.util.{ List => JList } import scala.annotation.varargs import scala.concurrent.duration._ @@ -22,6 +22,7 @@ import scala.jdk.CollectionConverters._ import scala.jdk.DurationConverters._ import org.apache.pekko + import pekko.actor._ import pekko.annotation.InternalApi import pekko.testkit.{ TestActor, TestDuration, TestProbe } diff --git a/testkit/src/main/scala/org/apache/pekko/testkit/package.scala b/testkit/src/main/scala/org/apache/pekko/testkit/package.scala index c2c724f58b2..7e47bbbb852 100644 --- a/testkit/src/main/scala/org/apache/pekko/testkit/package.scala +++ b/testkit/src/main/scala/org/apache/pekko/testkit/package.scala @@ -20,6 +20,7 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.reflect.ClassTag import org.apache.pekko + import pekko.actor.ActorSystem package object testkit { diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/Coroner.scala b/testkit/src/test/scala/org/apache/pekko/testkit/Coroner.scala index 2b3c1d50e27..498a900d5d9 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/Coroner.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/Coroner.scala @@ -18,8 +18,8 @@ import java.lang.management.{ ManagementFactory, ThreadInfo } import java.util.Date import java.util.concurrent.{ CountDownLatch, TimeoutException } -import scala.concurrent.{ Await, Awaitable, CanAwait, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Awaitable, CanAwait, Promise } import scala.util.control.NonFatal /** diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpec.scala b/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpec.scala index 49332b9e86d..340a0fb9b73 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpec.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpec.scala @@ -18,15 +18,7 @@ import java.nio.file.{ Path, Paths } import scala.concurrent.Future import scala.concurrent.duration._ -import org.scalactic.CanEqual -import org.scalactic.TypeCheckedTripleEquals - import org.apache.pekko -import pekko.actor.ActorSystem -import pekko.dispatch.Dispatchers -import pekko.event.Logging -import pekko.event.LoggingAdapter -import pekko.testkit.TestEvent._ import org.scalatest.BeforeAndAfterAll import org.scalatest.concurrent.ScalaFutures @@ -38,6 +30,15 @@ import org.scalatest.wordspec.AnyWordSpecLike import com.typesafe.config.Config import com.typesafe.config.ConfigFactory +import org.scalactic.CanEqual +import org.scalactic.TypeCheckedTripleEquals + +import pekko.actor.ActorSystem +import pekko.dispatch.Dispatchers +import pekko.event.Logging +import pekko.event.LoggingAdapter +import pekko.testkit.TestEvent._ + object PekkoSpec { val testConf: Config = ConfigFactory.parseString(""" pekko { diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpecSpec.scala b/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpecSpec.scala index c833e4fc27c..70f90dd4075 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpecSpec.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/PekkoSpecSpec.scala @@ -18,16 +18,17 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.apache.pekko -import pekko.actor._ -import pekko.actor.DeadLetter -import pekko.pattern.ask -import pekko.util.Timeout import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import com.typesafe.config.ConfigFactory +import pekko.actor._ +import pekko.actor.DeadLetter +import pekko.pattern.ask +import pekko.util.Timeout + @nowarn class PekkoSpecSpec extends AnyWordSpec with Matchers { diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/TestActorRefSpec.scala b/testkit/src/test/scala/org/apache/pekko/testkit/TestActorRefSpec.scala index d4481894231..2b1213cbf43 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/TestActorRefSpec.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/TestActorRefSpec.scala @@ -13,17 +13,18 @@ package org.apache.pekko.testkit -import scala.concurrent.{ Await, Promise } import scala.concurrent.duration._ +import scala.concurrent.{ Await, Promise } import org.apache.pekko + +import org.scalatest.BeforeAndAfterEach + import pekko.actor._ import pekko.dispatch.Dispatcher import pekko.event.Logging.Warning import pekko.pattern.ask -import org.scalatest.BeforeAndAfterEach - /** * Test whether TestActorRef behaves as an ActorRef should, besides its own spec. */ diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/TestEventListenerSpec.scala b/testkit/src/test/scala/org/apache/pekko/testkit/TestEventListenerSpec.scala index 726bfaa0f5f..c9ce1c5aee5 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/TestEventListenerSpec.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/TestEventListenerSpec.scala @@ -14,6 +14,7 @@ package org.apache.pekko.testkit import org.apache.pekko + import pekko.event.Logging import pekko.event.Logging.Error import pekko.event.Logging.Warning diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/TestProbeSpec.scala b/testkit/src/test/scala/org/apache/pekko/testkit/TestProbeSpec.scala index 0ce191cc702..3da6f2d0e6b 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/TestProbeSpec.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/TestProbeSpec.scala @@ -20,11 +20,12 @@ import scala.concurrent.duration._ import scala.util.Try import org.apache.pekko -import pekko.actor._ -import pekko.pattern.ask import org.scalatest.concurrent.Eventually +import pekko.actor._ +import pekko.pattern.ask + class TestProbeSpec extends PekkoSpec with DefaultTimeout with Eventually { "A TestProbe" must { diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/WithLogCapturing.scala b/testkit/src/test/scala/org/apache/pekko/testkit/WithLogCapturing.scala index acfd6df21d6..bb020d09341 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/WithLogCapturing.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/WithLogCapturing.scala @@ -16,12 +16,13 @@ package org.apache.pekko.testkit import java.io.{ OutputStream, PrintStream } import org.apache.pekko + +import org.scalatest.{ Outcome, SuiteMixin, TestSuite } + import pekko.actor.ActorSystem import pekko.event.Logging import pekko.event.Logging._ -import org.scalatest.{ Outcome, SuiteMixin, TestSuite } - /** * Mixin this trait to a test to make log lines appear only when the test failed. */ diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSet.scala b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSet.scala index 271b44281ff..a3739c55a34 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSet.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSet.scala @@ -19,11 +19,11 @@ import java.util import scala.jdk.CollectionConverters._ -import com.codahale.metrics.{ Gauge, Metric, MetricSet } +import com.sun.management.UnixOperatingSystemMXBean + import com.codahale.metrics.MetricRegistry._ import com.codahale.metrics.jvm.FileDescriptorRatioGauge - -import com.sun.management.UnixOperatingSystemMXBean +import com.codahale.metrics.{ Gauge, Metric, MetricSet } /** * MetricSet exposing number of open and maximum file descriptors used by the JVM process. diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSetSpec.scala b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSetSpec.scala index 308016240f4..aadc58fa3cf 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSetSpec.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/FileDescriptorMetricSetSpec.scala @@ -19,11 +19,13 @@ package org.apache.pekko.testkit.metrics import java.lang.management.ManagementFactory -import com.codahale.metrics.Gauge import com.sun.management.UnixOperatingSystemMXBean + import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec +import com.codahale.metrics.Gauge + class FileDescriptorMetricSetSpec extends AnyWordSpec with Matchers { "FileDescriptorMetricSet" must { diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKit.scala b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKit.scala index a02d5e05f18..c674494f197 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKit.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKit.scala @@ -21,15 +21,16 @@ import scala.concurrent.duration._ import scala.reflect.ClassTag import scala.util.matching.Regex -import com.codahale.metrics._ - import org.apache.pekko -import pekko.testkit.metrics.reporter.PekkoConsoleReporter import org.scalatest.Notifying import com.typesafe.config.Config +import com.codahale.metrics._ + +import pekko.testkit.metrics.reporter.PekkoConsoleReporter + /** * Allows to easily measure performance / memory / file descriptor use in tests. * diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKitOps.scala b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKitOps.scala index f18a1f3fed5..7e18a74620d 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKitOps.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricsKitOps.scala @@ -15,12 +15,12 @@ package org.apache.pekko.testkit.metrics import java.util +import org.scalatest.Notifying + import com.codahale.metrics._ import com.codahale.metrics.jvm import com.codahale.metrics.jvm.MemoryUsageGaugeSet -import org.scalatest.Notifying - /** * User Land operations provided by the [[MetricsKit]]. * diff --git a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/reporter/PekkoConsoleReporter.scala b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/reporter/PekkoConsoleReporter.scala index 850939ab0a1..cc2bdd9c437 100644 --- a/testkit/src/test/scala/org/apache/pekko/testkit/metrics/reporter/PekkoConsoleReporter.scala +++ b/testkit/src/test/scala/org/apache/pekko/testkit/metrics/reporter/PekkoConsoleReporter.scala @@ -17,9 +17,10 @@ import java.io.PrintStream import java.util import java.util.concurrent.TimeUnit +import org.apache.pekko + import com.codahale.metrics._ -import org.apache.pekko import pekko.testkit.metrics._ /**