Skip to content

Commit

Permalink
Add comment explaining usage Schedulers.trampoline in detail
Browse files Browse the repository at this point in the history
  • Loading branch information
XiangRongLin committed Jul 12, 2021
1 parent 56ea526 commit 2aa5f68
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import org.junit.runner.Description
import org.junit.runners.model.Statement

/**
* Always run on [Schedulers.trampoline]
* Always run on [Schedulers.trampoline].
* This executes the task in the current thread in FIFO manner.
* This ensures that tasks are run quickly inside the tests
* and not scheduled away to another thread for later execution
*/
class TrampolineSchedulerRule : TestRule {

Expand Down

0 comments on commit 2aa5f68

Please sign in to comment.