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

@ -32,12 +32,13 @@ func TestP2PTUN(t *testing.T) {
t.Fatalf("creating TUN error: %v\n", err)
}
dataCh := make(chan []byte)
errCh := make(chan error)
startRead(t, ifce, dataCh, errCh)
setupIfce(t, self, remote, ifce.Name())
startPing(t, remote)
dataCh := make(chan []byte, 8)
startRead(dataCh, ifce)
timeout := time.NewTimer(8 * time.Second).C
readFrame:
@ -58,6 +59,8 @@ readFrame:
}
t.Logf("received broadcast packet: %#v\n", packet)
break readFrame
case err := <-errCh:
t.Fatalf("read error: %v", err)
case <-timeout:
t.Fatal("Waiting for broadcast packet timeout")
}