Refactor/cleanup of negotiation path

This commit is contained in:
David Zhao
2021-04-15 17:03:22 -07:00
parent 6c5bd4ce42
commit e4238890ff
20 changed files with 153 additions and 151 deletions
+2 -3
View File
@@ -128,7 +128,7 @@ func TestTrackPublishing(t *testing.T) {
// after disconnection, things should continue to function and not panic
func TestDisconnectTiming(t *testing.T) {
t.Run("negotiate doesn't fail after channel closed", func(t *testing.T) {
t.Run("Negotiate doesn't panic after channel closed", func(t *testing.T) {
p := newParticipantForTest("test")
msg := routing.NewMessageChannel()
p.responseSink = msg
@@ -140,9 +140,8 @@ func TestDisconnectTiming(t *testing.T) {
track := &typesfakes.FakePublishedTrack{}
p.handleTrackPublished(track)
// close channel and then try to negotiate
// close channel and then try to Negotiate
msg.Close()
p.negotiate()
})
}