diff --git a/connect/manager.go b/connect/manager.go index bcc2a93fd50f4b2f3765e525596ec9288d5fab9d..8678d61d9a4ae01d8599e7a8abd883ee0bac83ff 100644 --- a/connect/manager.go +++ b/connect/manager.go @@ -15,6 +15,7 @@ import ( jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/primitives/id" "sync" + "testing" ) // The Manager object provides thread-safe access @@ -32,6 +33,13 @@ func newManager() *Manager { } } +func NewManagerTesting(t *testing.T) *Manager { + if t == nil { + jww.FATAL.Panicf("NewMangerTesting is for testing only") + } + return newManager() +} + // Fetch a Host from the internal map func (m *Manager) GetHost(hostId *id.ID) (*Host, bool) { m.mux.RLock()