saveourtool/save-cloud

Improve testing of background tasks

Open

#240 opened on Aug 27, 2021

View on GitHub
 (0 comments) (0 reactions) (1 assignee)Kotlin (4 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (38 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide