More generous timeout in typed ClusterApiSpec (#24797)
* More generous timeout * ActorTestKit.shutdown
This commit is contained in:
parent
e2ab5820a5
commit
9ac83812ae
1 changed files with 6 additions and 7 deletions
|
|
@ -30,6 +30,8 @@ object ClusterApiSpec {
|
|||
serialize-messages = off
|
||||
allow-java-serialization = off
|
||||
}
|
||||
# generous timeout for cluster forming probes
|
||||
akka.actor.typed.test.default-timeout = 10s
|
||||
""")
|
||||
}
|
||||
|
||||
|
|
@ -64,8 +66,7 @@ class ClusterApiSpec extends ActorTestKit with TypedAkkaSpecWithShutdown with Sc
|
|||
node1Probe.expectMessageType[MemberUp].member.uniqueAddress == clusterNode1.selfMember.uniqueAddress
|
||||
|
||||
// check that cached selfMember is updated
|
||||
node1Probe.awaitAssert(
|
||||
clusterNode1.selfMember.status should ===(MemberStatus.Up))
|
||||
node1Probe.awaitAssert(clusterNode1.selfMember.status should ===(MemberStatus.Up))
|
||||
|
||||
// subscribing to OnSelfUp when already up
|
||||
clusterNode1.subscriptions ! Subscribe(node1Probe.ref, classOf[SelfUp])
|
||||
|
|
@ -74,8 +75,7 @@ class ClusterApiSpec extends ActorTestKit with TypedAkkaSpecWithShutdown with Sc
|
|||
// selfMember update and on up subscription on node 2 when joining
|
||||
clusterNode2.subscriptions ! Subscribe(node2Probe.ref, classOf[SelfUp])
|
||||
clusterNode2.manager ! Join(clusterNode1.selfMember.address)
|
||||
node2Probe.awaitAssert(
|
||||
clusterNode2.selfMember.status should ===(MemberStatus.Up))
|
||||
node2Probe.awaitAssert(clusterNode2.selfMember.status should ===(MemberStatus.Up))
|
||||
node2Probe.expectMessageType[SelfUp]
|
||||
|
||||
// events about node2 joining to subscriber on node1
|
||||
|
|
@ -92,8 +92,7 @@ class ClusterApiSpec extends ActorTestKit with TypedAkkaSpecWithShutdown with Sc
|
|||
node1Probe.expectMessageType[MemberRemoved].member.uniqueAddress == clusterNode2.selfMember.uniqueAddress
|
||||
|
||||
// selfMember updated and self removed event gotten
|
||||
node2Probe.awaitAssert(
|
||||
clusterNode2.selfMember.status should ===(MemberStatus.Removed))
|
||||
node2Probe.awaitAssert(clusterNode2.selfMember.status should ===(MemberStatus.Removed))
|
||||
node2Probe.expectMessage(SelfRemoved(MemberStatus.Exiting))
|
||||
|
||||
// subscribing to SelfRemoved when already removed yields immediate message back
|
||||
|
|
@ -105,7 +104,7 @@ class ClusterApiSpec extends ActorTestKit with TypedAkkaSpecWithShutdown with Sc
|
|||
node2Probe.expectNoMessage()
|
||||
|
||||
} finally {
|
||||
Await.result(system2.terminate(), 3.seconds)
|
||||
ActorTestKit.shutdown(adaptedSystem2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue