Browse Source

test: ensure double-closing the host doesn't cause any issues

pull/669/head
Steven Allen 5 years ago
parent
commit
97f639055e
  1. 7
      p2p/host/basic/basic_host_test.go

7
p2p/host/basic/basic_host_test.go

@ -23,6 +23,13 @@ import (
madns "github.com/multiformats/go-multiaddr-dns"
)
func TestHostDoubleClose(t *testing.T) {
ctx := context.Background()
h1 := New(swarmt.GenSwarm(t, ctx))
h1.Close()
h1.Close()
}
func TestHostSimple(t *testing.T) {
ctx := context.Background()
h1 := New(swarmt.GenSwarm(t, ctx))

Loading…
Cancel
Save