Skip to content

Commit

Permalink
workaround for race condition test
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Jun 29, 2024
1 parent 70548b6 commit 4ba3f8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions example/subscription/subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 4ba3f8a

Please sign in to comment.