You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RxTest's TestScheduler causes a crash when used in Swift Testing:
When running a test inside the Swift Testing system, the TestScheduler uses VirtualTimeScheduler which, at several points, checks to ensure it's running on the main thread. However since Swift Testing runs tests on background threads, the test harness will crash on the assertion.
Expected outcome:
I expected that VirtualTimeScheduler would be thread agnostic. At worst, it would ensure that all its methods were run on the same thread as the start method was run on, but that's about it.
What actually happens:
The VirtualTimeScheduler asserts because it's not being run on the main thread.
Self contained code example that reproduces the issue:
RxTest's TestScheduler causes a crash when used in Swift Testing:
When running a test inside the Swift Testing system, the TestScheduler uses VirtualTimeScheduler which, at several points, checks to ensure it's running on the main thread. However since Swift Testing runs tests on background threads, the test harness will crash on the assertion.
Expected outcome:
I expected that VirtualTimeScheduler would be thread agnostic. At worst, it would ensure that all its methods were run on the same thread as the start method was run on, but that's about it.
What actually happens:
The VirtualTimeScheduler asserts because it's not being run on the main thread.
Self contained code example that reproduces the issue:
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
6.7.1
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
Installation method:
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
The text was updated successfully, but these errors were encountered: