Fix flaky test MultipleClientStatsHandler (#5739)
This commit is contained in:
@ -1393,7 +1393,7 @@ func (s) TestMultipleClientStatsHandler(t *testing.T) {
|
|||||||
|
|
||||||
for start := time.Now(); time.Since(start) < defaultTestTimeout; {
|
for start := time.Now(); time.Since(start) < defaultTestTimeout; {
|
||||||
h.mu.Lock()
|
h.mu.Lock()
|
||||||
if _, ok := h.gotRPC[len(h.gotRPC)-1].s.(*stats.End); ok {
|
if _, ok := h.gotRPC[len(h.gotRPC)-1].s.(*stats.End); ok && len(h.gotRPC) == 12 {
|
||||||
h.mu.Unlock()
|
h.mu.Unlock()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -1403,7 +1403,7 @@ func (s) TestMultipleClientStatsHandler(t *testing.T) {
|
|||||||
|
|
||||||
for start := time.Now(); time.Since(start) < defaultTestTimeout; {
|
for start := time.Now(); time.Since(start) < defaultTestTimeout; {
|
||||||
h.mu.Lock()
|
h.mu.Lock()
|
||||||
if _, ok := h.gotConn[len(h.gotConn)-1].s.(*stats.ConnEnd); ok {
|
if _, ok := h.gotConn[len(h.gotConn)-1].s.(*stats.ConnEnd); ok && len(h.gotConn) == 4 {
|
||||||
h.mu.Unlock()
|
h.mu.Unlock()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user