summaryrefslogtreecommitdiffstats
path: root/pkg/tasks/async_handler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tasks/async_handler_test.go')
-rw-r--r--pkg/tasks/async_handler_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tasks/async_handler_test.go b/pkg/tasks/async_handler_test.go
index b6edbec20..70e678b94 100644
--- a/pkg/tasks/async_handler_test.go
+++ b/pkg/tasks/async_handler_test.go
@@ -12,7 +12,10 @@ func TestAsyncHandler(t *testing.T) {
wg := sync.WaitGroup{}
wg.Add(2)
- handler := NewAsyncHandler()
+ onWorker := func(f func()) {
+ go f()
+ }
+ handler := NewAsyncHandler(onWorker)
handler.onReject = func() {
wg.Done()
}