mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-04-27 03:31:51 +02:00
Wait for any messages to be processed before stopping Hub in tests.
This commit is contained in:
parent
3f19882612
commit
04d315b0a4
|
@ -138,6 +138,8 @@ func CreateHubWithMultipleBackendsForTest(t *testing.T) (*Hub, NatsClient, *mux.
|
|||
}
|
||||
|
||||
func WaitForHub(ctx context.Context, t *testing.T, h *Hub) {
|
||||
// Wait for any channel messages to be processed.
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
h.Stop()
|
||||
for {
|
||||
h.mu.Lock()
|
||||
|
|
Loading…
Reference in a new issue