mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-01-27 04:40:07 +08:00
test: make the "add" test less timing dependent
This commit is contained in:
parent
7afb11e00d
commit
59822c4eb1
@ -119,8 +119,8 @@ func testAddAddress(ab pstore.AddrBook) func(*testing.T) {
|
||||
|
||||
ab.AddAddrs(id, addrs, 4*time.Second)
|
||||
// 4 seconds left
|
||||
time.Sleep(3 * time.Second)
|
||||
// 1 second left
|
||||
time.Sleep(2 * time.Second)
|
||||
// 2 second left
|
||||
ab.AddAddrs(id, addrs, 3*time.Second)
|
||||
// 3 seconds left
|
||||
time.Sleep(1 * time.Second)
|
||||
|
Loading…
Reference in New Issue
Block a user