ringbuffer: remove rand from tests

This commit is contained in:
aler9
2021-05-02 21:34:31 +02:00
committed by Alessandro Ros
parent 6a9f18f199
commit 3ed4ef942a

View File

@@ -1,7 +1,7 @@
package ringbuffer
import (
"math/rand"
"bytes"
"testing"
"time"
@@ -12,8 +12,7 @@ func TestPushBeforePull(t *testing.T) {
r := New(1024)
defer r.Close()
data := make([]byte, 1024)
rand.Read(data)
data := bytes.Repeat([]byte{0x01, 0x02, 0x03, 0x04}, 1024/4)
r.Push(data)
ret, ok := r.Pull()
@@ -25,8 +24,7 @@ func TestPullBeforePush(t *testing.T) {
r := New(1024)
defer r.Close()
data := make([]byte, 1024)
rand.Read(data)
data := bytes.Repeat([]byte{0x01, 0x02, 0x03, 0x04}, 1024/4)
done := make(chan struct{})
go func() {