mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-30 22:51:19 +00:00
no timeout
This commit is contained in:
parent
ebe8625478
commit
cf67a8b1b7
@ -38,7 +38,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
@ -395,7 +394,7 @@ func (state *state) send(msg interface{}, tags map[string]string) {
|
||||
// don't block on buffered channels
|
||||
select {
|
||||
case subscription.out <- Message{msg, tags}:
|
||||
case <-time.After(100 * time.Millisecond):
|
||||
default:
|
||||
state.remove(clientID, qStr, ErrOutOfCapacity)
|
||||
}
|
||||
}
|
||||
|
@ -139,10 +139,11 @@ func TestEventBusPublish(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer eventBus.Stop()
|
||||
|
||||
sub, err := eventBus.Subscribe(context.Background(), "test", tmquery.Empty{})
|
||||
const numEventsExpected = 14
|
||||
|
||||
sub, err := eventBus.Subscribe(context.Background(), "test", tmquery.Empty{}, numEventsExpected)
|
||||
require.NoError(t, err)
|
||||
|
||||
const numEventsExpected = 14
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
numEvents := 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user