{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3986","repository_url":"https://api.github.com/repos/ReactiveX/RxJava","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3986/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3986/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3986/events","html_url":"https://github.com/ReactiveX/RxJava/pull/3986","id":158296458,"number":3986,"title":"Add Schedulers.reset() for better testing","user":{"login":"hzsweers","id":1361086,"avatar_url":"https://avatars.githubusercontent.com/u/1361086?v=3","gravatar_id":"","url":"https://api.github.com/users/hzsweers","html_url":"https://github.com/hzsweers","followers_url":"https://api.github.com/users/hzsweers/followers","following_url":"https://api.github.com/users/hzsweers/following{/other_user}","gists_url":"https://api.github.com/users/hzsweers/gists{/gist_id}","starred_url":"https://api.github.com/users/hzsweers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzsweers/subscriptions","organizations_url":"https://api.github.com/users/hzsweers/orgs","repos_url":"https://api.github.com/users/hzsweers/repos","events_url":"https://api.github.com/users/hzsweers/events{/privacy}","received_events_url":"https://api.github.com/users/hzsweers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":32,"created_at":"2016-06-03T05:55:13Z","updated_at":"2016-06-06T21:35:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3986","html_url":"https://github.com/ReactiveX/RxJava/pull/3986","diff_url":"https://github.com/ReactiveX/RxJava/pull/3986.diff","patch_url":"https://github.com/ReactiveX/RxJava/pull/3986.patch"},"body":"Resolves #3985\r\n\r\nThis adds a `reset()` method to `Schedulers`, with the main benefit being improved testing support. This does slightly tweak the internal API of `Schedulers` to use a `getInstance()` approach to allow lazy init. This way we don't have to replace the singleton instance during `reset()` and allow it to lazily re-evaluate upon next usage. Otherwise, if you change your scheduler hook, you'd always have to make sure you set it before you call `Schedulers.reset()`.\r\n\r\nWill run perf tests overnight in case, I'm not sure how much of a tradeoff moving to an internal `getInstance()` approach costs, if anything.\r\n\r\nCC @zsxwing"},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/224095872","html_url":"https://github.com/ReactiveX/RxJava/pull/3986#issuecomment-224095872","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3986","id":224095872,"user":{"login":"hzsweers","id":1361086,"avatar_url":"https://avatars.githubusercontent.com/u/1361086?v=3","gravatar_id":"","url":"https://api.github.com/users/hzsweers","html_url":"https://github.com/hzsweers","followers_url":"https://api.github.com/users/hzsweers/followers","following_url":"https://api.github.com/users/hzsweers/following{/other_user}","gists_url":"https://api.github.com/users/hzsweers/gists{/gist_id}","starred_url":"https://api.github.com/users/hzsweers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzsweers/subscriptions","organizations_url":"https://api.github.com/users/hzsweers/orgs","repos_url":"https://api.github.com/users/hzsweers/repos","events_url":"https://api.github.com/users/hzsweers/events{/privacy}","received_events_url":"https://api.github.com/users/hzsweers/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T21:35:32Z","updated_at":"2016-06-06T21:35:32Z","body":"When you put it that way, I think I agree."}}
{"actor":{"display_login":"hzsweers"}}