make test fail to demonstrate issue

This commit is contained in:
Yusef Napora
2020-05-19 14:38:25 -04:00
parent 0d6e02e95b
commit 3364dccbbf

View File

@@ -113,20 +113,14 @@ func TestSignedPeerRecordWithNoListenAddrs(t *testing.T) {
}
// sadly, we still don't have a signed peer record, since the addr change ticker hasn't ticked yet
// uncommenting this causes the test to pass:
// time.Sleep(5100 * time.Millisecond)
cab, ok := peerstore.GetCertifiedAddrBook(h.Peerstore())
if !ok {
t.Fatalf("peerstore doesn't support certified addrs")
}
rec := cab.GetPeerRecord(h.ID())
if rec != nil {
t.Fatalf("no signed peer record in peerstore for new host %s", h.ID())
}
// after sleeping we should have the record
time.Sleep(5100 * time.Millisecond)
// assert that the hosts' peerstore has a signed record for itself
rec = cab.GetPeerRecord(h.ID())
if rec == nil {
t.Fatalf("no signed peer record in peerstore for new host %s", h.ID())
}