test, replication: serialize store attestation barriers with the peer learner

This commit is contained in:
pingqiu committed 2026-11-28 11:21:11 -08:00
1 parent f4fb1ac4f7
commit 69711830af
1 file changed
+9 -2
@@ -135,9 +135,16 @@ func TestWipedReplicaAtTheSameGenerationDoesNotCount(t *testing.T) {
t.Fatal(err)
}
peer := v.peers["r2"]
q, ok := v.peerQueueFor(peer)
if !ok {
t.Fatal("the installed peer has no work queue")
}
for i := 0; i < 2; i++ {
if _, err := peer.Barrier(context.Background(), 0); err != nil {
t.Fatal(err)
// UpdateReplicaSet starts a store learner on this same connection.
// Use its single-worker queue rather than racing a direct barrier
// against that learner's request and response frames.
if !v.learnThroughQueue(q) {
t.Fatal("the queued barrier did not learn the replica's store")
}
if got, _ := peer.AttestedStore(); got != s2.StoreID() {
t.Fatalf("barrier taught %x, want the wiped replica's new store %x", got, s2.StoreID())