saveourtool/save-cloud

Improve testing of background tasks

Open

#240 aperta il 27 ago 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (1 assegnatario)Kotlin (4 fork)github user discovery
enhancementgood first issue

Metriche repository

Star
 (38 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor