mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
a duplex media channel should be more realistic, you generally both send and receive media when doing video call and stuff
20 lines
336 B
Go
20 lines
336 B
Go
package media
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestMediaChannelStop(t *testing.T) {
|
|
mc := NewMediaChannel()
|
|
|
|
// This should not panic
|
|
mc.Stop()
|
|
|
|
// Verify that the stop channel is closed
|
|
select {
|
|
case <-mc.stopCh:
|
|
// Channel is closed, which is expected
|
|
default:
|
|
t.Fatal("MediaChannel stopCh should be closed after Stop()")
|
|
}
|
|
}
|