forked from External/mediamtx
fix race condition in WebRTC tests (#3204)
This commit is contained in:
parent
d5a18bf78f
commit
9ce12ffa4a
1 changed files with 7 additions and 0 deletions
|
|
@ -221,10 +221,17 @@ func TestServerPublish(t *testing.T) {
|
|||
path.stream.Desc().Medias[0],
|
||||
path.stream.Desc().Medias[0].Formats[0],
|
||||
func(u unit.Unit) error {
|
||||
select {
|
||||
case <-recv:
|
||||
return nil
|
||||
default:
|
||||
}
|
||||
|
||||
require.Equal(t, [][]byte{
|
||||
{1},
|
||||
}, u.(*unit.H264).AU)
|
||||
close(recv)
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue