Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akka.DependencyInjection.Tests AkkaDiFixture has problems causing the running to never stop #4919

Closed
Danthar opened this issue Apr 8, 2021 · 1 comment · Fixed by #4920
Closed

Comments

@Danthar
Copy link
Member

Danthar commented Apr 8, 2021

Since we are using the new DI integration for Netcore in production. I went looking for ways to unit test akka Actors with the new DI integration. And i found the UnitTests in the Akka.DependencyInjection.Tests project and copied that.

Then i ran into the issue that the TestRunner hangs after completion of tests. This has to do with the IClassFixture which uses the AkkaDiFixture.

This fixture class starts a netcore host to bootstrap the ServiceCollection. However it has 2 problems:

  • It does Host.StopAsync().GetAwaiter().Result.Wait()
  • Even if you implement the proper IAsyncLifetime interface which allows for proper async disposal, it still blocks the TestRunner.

Currently the CI for Akka does not notice this, but that does not mean its not happening ;)

@Aaronontheweb
Copy link
Member

Nice catch @Danthar

@Aaronontheweb Aaronontheweb added this to the 1.4.19 milestone Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants