mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 23:52:46 +08:00
ringbuffer: remove rand from tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package ringbuffer
|
package ringbuffer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -12,8 +12,7 @@ func TestPushBeforePull(t *testing.T) {
|
|||||||
r := New(1024)
|
r := New(1024)
|
||||||
defer r.Close()
|
defer r.Close()
|
||||||
|
|
||||||
data := make([]byte, 1024)
|
data := bytes.Repeat([]byte{0x01, 0x02, 0x03, 0x04}, 1024/4)
|
||||||
rand.Read(data)
|
|
||||||
|
|
||||||
r.Push(data)
|
r.Push(data)
|
||||||
ret, ok := r.Pull()
|
ret, ok := r.Pull()
|
||||||
@@ -25,8 +24,7 @@ func TestPullBeforePush(t *testing.T) {
|
|||||||
r := New(1024)
|
r := New(1024)
|
||||||
defer r.Close()
|
defer r.Close()
|
||||||
|
|
||||||
data := make([]byte, 1024)
|
data := bytes.Repeat([]byte{0x01, 0x02, 0x03, 0x04}, 1024/4)
|
||||||
rand.Read(data)
|
|
||||||
|
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
|
Reference in New Issue
Block a user