X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/a3b9849a54a6cd8a4cc5b1ae03a39aab31322f7b..522d7fd117285e4e4ce3ea5ec9b5a1722521b681:/summarizer_helper_test.go?ds=inline diff --git a/summarizer_helper_test.go b/summarizer_helper_test.go index 94c8154..e78a69e 100644 --- a/summarizer_helper_test.go +++ b/summarizer_helper_test.go @@ -23,6 +23,7 @@ type FakeSummarizer struct { func (f *FakeSummarizer) Summarize(ctx context.Context, task Task) (string, error) { f.mutex.Lock() + f.tasks = append(f.tasks, task) f.active++ f.peak = max(f.peak, f.active) @@ -31,6 +32,7 @@ func (f *FakeSummarizer) Summarize(ctx context.Context, task Task) (string, erro defer func() { f.mutex.Lock() + f.active-- f.mutex.Unlock() }()