cherry picks ethermint

This commit is contained in:
Federico Kunze
2021-05-05 15:10:21 +02:00
parent 374d249116
commit 77be0bc022
6 changed files with 44 additions and 10 deletions
+5 -4
View File
@@ -26,10 +26,10 @@ func TestAddTopic(t *testing.T) {
func TestSubscribe(t *testing.T) {
q := NewEventBus()
kekSrc := make(<-chan coretypes.ResultEvent)
kekSrc := make(chan coretypes.ResultEvent)
q.AddTopic("kek", kekSrc)
lolSrc := make(<-chan coretypes.ResultEvent)
lolSrc := make(chan coretypes.ResultEvent)
q.AddTopic("lol", lolSrc)
kekSubC, err := q.Subscribe("kek")
@@ -69,8 +69,9 @@ func TestSubscribe(t *testing.T) {
defer wg.Done()
time.Sleep(time.Second)
<-kekSrc
<-lolSrc
close(kekSrc)
close(lolSrc)
}()
wg.Wait()