Add regression test

pull/750/head
Eugene Kim 6 years ago committed by Leo Chen
parent a88eb643e6
commit 11459a4ea0
  1. 7
      p2p/host/hostv2/hostv2_test.go

@ -128,4 +128,11 @@ func TestHostV2_GroupReceiver(t *testing.T) {
t.Error("expected an error; got none") t.Error("expected an error; got none")
} }
}) })
t.Run("Closed", func(t *testing.T) {
var emptyReceiver GroupReceiverImpl
_, _, err := emptyReceiver.Receive(context.Background())
if err == nil {
t.Errorf("Receive() from nil/closed receiver did not return error")
}
})
} }

Loading…
Cancel
Save