fix pubsub underterministic test (#666)
This commit is contained in:
parent
2e067590a2
commit
83c8916c46
@ -2,6 +2,7 @@ package pubsub
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -21,7 +22,9 @@ func TestAddTopic(t *testing.T) {
|
|||||||
err = q.AddTopic("lol", make(<-chan coretypes.ResultEvent))
|
err = q.AddTopic("lol", make(<-chan coretypes.ResultEvent))
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
|
|
||||||
require.EqualValues(t, []string{"kek", "lol"}, q.Topics())
|
topics := q.Topics()
|
||||||
|
sort.Strings(topics)
|
||||||
|
require.EqualValues(t, []string{"kek", "lol"}, topics)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSubscribe(t *testing.T) {
|
func TestSubscribe(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user