From dcebdf7958d1b6b4499dac3e960c2e70e8b38b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=9C=84=E9=9C=84?= <1141195807@qq.com> Date: Sun, 16 Oct 2022 19:05:20 +0800 Subject: [PATCH] Backport #14591 to 3.4. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王霄霄 1141195807@qq.com Signed-off-by: 王霄霄 <1141195807@qq.com> --- clientv3/integration/watch_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index b4086b8d1..9fae7897c 100644 --- a/clientv3/integration/watch_test.go +++ b/clientv3/integration/watch_test.go @@ -338,6 +338,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) }