Skip to content

Commit

Permalink
Merge pull request #8763 from gyuho/temp
Browse files Browse the repository at this point in the history
clientv3/integration: Get with context timeout
  • Loading branch information
gyuho committed Oct 26, 2017
2 parents 995d79a + 8fa3521 commit 20f2914
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clientv3/integration/server_shutdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ func TestBalancerUnderServerShutdownWatch(t *testing.T) {
defer watchCli.Close()

// wait for eps[lead] to be pinned
watchCli.Get(context.Background(), "foo")
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
_, err = watchCli.Get(ctx, "foo")
cancel()
if err != nil {
t.Fatal(err)
}

// add all eps to list, so that when the original pined one fails
// the client can switch to other available eps
Expand Down

0 comments on commit 20f2914

Please sign in to comment.