rebus-org / Rebus.ServiceProvider

:bus: Microsoft Extensions Dependency Injection container adapter for Rebus
https://mookid.dk/category/rebus
Other
65 stars 32 forks source link

Fix problems with tests #18

Closed Hawxy closed 5 years ago

Hawxy commented 5 years ago

That was a nice stack of compounding problems.

Changing the tests to dispose of the provider fixed the RealContainer test and matched the behaviour I was seeing in the samples (IBus was being disposed as expected), but the ContainerTests still failed due to the SetBus call. I initially just added the adapter to the container + used IDisposable, but realized that IContainerAdapter isn't needed at all (since M.E.D handles the IBus lifetime) and can be safely removed.


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

mookid8000 commented 5 years ago

Super 😁 it's out as Rebus.ServiceProvider 5.0.0-b01. Let me know when you've tried it out, and then I'll release a stable version if it works fine

Hawxy commented 5 years ago

@mookid8000 have tested it, working fine 👍