func createSingleNodeCluster(rp *Ringpop) error {
	_, err := rp.Bootstrap(&swim.BootstrapOptions{
		DiscoverProvider: statichosts.New(),
	})
	return err
}
createSingleNodeCluster is a helper function to create a single-node cluster
during the tests
package ringpop
import (
	"sync"
	"testing"
	"time"
	"github.com/benbjohnson/clock"
	"github.com/stretchr/testify/mock"
	"github.com/stretchr/testify/suite"
	"github.com/uber/ringpop-go/discovery/statichosts"
	"github.com/uber/ringpop-go/events"
	eventsmocks "github.com/uber/ringpop-go/events/test/mocks"
	"github.com/uber/ringpop-go/forward"
	"github.com/uber/ringpop-go/membership"
	"github.com/uber/ringpop-go/swim"
	"github.com/uber/ringpop-go/test/mocks"
	"github.com/uber/tchannel-go"
)
type destroyable interface {
	Destroy()
}
type destroyableChannel struct {
	*tchannel.Channel
}
func (c *destroyableChannel) Destroy() {
	if c.Channel != nil {
		c.Channel.Close()
	}
}
type RingpopTestSuite struct {
	suite.Suite
	mockClock    *clock.Mock
	ringpop      *Ringpop
	channel      *tchannel.Channel
	mockRingpop  *mocks.Ringpop
	mockSwimNode *mocks.SwimNode
	stats        *dummyStats
	destroyables []destroyable
}
func (s *RingpopTestSuite) makeNewRingpop() (rp *Ringpop, err error) {
	ch, err := tchannel.NewChannel("test", nil)
	s.NoError(err, "channel must create successfully")
	err = ch.ListenAndServe("127.0.0.1:0")
	s.NoError(err, "channel must listen successfully")
	rp, err = New("test", Channel(ch), Clock(s.mockClock))
	s.NoError(err, "Ringpop must create successfully")
	s.destroyables = append(s.destroyables, &destroyableChannel{ch}, rp)
	return
}