Remove ApiMayChange from typed testkit (#27096)
* Remove ApiMayChange from typed testkit * Don't disable mima plugin to highlight times we break bin cmompat Refs #26897 * Add api may change to test inbox and behavior test kit
This commit is contained in:
parent
310b861d69
commit
139d9a3c0c
5 changed files with 8 additions and 8 deletions
|
|
@ -7,8 +7,7 @@ package akka.actor.testkit.typed.javadsl
|
|||
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
|
||||
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
|
||||
import akka.actor.typed.{ ActorRef, Behavior, Signal }
|
||||
import akka.annotation.DoNotInherit
|
||||
|
||||
import akka.annotation.{ ApiMayChange, DoNotInherit }
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
object BehaviorTestKit {
|
||||
|
|
@ -17,6 +16,7 @@ object BehaviorTestKit {
|
|||
/**
|
||||
* JAVA API
|
||||
*/
|
||||
@ApiMayChange
|
||||
def create[T](initialBehavior: Behavior[T], name: String): BehaviorTestKit[T] = {
|
||||
val uid = ThreadLocalRandom.current().nextInt()
|
||||
new BehaviorTestKitImpl((address / name).withUid(uid), initialBehavior)
|
||||
|
|
@ -25,6 +25,7 @@ object BehaviorTestKit {
|
|||
/**
|
||||
* JAVA API
|
||||
*/
|
||||
@ApiMayChange
|
||||
def create[T](initialBehavior: Behavior[T]): BehaviorTestKit[T] =
|
||||
create(initialBehavior, "testkit")
|
||||
|
||||
|
|
@ -39,6 +40,7 @@ object BehaviorTestKit {
|
|||
* For asynchronous testing of `Behavior`s running see [[ActorTestKit]]
|
||||
*/
|
||||
@DoNotInherit
|
||||
@ApiMayChange
|
||||
abstract class BehaviorTestKit[T] {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import akka.actor.typed.ActorSystem
|
|||
import akka.actor.typed.Behavior
|
||||
import akka.actor.typed.Props
|
||||
import akka.actor.typed.Scheduler
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.annotation.InternalApi
|
||||
import akka.actor.testkit.typed.TestKitSettings
|
||||
import akka.actor.testkit.typed.internal.ActorTestKitGuardian
|
||||
|
|
@ -108,7 +107,6 @@ object ActorTestKit {
|
|||
*
|
||||
* For synchronous testing of a `Behavior` see [[BehaviorTestKit]]
|
||||
*/
|
||||
@ApiMayChange
|
||||
final class ActorTestKit private[akka] (val name: String, val config: Config, settings: Option[TestKitSettings]) {
|
||||
|
||||
implicit def testKitSettings: TestKitSettings =
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ package akka.actor.testkit.typed.scaladsl
|
|||
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
|
||||
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
|
||||
import akka.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext }
|
||||
import akka.annotation.DoNotInherit
|
||||
|
||||
import akka.annotation.{ ApiMayChange, DoNotInherit }
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
import scala.collection.immutable
|
||||
import scala.reflect.ClassTag
|
||||
|
||||
@ApiMayChange
|
||||
object BehaviorTestKit {
|
||||
import akka.actor.testkit.typed.scaladsl.TestInbox.address
|
||||
|
||||
|
|
@ -35,6 +35,7 @@ object BehaviorTestKit {
|
|||
* Not for user extension. See `BehaviorTestKit.apply` factory methods
|
||||
*/
|
||||
@DoNotInherit
|
||||
@ApiMayChange
|
||||
trait BehaviorTestKit[T] {
|
||||
|
||||
// FIXME it is weird that this is public but it is used in BehaviorSpec, could we avoid that?
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import akka.actor.{ Address, RootActorPath }
|
|||
import akka.actor.typed.ActorRef
|
||||
import akka.annotation.{ ApiMayChange, DoNotInherit }
|
||||
import akka.actor.testkit.typed.internal.TestInboxImpl
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
import scala.collection.immutable
|
||||
|
|
@ -35,6 +34,7 @@ object TestInbox {
|
|||
* Not for user extension
|
||||
*/
|
||||
@DoNotInherit
|
||||
@ApiMayChange
|
||||
trait TestInbox[T] {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -435,7 +435,6 @@ lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
|
|||
.dependsOn(actorTyped, testkit % "compile->compile;test->test")
|
||||
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
|
||||
.settings(Dependencies.actorTestkitTyped)
|
||||
.disablePlugins(MimaPlugin)
|
||||
|
||||
lazy val actorTypedTests = akkaModule("akka-actor-typed-tests")
|
||||
.dependsOn(actorTyped, actorTestkitTyped % "compile->compile;test->test")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue