mockStoreAdapter.WatchOutput.events <- metaEvents close(mockStoreAdapter.WatchOutput.events) }) AfterEach(func() { node := makeMetaNode("z1/doppler_z1/0", []string{"tls://1.2.3.4:567"}) metaEvents <- storeadapter.WatchEvent{ Type: storeadapter.CreateEvent, Node: &node, } Eventually(done).Should(BeClosed()) }) It("doesn't send an event", func() { go func() { finder.Next() close(done) }() Consistently(done).ShouldNot(BeClosed()) }) }) Context("invalid protocol", func() { BeforeEach(func() { protocols = []string{"udp", "tls"} metaNode, legacyNode = etcdNodes(map[string][]string{ "z1/doppler_z1/0": []string{"udp://1.2.3.4:567"}, "z1/doppler_z1/1": []string{"tls://9.8.7.6:555"}, "z1/doppler_z1/2": []string{"xyz://9.8.7.6:543", "tca://9.8.7.6:555"}, }, nil) })