Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
fix pubsub underterministic test (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-nguy authored Oct 13, 2021
1 parent 2e06759 commit 83c8916
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rpc/ethereum/pubsub/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package pubsub

import (
"log"
"sort"
"sync"
"testing"
"time"
Expand All @@ -21,7 +22,9 @@ func TestAddTopic(t *testing.T) {
err = q.AddTopic("lol", make(<-chan coretypes.ResultEvent))
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) {
Expand Down

0 comments on commit 83c8916

Please sign in to comment.