akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.73k stars 1.04k forks source link

[TEST] Update Akka.TestKit to run asynchronous internally. #5609

Closed Arkatufus closed 2 years ago

Arkatufus commented 2 years ago

Right now, Akka.TestKit relies on a BlockingQueue internally inside TestState making all test to run async over sync, In order to support full asynchronous test operations, we will need to replace this with something that supports async operation better. The main goal of this spec is to invert all operations into sync over async instead.

The biggest problem right now is the InternalTryReceiveOne() method in the TestKitBase class, it blocks as it waits for a message to get queued into the BlockingQueue<T>. This method gets called by virtually all akka test function that waits for one message or another. This method needs to be converted into an async method.

Options:

brah-mcdude commented 2 years ago

Please let me know if you want me to help. I need this feature more than anyone.

Arkatufus commented 2 years ago

Will do, thanks for the offer.

Arkatufus commented 2 years ago

All the code are done but can't really be tested until all of the unit tests are converted to the new async code