diff --git a/example/subscription/subscription_test.go b/example/subscription/subscription_test.go index 1bf65cf..336b262 100644 --- a/example/subscription/subscription_test.go +++ b/example/subscription/subscription_test.go @@ -538,6 +538,9 @@ func testSubscription_LifeCycleEvents(t *testing.T, syncMode bool) { } } + // workaround for race condition + time.Sleep(time.Second) + if atomic.LoadInt32(&wasConnected) != 1 { t.Fatalf("expected OnConnected event, got none") }