* The real issue that should be fixed is that there seems to be a race between the CS and the ClusterSingleton observing OldestChanged and terminating coordinator singleton before the graceful sharding stop is done
This commit is contained in:
parent
f6b01f43f1
commit
d2fd897926
1 changed files with 8 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ import akka.testkit.TestProbe
|
||||||
object CoordinatedShutdownShardingSpec {
|
object CoordinatedShutdownShardingSpec {
|
||||||
val config =
|
val config =
|
||||||
"""
|
"""
|
||||||
akka.loglevel = INFO
|
akka.loglevel = DEBUG
|
||||||
akka.actor.provider = "cluster"
|
akka.actor.provider = "cluster"
|
||||||
akka.remote.netty.tcp.port = 0
|
akka.remote.netty.tcp.port = 0
|
||||||
akka.remote.artery.canonical.port = 0
|
akka.remote.artery.canonical.port = 0
|
||||||
|
|
@ -81,10 +81,14 @@ class CoordinatedShutdownShardingSpec extends AkkaSpec(CoordinatedShutdownShardi
|
||||||
|
|
||||||
"Sharding and CoordinatedShutdown" must {
|
"Sharding and CoordinatedShutdown" must {
|
||||||
"init cluster" in {
|
"init cluster" in {
|
||||||
Cluster(sys1).join(Cluster(sys1).selfAddress) // coordinator will initially run on sys2
|
// FIXME this test should also work when coordinator is on the leaving sys1 node,
|
||||||
awaitAssert(Cluster(sys1).selfMember.status should ===(MemberStatus.Up))
|
// but currently there seems to be a race between the CS and the ClusterSingleton observing OldestChanged
|
||||||
|
// and terminating coordinator singleton before the graceful sharding stop is done.
|
||||||
|
|
||||||
Cluster(sys2).join(Cluster(sys1).selfAddress)
|
Cluster(sys2).join(Cluster(sys2).selfAddress) // coordinator will initially run on sys2
|
||||||
|
awaitAssert(Cluster(sys2).selfMember.status should ===(MemberStatus.Up))
|
||||||
|
|
||||||
|
Cluster(sys1).join(Cluster(sys2).selfAddress)
|
||||||
within(10.seconds) {
|
within(10.seconds) {
|
||||||
awaitAssert {
|
awaitAssert {
|
||||||
Cluster(sys1).state.members.size should ===(2)
|
Cluster(sys1).state.members.size should ===(2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue