Skip to content

Commit d517f00

Browse files
committed
Minor fixes to TestInterceptorNack
One variable was misnamed, and we never checked for the end of the RTCP loop.
1 parent 1ee0299 commit d517f00

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

interceptor_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func Test_Interceptor_ZeroSSRC(t *testing.T) {
289289
}
290290

291291
// TestInterceptorNack is an end-to-end test for the NACK sender.
292-
// It test that:
292+
// It tests that:
293293
// - we get a NACK if we negotiated generic NACks;
294294
// - we don't get a NACK if we did not negotiate generick NACKs;
295295
// - the NACK corresponds to the missing packet.
@@ -306,16 +306,16 @@ func testInterceptorNack(t *testing.T, requestNack bool) {
306306

307307
ir := interceptor.Registry{}
308308
m := MediaEngine{}
309-
var capability []RTCPFeedback
309+
var feedback []RTCPFeedback
310310
if requestNack {
311-
capability = append(capability, RTCPFeedback{"nack", ""})
311+
feedback = append(feedback, RTCPFeedback{"nack", ""})
312312
}
313313
err := m.RegisterCodec(
314314
RTPCodecParameters{
315315
RTPCodecCapability: RTPCodecCapability{
316316
"video/VP8", 90000, 0,
317317
"",
318-
capability,
318+
feedback,
319319
},
320320
PayloadType: 96,
321321
},
@@ -424,7 +424,6 @@ func testInterceptorNack(t *testing.T, requestNack bool) {
424424
assert.NoError(t, err)
425425
err = pc2.Close()
426426
assert.NoError(t, err)
427-
<-rtcpDone
428427

429428
if requestNack {
430429
if !gotNack {

0 commit comments

Comments
 (0)