Skip to content

Commit

Permalink
clientv3/integration: match grpc.ErrClientConnClosing in TestKVNewAft…
Browse files Browse the repository at this point in the history
…erClose

Signed-off-by: Gyu-Ho Lee <[email protected]>
  • Loading branch information
gyuho committed Nov 10, 2017
1 parent 3b7f95b commit 1623478
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clientv3/integration/kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,9 @@ func TestKVNewAfterClose(t *testing.T) {

donec := make(chan struct{})
go func() {
if _, err := cli.Get(context.TODO(), "foo"); err != context.Canceled {
t.Fatalf("expected %v, got %v", context.Canceled, err)
_, err := cli.Get(context.TODO(), "foo")
if err != context.Canceled && err != grpc.ErrClientConnClosing {
t.Fatalf("expected %v or %v, got %v", context.Canceled, grpc.ErrClientConnClosing, err)
}
close(donec)
}()
Expand Down

0 comments on commit 1623478

Please sign in to comment.