diff options
Diffstat (limited to 'tests/plugins/broadcast/broadcast_plugin_test.go')
-rw-r--r-- | tests/plugins/broadcast/broadcast_plugin_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/plugins/broadcast/broadcast_plugin_test.go b/tests/plugins/broadcast/broadcast_plugin_test.go index d8bedf29..a78b17e1 100644 --- a/tests/plugins/broadcast/broadcast_plugin_test.go +++ b/tests/plugins/broadcast/broadcast_plugin_test.go @@ -205,8 +205,7 @@ func TestBroadcastSameSubscriber(t *testing.T) { cfg, &broadcast.Plugin{}, &rpcPlugin.Plugin{}, - &logger.ZapLogger{}, - // mockLogger, + mockLogger, &server.Plugin{}, &redis.Plugin{}, &websockets.Plugin{}, @@ -279,11 +278,11 @@ func TestBroadcastSameSubscriber(t *testing.T) { t.Run("PublishHelloFoo3", BroadcastPublishFoo3("6002")) t.Run("PublishAsyncHelloFooFoo2Foo3", BroadcastPublishAsyncFooFoo2Foo3("6002")) + time.Sleep(time.Second * 5) + stopCh <- struct{}{} wg.Wait() - - time.Sleep(time.Second * 5) } func TestBroadcastSameSubscriberGlobal(t *testing.T) { @@ -316,8 +315,7 @@ func TestBroadcastSameSubscriberGlobal(t *testing.T) { cfg, &broadcast.Plugin{}, &rpcPlugin.Plugin{}, - &logger.ZapLogger{}, - // mockLogger, + mockLogger, &server.Plugin{}, &redis.Plugin{}, &websockets.Plugin{}, @@ -390,6 +388,8 @@ func TestBroadcastSameSubscriberGlobal(t *testing.T) { t.Run("PublishHelloFoo3", BroadcastPublishFoo3("6003")) t.Run("PublishAsyncHelloFooFoo2Foo3", BroadcastPublishAsyncFooFoo2Foo3("6003")) + time.Sleep(time.Second * 4) + stopCh <- struct{}{} wg.Wait() |