-
Notifications
You must be signed in to change notification settings - Fork 10
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
Test.Initialize fails to start after upgrading to NServiceBus 5.2.0 #20
Comments
Can you also define a milestone for the hotfix? // @andreasohlund |
If you start fixes this issue you might as well look into the WARN logged about encryption not being set-up properly in the same exception. 2015-02-13 12:17:45.970 WARN NServiceBus.Features.Encryptor You have configured a encryption service via either ConfigurationBuilder.RijndaelEncryptionService or ConfigurationBuilder.RegisterEncryptionService however no properties were found on type that require encryption. |
Fixed by commit f761c53 |
Is this fixed now? I have 5.2.0 installed as well as 5.0.4 for NServiceBus.Testing and am experiencing the same issue. |
@OnamChilwan released with 5.0.4 Are you still having this issue? If you do, could you please provide repro? |
In this version we can not initialize the Test.Initialize without scanning. In 5.0.3 we did this: Now, in 5.0.4, it gives the exception reported in this issue. We need to work that way because of how TFS executes the unit tests. |
Yes I am still experiencing this issue unfortunately. If you need further details then more than happy to do so. Just for reference, my package contains package id="Moq" version="4.2.1408.0717" targetFramework="net40" |
@OnamChilwan and @pablocastilla : Would you be able to provide a reproduction for us? Either upoload to gihub or just paste a failing test + the version of NServiceBus and NServiceBus.Testing here. |
Will do. The problem exists in production ready code which I am moving across to another solution. Shouldn't be too long. |
@pablocastilla : I'm pretty sure you can work around your issue by using |
@janovesk I get an "Interface Not Found" exception if I do that. |
@pablocastilla Can you give me a repro and/or the entire message exception?
is working here, so I'm puzzled by why you're getting an exception. |
Uploaded to https://github.com/OnamChilwan/TestIssue. If you run the unit test I have only the one in there but there are 2 static methods. One which creates the KeyNotFound exception and another which informs me I must use a concrete type. Though the latter is not so important. |
@janovesk It works... sorry, it was the test what failed :) |
Hi @OnamChilwan! Thanks for providing the reproduction. The real issue here is that For now you can work around the problem by including
It should no longer throw a I'm looking into how we will fix this permanently in NServiceBus.Testing. BTW: The exception with the concrete type is because you are using an interface based event in your handler without providing the event conventions to Test.Initialize(). That is not related to this error. Fix it by simply making sure you register the event convention. |
This will be fixed by a better way of handling assembly scanning in a future version of NServiceBus. I recommend using the workarounds mentioned until then. |
Brilliant thank you very much. That works a treat now though I imagine as you said its a workaround this will change in the next update so that NServiceBus.Testing doesn't need to be included in the assembly scanning? EDIT Just saw your post which answers my question. |
This was reintroduced when we released core v5.0.5 since we had forgot to remove the projects from the core |
Who's affected
Anybody using NServiceBus.Testing in their unit tests combined with NServiceBus 5.2.0.
Symptoms
Test.Initialize fails to run. It throws a KeyNotFoundException.
Issue
FakeTestTransport is not overriding Configure from TransportDefinition to enable the FakeTestTransportConfigurer. This means no LocalAdress is setup, which makes UnicastBus throw when it tries to get it.
Issue initially reported by Henrik Røn in the Google Group: https://groups.google.com/forum/#!topic/particularsoftware/424_6KCv6oI
The text was updated successfully, but these errors were encountered: