"github.com/cloudfoundry/dropsonde/metricbatcher"
	"github.com/cloudfoundry/dropsonde/metrics"
	"github.com/cloudfoundry/dropsonde/signature"
	"github.com/cloudfoundry/gosteno"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var sharedSecret = []byte("secret")

var _ = Describe("DopplerForwarder", func() {
	var (
		sender     *fake.FakeMetricSender
		clientPool *fakes.FakeClientPool
		client     *fakeclient.FakeClient
		logger     *gosteno.Logger
		forwarder  *dopplerforwarder.DopplerForwarder
		envelope   *events.Envelope
		doneChan   chan struct{}
		bufferSize uint
	)

	BeforeEach(func() {
		sender = fake.NewFakeMetricSender()
		metrics.Initialize(sender, metricbatcher.New(sender, time.Millisecond*10))

		client = &fakeclient.FakeClient{}
		clientPool = &fakes.FakeClientPool{}
		clientPool.RandomClientReturns(client, nil)

		logger = loggertesthelper.Logger()
		loggertesthelper.TestLoggerSink.Clear()
	"github.com/cloudfoundry/dropsonde/metric_sender/fake"
	"github.com/cloudfoundry/dropsonde/metricbatcher"
	"github.com/cloudfoundry/dropsonde/metrics"
	"github.com/cloudfoundry/dropsonde/signature"
	"github.com/cloudfoundry/gosteno"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var sharedSecret = []byte("secret")

var _ = Describe("DopplerForwarder", func() {
	var (
		sender     *fake.FakeMetricSender
		clientPool *fakes.FakeClientPool
		client     *fakeclient.FakeClient
		logger     *gosteno.Logger
		forwarder  *dopplerforwarder.DopplerForwarder
		envelope   *events.Envelope
	)

	BeforeEach(func() {
		sender = fake.NewFakeMetricSender()
		metrics.Initialize(sender, metricbatcher.New(sender, time.Millisecond*10))

		client = &fakeclient.FakeClient{}
		clientPool = &fakes.FakeClientPool{}
		clientPool.RandomClientReturns(client, nil)

		logger = loggertesthelper.Logger()
		loggertesthelper.TestLoggerSink.Clear()