add test that fails on go1.10.*

This commit is contained in:
Song Gao 2019-03-31 14:57:04 -07:00
parent f7eb3ca99f
commit af2921498b
4 changed files with 20 additions and 9 deletions

View file

@ -8,14 +8,16 @@ import (
const BUFFERSIZE = 1522
func startRead(ch chan<- []byte, ifce *Interface) {
func startRead(t *testing.T, ifce *Interface, dataCh chan<- []byte, errCh chan<- error) {
go func() {
for {
buffer := make([]byte, BUFFERSIZE)
n, err := ifce.Read(buffer)
if err == nil {
if err != nil {
errCh <- err
} else {
buffer = buffer[:n:n]
ch <- buffer
dataCh <- buffer
}
}
}()