harden ReplicatorPruningSpec (#31215)
Check update has propagated before sending the next one Fixes #28491
This commit is contained in:
parent
ccb542734e
commit
8f72872478
1 changed files with 16 additions and 0 deletions
|
|
@ -230,10 +230,22 @@ class ReplicatorPruningSpec extends MultiNodeSpec(ReplicatorPruningSpec) with ST
|
||||||
retrieved.value should be(expectedValue)
|
retrieved.value should be(expectedValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
def checkValuePropagated(expectedValue: Int): Unit =
|
||||||
|
awaitAssert {
|
||||||
|
replicator ! Get(KeyA, ReadLocal)
|
||||||
|
expectMsgPF() {
|
||||||
|
case g @ GetSuccess(KeyA, _) =>
|
||||||
|
g.get(KeyA).value.toInt should be(expectedValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
runOn(first) {
|
runOn(first) {
|
||||||
updateAfterPruning(expectedValue = 10)
|
updateAfterPruning(expectedValue = 10)
|
||||||
}
|
}
|
||||||
|
runOn(second) {
|
||||||
|
checkValuePropagated(10)
|
||||||
|
}
|
||||||
|
|
||||||
enterBarrier("update-first-after-pruning")
|
enterBarrier("update-first-after-pruning")
|
||||||
|
|
||||||
runOn(second) {
|
runOn(second) {
|
||||||
|
|
@ -248,6 +260,10 @@ class ReplicatorPruningSpec extends MultiNodeSpec(ReplicatorPruningSpec) with ST
|
||||||
runOn(first) {
|
runOn(first) {
|
||||||
updateAfterPruning(expectedValue = 12)
|
updateAfterPruning(expectedValue = 12)
|
||||||
}
|
}
|
||||||
|
runOn(second) {
|
||||||
|
checkValuePropagated(12)
|
||||||
|
}
|
||||||
|
|
||||||
enterBarrier("update-first-after-dissemination")
|
enterBarrier("update-first-after-dissemination")
|
||||||
|
|
||||||
runOn(second) {
|
runOn(second) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue