RxSwift icon indicating copy to clipboard operation
RxSwift copied to clipboard

Allow VirtualTimeScheduler to run on any thread

Open danielt1263 opened this issue 1 year ago • 3 comments
trafficstars

…as long as critical methods are all called on the same thread.

This is designed to fix issue #2609

danielt1263 avatar Jul 10 '24 17:07 danielt1263

As far as I can tell, this is 100% backwards compatible and doesn't require any API change from users of the library. It may not solve every future use-case that Swift Testing might throw at it, but it solves the single most obvious one.

I see no reason that this can't be accepted into the next minor release/update.

danielt1263 avatar Jul 11 '24 00:07 danielt1263

What's the hold up in getting this merged? Would love to start being able to migrate our RxSwift tests to Swift Testing @nikolaykasyanov @danielt1263

bennnjamin avatar Aug 23 '24 19:08 bennnjamin

We'll need someone with a meaningful RxSwift-based test suite to test this to make sure it doesn't break existing tests.

freak4pc avatar Oct 03 '24 12:10 freak4pc

@freak4pc I'll try it out and report back.

nikolaykasyanov avatar Nov 13 '24 08:11 nikolaykasyanov

@freak4pc I tried this PR on our relatively big test suite (around 1800 tests, most of which use TestScheduler) and didn't find any issues ✅ . To be sure, I also ran the suite repeatedly 10 times ✅ and with thread sanitizer ✅ .

nikolaykasyanov avatar Nov 13 '24 10:11 nikolaykasyanov

@freak4pc I tried this PR on our relatively big test suite (around 1800 tests, most of which use TestScheduler) and didn't find any issues ✅ . To be sure, I also ran the suite repeatedly 10 times ✅ and with thread sanitizer ✅ .

That's awesome, thanks Nikolay!

freak4pc avatar Nov 14 '24 07:11 freak4pc