Expose Participant.IsPublisher to differentiate pubs from subs (#643)
This commit is contained in:
@@ -88,6 +88,8 @@ func TestNegotiationTiming(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
transportB, err := NewPCTransport(params)
|
||||
require.NoError(t, err)
|
||||
require.False(t, transportA.IsEstablished())
|
||||
require.False(t, transportB.IsEstablished())
|
||||
|
||||
handleICEExchange(t, transportA, transportB)
|
||||
offer := atomic.Value{}
|
||||
@@ -116,7 +118,16 @@ func TestNegotiationTiming(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, transportB.pc.SetLocalDescription(answer))
|
||||
require.NoError(t, transportA.SetRemoteDescription(answer))
|
||||
time.Sleep(5 * time.Millisecond)
|
||||
|
||||
testutils.WithTimeout(t, func() string {
|
||||
if !transportA.IsEstablished() {
|
||||
return "transportA is not established"
|
||||
}
|
||||
if !transportB.IsEstablished() {
|
||||
return "transportB is not established"
|
||||
}
|
||||
return ""
|
||||
})
|
||||
|
||||
// it should still be negotiating again
|
||||
require.Equal(t, negotiationStateClient, transportA.negotiationState)
|
||||
|
||||
Reference in New Issue
Block a user