ClusterDeathWatchSpec: assert cluster status bewtween tests (#25126)
Test failed due to node4 still seeing node3 in a subsequent test but assumed it had been removed. Fixes #25065
This commit is contained in:
parent
034f6c5c96
commit
485179c5f6
1 changed files with 10 additions and 5 deletions
|
|
@ -89,15 +89,16 @@ abstract class ClusterDeathWatchSpec
|
||||||
watchEstablished.await
|
watchEstablished.await
|
||||||
enterBarrier("watch-established")
|
enterBarrier("watch-established")
|
||||||
expectMsg(path2)
|
expectMsg(path2)
|
||||||
expectNoMsg(2 seconds)
|
expectNoMessage(2.seconds)
|
||||||
enterBarrier("second-terminated")
|
enterBarrier("second-terminated")
|
||||||
|
awaitAssert(clusterView.members.map(_.address) should not contain address(second))
|
||||||
|
|
||||||
markNodeAsUnavailable(third)
|
markNodeAsUnavailable(third)
|
||||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(third)))
|
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(third)))
|
||||||
cluster.down(third)
|
cluster.down(third)
|
||||||
// removed
|
// removed
|
||||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(third)))
|
awaitAssert(clusterView.members.map(_.address) should not contain address(third))
|
||||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (address(third)))
|
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain address(third))
|
||||||
expectMsg(path3)
|
expectMsg(path3)
|
||||||
enterBarrier("third-terminated")
|
enterBarrier("third-terminated")
|
||||||
|
|
||||||
|
|
@ -112,11 +113,15 @@ abstract class ClusterDeathWatchSpec
|
||||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(second)))
|
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(second)))
|
||||||
cluster.down(second)
|
cluster.down(second)
|
||||||
// removed
|
// removed
|
||||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(second)))
|
awaitAssert(clusterView.members.map(_.address) should not contain address(second))
|
||||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (address(second)))
|
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain address(second))
|
||||||
}
|
}
|
||||||
enterBarrier("second-terminated")
|
enterBarrier("second-terminated")
|
||||||
enterBarrier("third-terminated")
|
enterBarrier("third-terminated")
|
||||||
|
runOn(fourth) {
|
||||||
|
awaitAssert(clusterView.members.map(_.address) should not contain address(second))
|
||||||
|
awaitAssert(clusterView.members.map(_.address) should not contain address(third))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runOn(fifth) {
|
runOn(fifth) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue