fix stats test race (#1560)

* fix stats test race
* and try fix TestMapAddressEnv race
This commit is contained in:
Menghan Li
2017-10-04 14:30:12 -07:00
committed by GitHub
parent 7103997bd8
commit cf79c84979
2 changed files with 26 additions and 23 deletions

View File

@ -1108,7 +1108,9 @@ func testClientStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs map
err: err,
}
h.mu.Lock()
checkConnStats(t, h.gotConn)
h.mu.Unlock()
checkClientStats(t, h.gotRPC, expect, checkFuncs)
}