From 6d6df1da80d010968d5026adf3fa914eaafad523 Mon Sep 17 00:00:00 2001 From: bel Date: Sun, 5 Nov 2023 21:40:01 -0700 Subject: [PATCH] tdd is fun sometimes --- replicator/replicator_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/replicator/replicator_test.go b/replicator/replicator_test.go index 502298c..33b18b7 100644 --- a/replicator/replicator_test.go +++ b/replicator/replicator_test.go @@ -29,6 +29,17 @@ func TestReplicatorStream(t *testing.T) { } }, }, + "one during op moves": { + during: func(t *testing.T, r Replicator) { + r.Src.Set(nil, key, value, version) + time.Sleep(time.Millisecond * 200) + }, + after: func(t *testing.T, r Replicator) { + if got, _ := r.Dest.Get(nil, key); !got.Version.Equal(version) || !got.Value.Equal(value) { + t.Error(got) + } + }, + }, } for name, d := range cases {