hopefully fix intermittent time-dependent test failure.
@@ -154,25 +154,25 @@ func testUpdateTTLs(m pstore.AddrBook) func(t *testing.T) {
testHas(t, addrs2, m.Addrs(ids[1]))
// Will only affect addrs1[0].
- m.UpdateAddrs(ids[0], time.Hour, time.Second)
+ m.UpdateAddrs(ids[0], time.Hour, 100*time.Microsecond)
// No immediate effect.
testHas(t, addrs1, m.Addrs(ids[0]))
testHas(t, addrs2, m.Addrs(ids[1]))
// After a wait, addrs[0] is gone.
- time.Sleep(1200 * time.Millisecond)
+ time.Sleep(100 * time.Millisecond)
testHas(t, addrs1[1:2], m.Addrs(ids[0]))
testHas(t, addrs2, m.Addrs(ids[1]))
// Will only affect addrs2[0].
- m.UpdateAddrs(ids[1], time.Hour, time.Second)
+ m.UpdateAddrs(ids[1], time.Hour, 100*time.Microsecond)
// No immediate effect.
testHas(t, addrs1[1:2], m.Addrs(ids[0]))
testHas(t, addrs2, m.Addrs(ids[1]))
- time.Sleep(1200 * time.Millisecond)
+ time.Sleep(100 * time.Millisecond)
// First addrs is gone in both.
testHas(t, addrs1[1:], m.Addrs(ids[0]))
