saveourtool/save-cloud

Improve testing of background tasks

Open

#240 创建于 2021年8月27日

在 GitHub 查看
 (0 评论) (0 反应) (1 负责人)Kotlin (4 fork)github user discovery
enhancementgood first issue

仓库指标

Star
 (38 star)
PR 合并指标
 (PR 指标待抓取)

描述

We have a lot of cases, when request handler returns and triggers a background job, i.e. subscribes to a Publisher inside it's doOnSuccess. In tests to verify that backgound jobs are working correctly we usually call Thread.sleep. This is sub-optimal, because jobs take indefinite time and blocking increases duration of tests.

贡献者指南