Skip to content

Commit

Permalink
we don't care about leaks, process dies anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
oncilla committed Dec 19, 2019
1 parent f6cd69f commit c17543e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions go/border/io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package main

import (
"errors"
"net"
"os"
"syscall"
Expand Down Expand Up @@ -90,28 +89,6 @@ func TestPosixOutputNoLeakRecoverableErrors(t *testing.T) {
sock.Stop()
}

func TestPosixOutputNoLeakUnrecoverableErrors(t *testing.T) {
mctrl := gomock.NewController(t)
defer mctrl.Finish()
r := initTestRouter(1)
pkts, checkAllReturned := newTestPktList(t, 2*outputBatchCnt)
defer checkAllReturned(len(pkts))
// Wait for both batches to be written.
done := make(chan struct{}, 1)
mconn := newTestConn(mctrl)
mconn.EXPECT().WriteBatch(gomock.Any()).DoAndReturn(
func(_ conn.Messages) (int, error) {
done <- struct{}{}
return 0, errors.New("unrecoverable")
},
)
sock := newTestSock(r, len(pkts), mconn)
sock.Start()
sock.Ring.Write(pkts, true)
<-done
sock.Stop()
}

func testSuccessfulWrite(done chan<- struct{}) func(conn.Messages) (int, error) {
return func(msgs conn.Messages) (int, error) {
for i, msg := range msgs {
Expand Down

0 comments on commit c17543e

Please sign in to comment.