Expose Participant.IsPublisher to differentiate pubs from subs (#643)

This commit is contained in:
David Zhao
2022-04-21 22:15:01 -07:00
committed by GitHub
parent 8bb46637bb
commit 57e2321a18
9 changed files with 56 additions and 23 deletions

View File

@@ -4,6 +4,8 @@ import (
"context"
"testing"
"time"
"github.com/stretchr/testify/require"
)
var (
@@ -17,7 +19,7 @@ func WithTimeout(t *testing.T, f func() string) {
for {
select {
case <-ctx.Done():
t.Fatal("timed out: " + lastErr)
require.Empty(t, lastErr)
case <-time.After(10 * time.Millisecond):
lastErr = f()
if lastErr == "" {