Add comment explaining usage Schedulers.trampoline in detail
This commit is contained in:
parent
56ea526cce
commit
2aa5f68b7b
1 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,10 @@ import org.junit.runner.Description
|
||||||
import org.junit.runners.model.Statement
|
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 {
|
class TrampolineSchedulerRule : TestRule {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue