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:
Christopher Batey 2019-07-04 10:03:27 +01:00 committed by Patrik Nordwall
parent 310b861d69
commit 139d9a3c0c
5 changed files with 8 additions and 8 deletions

View file

@ -7,8 +7,7 @@ package akka.actor.testkit.typed.javadsl
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect } import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.typed.{ ActorRef, Behavior, Signal } import akka.actor.typed.{ ActorRef, Behavior, Signal }
import akka.annotation.DoNotInherit import akka.annotation.{ ApiMayChange, DoNotInherit }
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
object BehaviorTestKit { object BehaviorTestKit {
@ -17,6 +16,7 @@ object BehaviorTestKit {
/** /**
* JAVA API * JAVA API
*/ */
@ApiMayChange
def create[T](initialBehavior: Behavior[T], name: String): BehaviorTestKit[T] = { def create[T](initialBehavior: Behavior[T], name: String): BehaviorTestKit[T] = {
val uid = ThreadLocalRandom.current().nextInt() val uid = ThreadLocalRandom.current().nextInt()
new BehaviorTestKitImpl((address / name).withUid(uid), initialBehavior) new BehaviorTestKitImpl((address / name).withUid(uid), initialBehavior)
@ -25,6 +25,7 @@ object BehaviorTestKit {
/** /**
* JAVA API * JAVA API
*/ */
@ApiMayChange
def create[T](initialBehavior: Behavior[T]): BehaviorTestKit[T] = def create[T](initialBehavior: Behavior[T]): BehaviorTestKit[T] =
create(initialBehavior, "testkit") create(initialBehavior, "testkit")
@ -39,6 +40,7 @@ object BehaviorTestKit {
* For asynchronous testing of `Behavior`s running see [[ActorTestKit]] * For asynchronous testing of `Behavior`s running see [[ActorTestKit]]
*/ */
@DoNotInherit @DoNotInherit
@ApiMayChange
abstract class BehaviorTestKit[T] { abstract class BehaviorTestKit[T] {
/** /**

View file

@ -12,7 +12,6 @@ import akka.actor.typed.ActorSystem
import akka.actor.typed.Behavior import akka.actor.typed.Behavior
import akka.actor.typed.Props import akka.actor.typed.Props
import akka.actor.typed.Scheduler import akka.actor.typed.Scheduler
import akka.annotation.ApiMayChange
import akka.annotation.InternalApi import akka.annotation.InternalApi
import akka.actor.testkit.typed.TestKitSettings import akka.actor.testkit.typed.TestKitSettings
import akka.actor.testkit.typed.internal.ActorTestKitGuardian import akka.actor.testkit.typed.internal.ActorTestKitGuardian
@ -108,7 +107,6 @@ object ActorTestKit {
* *
* For synchronous testing of a `Behavior` see [[BehaviorTestKit]] * For synchronous testing of a `Behavior` see [[BehaviorTestKit]]
*/ */
@ApiMayChange
final class ActorTestKit private[akka] (val name: String, val config: Config, settings: Option[TestKitSettings]) { final class ActorTestKit private[akka] (val name: String, val config: Config, settings: Option[TestKitSettings]) {
implicit def testKitSettings: TestKitSettings = implicit def testKitSettings: TestKitSettings =

View file

@ -7,13 +7,13 @@ package akka.actor.testkit.typed.scaladsl
import akka.actor.testkit.typed.internal.BehaviorTestKitImpl import akka.actor.testkit.typed.internal.BehaviorTestKitImpl
import akka.actor.testkit.typed.{ CapturedLogEvent, Effect } import akka.actor.testkit.typed.{ CapturedLogEvent, Effect }
import akka.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext } import akka.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext }
import akka.annotation.DoNotInherit import akka.annotation.{ ApiMayChange, DoNotInherit }
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
import scala.collection.immutable import scala.collection.immutable
import scala.reflect.ClassTag import scala.reflect.ClassTag
@ApiMayChange
object BehaviorTestKit { object BehaviorTestKit {
import akka.actor.testkit.typed.scaladsl.TestInbox.address import akka.actor.testkit.typed.scaladsl.TestInbox.address
@ -35,6 +35,7 @@ object BehaviorTestKit {
* Not for user extension. See `BehaviorTestKit.apply` factory methods * Not for user extension. See `BehaviorTestKit.apply` factory methods
*/ */
@DoNotInherit @DoNotInherit
@ApiMayChange
trait BehaviorTestKit[T] { trait BehaviorTestKit[T] {
// FIXME it is weird that this is public but it is used in BehaviorSpec, could we avoid that? // FIXME it is weird that this is public but it is used in BehaviorSpec, could we avoid that?

View file

@ -8,7 +8,6 @@ import akka.actor.{ Address, RootActorPath }
import akka.actor.typed.ActorRef import akka.actor.typed.ActorRef
import akka.annotation.{ ApiMayChange, DoNotInherit } import akka.annotation.{ ApiMayChange, DoNotInherit }
import akka.actor.testkit.typed.internal.TestInboxImpl import akka.actor.testkit.typed.internal.TestInboxImpl
import java.util.concurrent.ThreadLocalRandom import java.util.concurrent.ThreadLocalRandom
import scala.collection.immutable import scala.collection.immutable
@ -35,6 +34,7 @@ object TestInbox {
* Not for user extension * Not for user extension
*/ */
@DoNotInherit @DoNotInherit
@ApiMayChange
trait TestInbox[T] { trait TestInbox[T] {
/** /**

View file

@ -435,7 +435,6 @@ lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
.dependsOn(actorTyped, testkit % "compile->compile;test->test") .dependsOn(actorTyped, testkit % "compile->compile;test->test")
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed")) .settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
.settings(Dependencies.actorTestkitTyped) .settings(Dependencies.actorTestkitTyped)
.disablePlugins(MimaPlugin)
lazy val actorTypedTests = akkaModule("akka-actor-typed-tests") lazy val actorTypedTests = akkaModule("akka-actor-typed-tests")
.dependsOn(actorTyped, actorTestkitTyped % "compile->compile;test->test") .dependsOn(actorTyped, actorTestkitTyped % "compile->compile;test->test")