close(stopChan) Eventually(doneChan).Should(BeClosed()) close(done) }, 10) }) Describe("FirehoseWithoutReconnect", func() { var incomingChan chan *events.Envelope var streamErrorChan chan error var finishedChan chan struct{} perform := func() { streamErrorChan = make(chan error, 10) connection = noaa.NewConsumer(trafficControllerUrl, tlsSettings, consumerProxyFunc) go func() { streamErrorChan <- connection.FirehoseWithoutReconnect("subscription-id", authToken, incomingChan) close(finishedChan) }() } BeforeEach(func() { incomingChan = make(chan *events.Envelope) finishedChan = make(chan struct{}) startFakeTrafficController() }) AfterEach(func() { <-finishedChan }) Context("when there is no TLS Config or consumerProxyFunc setting", func() {