package bus // SetTickHook makes the next consumes call f after each idle heartbeat interval was handled; the restore puts it back. func SetTickHook(f func()) (restore func()) { old := tickHook tickHook = f return func() { tickHook = old } } // SetSubscribedHook makes c call f with the subject between making each answering subscription and keeping it, so a test can // run the stop in between (design 47 H2 H-A-570 (1)). func SetSubscribedHook(c *Conn, f func(subject string)) { c.mu.Lock() c.subscribedHook = f c.mu.Unlock() }