File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
p2p/transport/webrtc/udpmux Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,9 @@ func TestRemoveConnByUfrag(t *testing.T) {
151
151
for i := 0 ; i < 10 ; i ++ {
152
152
mc1 , err := m .GetConn (ufrag , conns [i ].LocalAddr ())
153
153
require .NoError (t , err )
154
- require .Equal (t , mc1 , mc )
154
+ if mc1 != mc {
155
+ t .Fatalf ("expected the two muxed connections to be same" )
156
+ }
155
157
}
156
158
157
159
// Now remove the ufrag
@@ -167,13 +169,17 @@ func TestRemoveConnByUfrag(t *testing.T) {
167
169
for i := 0 ; i < 10 ; i ++ {
168
170
mc1 , err := m .GetConn (ufrag , conns [i ].LocalAddr ())
169
171
require .NoError (t , err )
170
- require .Equal (t , mc1 , mc )
172
+ if mc1 != mc {
173
+ t .Fatalf ("expected the two muxed connections to be same" )
174
+ }
171
175
}
172
176
173
177
// Should be different even if the address is the same
174
178
mc1 , err := m .GetConn ("a" , conns [0 ].LocalAddr ())
175
179
require .NoError (t , err )
176
- require .NotEqual (t , mc1 , mc )
180
+ if mc1 == mc {
181
+ t .Fatalf ("expected the two connections to be different" )
182
+ }
177
183
}
178
184
179
185
func TestMuxedConnection (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments