Skip to content

Commit

Permalink
improve UpdateTTLs test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jan 5, 2018
1 parent ce1f3b3 commit 2f06fea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions p2p/host/peerstore/addr_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,16 @@ func TestUpdateTTLs(t *testing.T) {
ma22 := MA(t, "/ip4/1.2.3.1/tcp/1122")

m := AddrManager{}

// Shouldn't panic.
m.UpdateAddrs(id1, time.Hour, time.Minute)

m.SetAddr(id1, ma11, time.Hour)
m.SetAddr(id1, ma12, time.Minute)

// Shouldn't panic.
m.UpdateAddrs(id2, time.Hour, time.Minute)

m.SetAddr(id2, ma21, time.Hour)
m.SetAddr(id2, ma22, time.Minute)

Expand Down

0 comments on commit 2f06fea

Please sign in to comment.