-
Notifications
You must be signed in to change notification settings - Fork 2
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
Multi-target tests to netcoreapp3.1 and net48 #176
Comments
Hi @mauroservienti , is it possible to multitarget We have still endpoints that use |
Great, LGTM. That it's impossible to mix endpoints with different target framework is OK for me (and by design). But that hint could be added to the readme. |
@Tobias-08 I just created 1.2.0, once the build is completed, I'll push to nuget. |
@mauroservienti Thanks! Unfortunately I have issues in test execution while using 1.2.0 with
I have seen this with This might be specific to my setup but I have no concrete idea what might be wrong on my side. |
I'm sorry about that @Tobias-08. I faced a similar issue when implementing multi-targeting in tests running on Linux. All tests were timing out no matter what. The fix for the Linux tests was to force tests to run on a specific test framework, e.g.:
Commit here I have no idea what could be the underlying issue, but that fixed the specific problem. That being said, you should have the full test logs available, if it's possible would you mind sharing those with me? Another thing, would you be able to download the bits from #194 and run the tests in the |
The
The bits from #194 result in errors:
|
That specific exception is thrown by the acceptance testing framework when it tries to start endpoints and one or more fail to start within the allocated timeout of 2 minutes. You should in the logs another error message similar to:
Based on the "the system cannot load the specified file" error it sounds like one of the endpoints is not loading one of the required dependencies. Might that be the case? Are those .NET 4.8 endpoints using the generic host? Would you be able to share with me, privately, some more information, if needed? |
Some more thoughts, mostly for my future self. The "system cannot find the specified file" could also be a docker-compose error, that's the error you get on Linux when docker-compose is not installed. However, if that was the case that would have immediately failed the tests because the compose part happens before the NServiceBus acceptance test framework gets invoked. |
My own endpoint uses generic host (on Regarding #194 files: I have no Docker on my machine. Besides that I have no idea which dependencies might not get loaded (the nuget packages shouldn't be a problem). |
@Tobias-08 I made a few changes to #194 to remove the dependency on RabbitMQ and thus on Docker too. Can you try pulling and running it one more time? When your tests fail, the test should output the full debug logs. Would it be possible to share those test logs with me (privately) alongside the diagnostic file that should be in the bin directory? |
@mauroservienti The |
Is there any chance that one of the endpoints in the test takes really longer than two minutes to start? |
@mauroservienti IMHO not really. Endpoint startup takes only a few seconds. I tested again with a minimal integration test (endpoint with no test-behaviors) and this succeeds (always, also on |
That would be awesome. You can use this Typeform to get in touch. I'll reply via email. Thanks. |
@Tobias-08 I made a couple of changes to #194 to use both SqlTransport and SqlPersistence. The endpoints are configured with the following connection string:
Can you please adapt the connection string to your environment, run the tests, and if they succeed try to tweak them so as to reproduce the failure you are observing in your environment? |
@mauroservienti I'll have a look. But as the timeouts seem to have something to do with the complexity of our tests I am not sure if I can reproduce them based on your code. |
@mauroservienti Your tests succeed on my machine. I'll try to reproduce the issue based on your code but that might be hard... |
Thanks, @Tobias-08. As far as I can tell from the logs you shared the problem is somewhere in the endpoint startup path. The exception is thrown by the acceptance testing framework when it tries to start endpoints and one or more fail to start within the allocated timeout of 2 minutes. |
@mauroservienti I had no luck reproducing the issue based on your code. Regarding my code I thought again about my theory from my comment above: It's still current behavior in my code that a minimal integration test (with identical endpoint startup) succeeds and only the complex tests (with multiple |
There is no need to target net5 or net6, netcoreapp3.1 is sufficient unless we explicitly need new SDK features. Targeting net48 allows testing endpoints still using the .NET Framework.
The text was updated successfully, but these errors were encountered: