Inspector support Go context

This commit is contained in:
youngxu
2022-06-21 14:10:31 +08:00
parent 7d783d6ae9
commit 7922c858f7
6 changed files with 9 additions and 14 deletions

View File

@@ -199,13 +199,13 @@ func (tb *TestBroker) CancelationPubSub() (*redis.PubSub, error) {
return tb.real.CancelationPubSub()
}
func (tb *TestBroker) PublishCancelation(id string) error {
func (tb *TestBroker) PublishCancelation(ctx context.Context, id string) error {
tb.mu.Lock()
defer tb.mu.Unlock()
if tb.sleeping {
return errRedisDown
}
return tb.real.PublishCancelation(id)
return tb.real.PublishCancelation(ctx, id)
}
func (tb *TestBroker) WriteResult(qname, id string, data []byte) (int, error) {