From 284926486a8c1b6cce0d62f88177f70dd599bdb7 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 4 Aug 2021 12:25:48 +0200 Subject: [PATCH 1/3] Exclude failing tests only on GHA --- .github/workflows/scala3-build.yml | 2 +- .../src/test/scala/akka/event/EventStreamSpec.scala | 4 ++-- .../src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala | 3 ++- .../test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala | 3 ++- .../akka/cluster/sharding/ClusterShardingLeaseSpec.scala | 4 ++-- .../test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala | 2 +- .../src/test/scala/akka/stream/scaladsl/HubSpec.scala | 4 ++-- akka-testkit/src/test/scala/akka/testkit/TestTags.scala | 2 ++ 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/scala3-build.yml b/.github/workflows/scala3-build.yml index 48a85f9597..5c38ddd272 100644 --- a/.github/workflows/scala3-build.yml +++ b/.github/workflows/scala3-build.yml @@ -30,7 +30,7 @@ jobs: sbt -jvm-opts .jvmopts-ci \ -Dakka.build.scalaVersion=3.0 \ -Dakka.test.multi-in-test=false \ - -Dakka.test.tags.exclude=performance,timing,long-running \ + -Dakka.test.tags.exclude=performance,timing,long-running,gh-eclude \ akka-actor-tests/test \ akka-actor-testkit-typed/test \ akka-actor-typed/compile \ diff --git a/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala b/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala index 374eeb2089..6449d60e65 100644 --- a/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala @@ -10,7 +10,7 @@ import com.typesafe.config.ConfigFactory import language.postfixOps import akka.actor._ -import akka.testkit.{ AkkaSpec, TestProbe } +import akka.testkit.{ AkkaSpec, GHExcludeTest, TestProbe } object EventStreamSpec { @@ -315,7 +315,7 @@ class EventStreamSpec extends AkkaSpec(EventStreamSpec.config) { } } - "unsubscribe the actor, when it subscribes already in terminated state" in { + "unsubscribe the actor, when it subscribes already in terminated state" taggedAs GHExcludeTest in { val sys = ActorSystem("EventStreamSpecUnsubscribeTerminated", configUnhandledWithDebug) try { diff --git a/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala b/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala index f27b46396d..f04138df7e 100644 --- a/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala @@ -10,6 +10,7 @@ import scala.concurrent.duration._ import akka.actor.ActorRef import akka.testkit.AkkaSpec +import akka.testkit.GHExcludeTest import akka.testkit.ImplicitSender import akka.testkit.SocketUtil.temporaryServerAddresses import akka.testkit.TestProbe @@ -125,7 +126,7 @@ class UdpConnectedIntegrationSpec extends AkkaSpec(""" } // #26903 - "be able to send and receive when server goes away (and comes back)" in { + "be able to send and receive when server goes away (and comes back)" taggedAs GHExcludeTest in { val addresses = temporaryServerAddresses(2, udp = true) val serverAddress = addresses(0) val clientAddress = addresses(1) diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala index e82fe3475c..9e79858f34 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala @@ -8,6 +8,7 @@ import scala.concurrent.duration._ import org.scalatest.wordspec.AnyWordSpecLike +import akka.testkit.GHExcludeTest import akka.actor.testkit.typed.scaladsl.LogCapturing import akka.actor.testkit.typed.scaladsl.LoggingTestKit import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -17,7 +18,7 @@ class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike wit "A pub-sub topic running locally" must { - "publish to all local subscriber actors of a topic" in { + "publish to all local subscriber actors of a topic" taggedAs GHExcludeTest in { val fruitTopic = LoggingTestKit.debug("Topic list updated").withCheckExcess(false).expect { testKit.spawn(Topic[String]("fruit")) diff --git a/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala b/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala index f3d50a9ebf..3d7de49fc7 100644 --- a/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala +++ b/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala @@ -12,7 +12,7 @@ import akka.actor.Props import akka.cluster.{ Cluster, MemberStatus } import akka.coordination.lease.TestLease import akka.coordination.lease.TestLeaseExt -import akka.testkit.{ AkkaSpec, ImplicitSender, WithLogCapturing } +import akka.testkit.{ AkkaSpec, GHExcludeTest, ImplicitSender, WithLogCapturing } import akka.testkit.TestActors.EchoActor object ClusterShardingLeaseSpec { @@ -124,7 +124,7 @@ class ClusterShardingLeaseSpec(config: Config, rememberEntities: Boolean) testLease.setNextAcquireResult(Future.successful(true)) expectMsg(3) } - "recover if lease lost" in { + "recover if lease lost" taggedAs GHExcludeTest in { region ! 4 expectNoMessage(shortDuration) val testLease = leaseForShard(4) diff --git a/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala b/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala index 2d1516ecbc..7b19d9cc6b 100644 --- a/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala @@ -56,7 +56,7 @@ class RemoteDeathWatchSpec override def expectedTestDuration: FiniteDuration = 120.seconds - "receive Terminated when system of de-serialized ActorRef is not running" in { + "receive Terminated when system of de-serialized ActorRef is not running" taggedAs GHExcludeTest in { val probe = TestProbe() system.eventStream.subscribe(probe.ref, classOf[QuarantinedEvent]) val rarp = RARP(system).provider diff --git a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala index 3d0c290888..c0f5b4e628 100644 --- a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala +++ b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala @@ -17,7 +17,7 @@ import akka.stream.testkit.Utils.TE import akka.stream.testkit.scaladsl.StreamTestKit._ import akka.stream.testkit.scaladsl.TestSink import akka.stream.testkit.scaladsl.TestSource -import akka.testkit.EventFilter +import akka.testkit.{ EventFilter, GHExcludeTest } class HubSpec extends StreamSpec { @@ -199,7 +199,7 @@ class HubSpec extends StreamSpec { downstream.expectComplete() } - "immediately cancel new producers while draining" in assertAllStagesStopped { + "immediately cancel new producers while draining" taggedAs GHExcludeTest in assertAllStagesStopped { val downstream = TestSubscriber.probe[Int]() val (sink, draining) = MergeHub.sourceWithDraining[Int](16).take(20).toMat(Sink.fromSubscriber(downstream))(Keep.left).run() diff --git a/akka-testkit/src/test/scala/akka/testkit/TestTags.scala b/akka-testkit/src/test/scala/akka/testkit/TestTags.scala index 591a520aba..5fe665b94f 100644 --- a/akka-testkit/src/test/scala/akka/testkit/TestTags.scala +++ b/akka-testkit/src/test/scala/akka/testkit/TestTags.scala @@ -9,3 +9,5 @@ import org.scalatest.Tag object TimingTest extends Tag("timing") object LongRunningTest extends Tag("long-running") object PerformanceTest extends Tag("performance") + +object GHExcludeTest extends Tag("gh-exclude") From 7d842fefc3a5527d7a44e2253546bd0404f73b6a Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 4 Aug 2021 14:46:30 +0200 Subject: [PATCH 2/3] Add link to issues --- .../src/test/scala/akka/event/EventStreamSpec.scala | 1 + .../src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala | 1 + .../test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala | 1 + .../akka/cluster/sharding/ClusterShardingLeaseSpec.scala | 4 ++-- .../test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala | 2 +- .../src/test/scala/akka/stream/scaladsl/HubSpec.scala | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala b/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala index 6449d60e65..f60a3ac36e 100644 --- a/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/event/EventStreamSpec.scala @@ -315,6 +315,7 @@ class EventStreamSpec extends AkkaSpec(EventStreamSpec.config) { } } + // Excluded in GH Actions: https://github.com/akka/akka/issues/30460 "unsubscribe the actor, when it subscribes already in terminated state" taggedAs GHExcludeTest in { val sys = ActorSystem("EventStreamSpecUnsubscribeTerminated", configUnhandledWithDebug) diff --git a/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala b/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala index f04138df7e..a3e67a066e 100644 --- a/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/io/UdpConnectedIntegrationSpec.scala @@ -126,6 +126,7 @@ class UdpConnectedIntegrationSpec extends AkkaSpec(""" } // #26903 + // Excluded in GH Actions: https://github.com/akka/akka/issues/30462 "be able to send and receive when server goes away (and comes back)" taggedAs GHExcludeTest in { val addresses = temporaryServerAddresses(2, udp = true) val serverAddress = addresses(0) diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala index 9e79858f34..128e7b9a03 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala @@ -18,6 +18,7 @@ class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike wit "A pub-sub topic running locally" must { + // Excluded in GH Actions: https://github.com/akka/akka/issues/30466 "publish to all local subscriber actors of a topic" taggedAs GHExcludeTest in { val fruitTopic = LoggingTestKit.debug("Topic list updated").withCheckExcess(false).expect { diff --git a/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala b/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala index 3d7de49fc7..f3d50a9ebf 100644 --- a/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala +++ b/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/ClusterShardingLeaseSpec.scala @@ -12,7 +12,7 @@ import akka.actor.Props import akka.cluster.{ Cluster, MemberStatus } import akka.coordination.lease.TestLease import akka.coordination.lease.TestLeaseExt -import akka.testkit.{ AkkaSpec, GHExcludeTest, ImplicitSender, WithLogCapturing } +import akka.testkit.{ AkkaSpec, ImplicitSender, WithLogCapturing } import akka.testkit.TestActors.EchoActor object ClusterShardingLeaseSpec { @@ -124,7 +124,7 @@ class ClusterShardingLeaseSpec(config: Config, rememberEntities: Boolean) testLease.setNextAcquireResult(Future.successful(true)) expectMsg(3) } - "recover if lease lost" taggedAs GHExcludeTest in { + "recover if lease lost" in { region ! 4 expectNoMessage(shortDuration) val testLease = leaseForShard(4) diff --git a/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala b/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala index 7b19d9cc6b..2d1516ecbc 100644 --- a/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/artery/RemoteDeathWatchSpec.scala @@ -56,7 +56,7 @@ class RemoteDeathWatchSpec override def expectedTestDuration: FiniteDuration = 120.seconds - "receive Terminated when system of de-serialized ActorRef is not running" taggedAs GHExcludeTest in { + "receive Terminated when system of de-serialized ActorRef is not running" in { val probe = TestProbe() system.eventStream.subscribe(probe.ref, classOf[QuarantinedEvent]) val rarp = RARP(system).provider diff --git a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala index c0f5b4e628..844f7e8769 100644 --- a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala +++ b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/HubSpec.scala @@ -199,6 +199,7 @@ class HubSpec extends StreamSpec { downstream.expectComplete() } + // Excluded in GH Actions: https://github.com/akka/akka/issues/30464 "immediately cancel new producers while draining" taggedAs GHExcludeTest in assertAllStagesStopped { val downstream = TestSubscriber.probe[Int]() val (sink, draining) = From c7c18865d8c155f5db6023565bc4a81a04797afa Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 4 Aug 2021 14:47:31 +0200 Subject: [PATCH 3/3] typo --- .github/workflows/scala3-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scala3-build.yml b/.github/workflows/scala3-build.yml index 5c38ddd272..24d2f4f2c0 100644 --- a/.github/workflows/scala3-build.yml +++ b/.github/workflows/scala3-build.yml @@ -30,7 +30,7 @@ jobs: sbt -jvm-opts .jvmopts-ci \ -Dakka.build.scalaVersion=3.0 \ -Dakka.test.multi-in-test=false \ - -Dakka.test.tags.exclude=performance,timing,long-running,gh-eclude \ + -Dakka.test.tags.exclude=performance,timing,long-running,gh-exclude \ akka-actor-tests/test \ akka-actor-testkit-typed/test \ akka-actor-typed/compile \