Refactor checkForStaleness to take time.Duration

This commit is contained in:
Cecylia Bocovich 2021-06-24 11:20:44 -04:00
parent e3351cb08a
commit 10b6075eaa
2 changed files with 6 additions and 6 deletions

View file

@ -269,8 +269,8 @@ func TestWebRTCPeer(t *testing.T) {
Convey("WebRTCPeer", t, func(c C) {
p := &WebRTCPeer{closed: make(chan struct{})}
Convey("checks for staleness", func() {
go p.checkForStaleness()
<-time.After(2 * SnowflakeTimeout)
go p.checkForStaleness(time.Second)
<-time.After(2 * time.Second)
So(p.Closed(), ShouldEqual, true)
})
})