|
@@ -825,8 +825,11 @@ func TestLeaseWithRequireLeader(t *testing.T) {
|
|
|
// kaReqLeader may issue multiple requests while waiting for the first
|
|
// kaReqLeader may issue multiple requests while waiting for the first
|
|
|
// response from proxy server; drain any stray keepalive responses
|
|
// response from proxy server; drain any stray keepalive responses
|
|
|
time.Sleep(100 * time.Millisecond)
|
|
time.Sleep(100 * time.Millisecond)
|
|
|
- for len(kaReqLeader) > 0 {
|
|
|
|
|
|
|
+ for {
|
|
|
<-kaReqLeader
|
|
<-kaReqLeader
|
|
|
|
|
+ if len(kaReqLeader) == 0 {
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
select {
|
|
select {
|