summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-10-27 13:45:30 +0300
committerValery Piashchynski <[email protected]>2021-10-27 13:45:30 +0300
commita244937265a14e10c0217d42d2aa893d3ab1535c (patch)
tree076aafd8b3139e6e9c05e5885d1f14d0d57568fd
parent82ee0c5a87141f31e4e28089c1a269f70066284b (diff)
update tests
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r--events/events_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/events/events_test.go b/events/events_test.go
index 41944b48..afe64d12 100644
--- a/events/events_test.go
+++ b/events/events_test.go
@@ -2,6 +2,7 @@ package events
import (
"testing"
+ "time"
"github.com/stretchr/testify/require"
)
@@ -44,11 +45,13 @@ func TestEvenHandler2(t *testing.T) {
require.Equal(t, uint(2), l)
eh.Unsubscribe(id)
+ time.Sleep(time.Second)
l = eh.Len()
require.Equal(t, uint(1), l)
eh2.Unsubscribe(id2)
+ time.Sleep(time.Second)
l = eh.Len()
require.Equal(t, uint(0), l)