event: add missing timer.Stop call in TestFeed (#20868)

This commit is contained in:
ucwong 2020-04-02 21:56:25 +08:00 committed by GitHub
parent 4d891f23b5
commit 0893ee6d51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ func TestFeed(t *testing.T) {
subchan := make(chan int)
sub := feed.Subscribe(subchan)
timeout := time.NewTimer(2 * time.Second)
defer timeout.Stop()
subscribed.Done()
select {