mirror of https://github.com/status-im/go-waku.git
fix: constrainted env add wait to TestRelaySubscription
This commit is contained in:
parent
bf8c856bc3
commit
38741caca0
|
@ -21,7 +21,6 @@ func TestWakuRelay(t *testing.T) {
|
||||||
|
|
||||||
host, err := tests.MakeHost(context.Background(), port, rand.Reader)
|
host, err := tests.MakeHost(context.Background(), port, rand.Reader)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
relay := NewWakuRelay(nil, 0, timesource.NewDefaultClock(), utils.Logger())
|
relay := NewWakuRelay(nil, 0, timesource.NewDefaultClock(), utils.Logger())
|
||||||
relay.SetHost(host)
|
relay.SetHost(host)
|
||||||
err = relay.Start(context.Background())
|
err = relay.Start(context.Background())
|
||||||
|
|
|
@ -59,6 +59,9 @@ func TestRelaySubscription(t *testing.T) {
|
||||||
go d.Start(context.Background())
|
go d.Start(context.Background())
|
||||||
defer d.Stop()
|
defer d.Stop()
|
||||||
|
|
||||||
|
// Wait for node to start
|
||||||
|
time.Sleep(500 * time.Millisecond)
|
||||||
|
|
||||||
topics := []string{"test"}
|
topics := []string{"test"}
|
||||||
topicsJSONBytes, err := json.Marshal(topics)
|
topicsJSONBytes, err := json.Marshal(topics)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
|
@ -39,7 +39,6 @@ func makeFilterService(t *testing.T, isFullNode bool) *FilterService {
|
||||||
go func() {
|
go func() {
|
||||||
for range sub.Ch {
|
for range sub.Ch {
|
||||||
}
|
}
|
||||||
fmt.Println("stuck")
|
|
||||||
}()
|
}()
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue