mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-03-25 12:50:08 +08:00
remove flaky tests (#194)
This commit is contained in:
parent
286b97aee3
commit
525a0b1301
@ -113,23 +113,6 @@ func TestBandwidthCounter(t *testing.T) {
|
||||
|
||||
time.Sleep(time.Second)
|
||||
close(start)
|
||||
time.Sleep(2*time.Second + 100*time.Millisecond)
|
||||
|
||||
assertPeers(func(stats Stats) {
|
||||
assertApproxEq(t, 2000, stats.RateOut)
|
||||
assertApproxEq(t, 1000, stats.RateIn)
|
||||
})
|
||||
|
||||
assertProtocols(func(stats Stats) {
|
||||
assertApproxEq(t, 100000, stats.RateOut)
|
||||
assertApproxEq(t, 50000, stats.RateIn)
|
||||
})
|
||||
|
||||
{
|
||||
stats := bwc.GetBandwidthTotals()
|
||||
assertApproxEq(t, 200000, stats.RateOut)
|
||||
assertApproxEq(t, 100000, stats.RateIn)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
time.Sleep(1 * time.Second)
|
||||
|
Loading…
Reference in New Issue
Block a user