Merge pull request #14593 from ZoeShaw101/fix-watch-test-panic-3.5

Backport #14591 to 3.5.
This commit is contained in:
Benjamin Wang
2022-10-16 19:33:26 +08:00
committed by GitHub

View File

@@ -340,6 +340,9 @@ func putAndWatch(t *testing.T, wctx *watchctx, key, val string) {
if !ok {
t.Fatalf("unexpected watch close")
}
if err := v.Err(); err != nil {
t.Fatalf("unexpected watch response error: %v", err)
}
if string(v.Events[0].Kv.Value) != val {
t.Fatalf("bad value got %v, wanted %v", v.Events[0].Kv.Value, val)
}