RxJava 2 overriding IO scheduler in unit test

前端 未结 4 1993
你的背包
你的背包 2021-02-02 13:28

I\'m trying to test the following RxKotlin/RxJava 2 code:

validate(data)
    .subscribeOn(Schedulers.io())
    .observeO         


        
4条回答
  •  温柔的废话
    2021-02-02 14:05

    This is the exact syntax that worked for me:

    RxJavaPlugins.setIoSchedulerHandler(scheduler -> Schedulers.trampoline())
    

提交回复
热议问题