mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-08 08:36:32 +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) {
|
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()
|
h.Stop()
|
||||||
for {
|
for {
|
||||||
h.mu.Lock()
|
h.mu.Lock()
|
||||||
|
|
Loading…
Reference in a new issue