Move startup hook tests targeting StartupHookProvider out of hosting tests#84338
Move startup hook tests targeting StartupHookProvider out of hosting tests#84338elinor-fung merged 6 commits intodotnet:mainfrom
StartupHookProvider out of hosting tests#84338Conversation
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsThese tests were checking how
Running locally (Windows):
Replaced tests:
The one thing the new tests don't check is that a startup hook failure means an app run failure. We do still have a test on the host side that expects failure - I think that is reasonable enough to not also need the same check for all the other possible failure points. Resolves #77805
|
jkoritzinsky
left a comment
There was a problem hiding this comment.
Thanks for using the new [Fact] style tests! Do we want to mark this test suite as RequiresProcessIsolation, or is that not necessary?
f4b4fee to
4cb2cae
Compare
Does the merged runner execute tests from different assemblies in parallel? I don't recall. If so, I guess technically it should be, since other things could (although unlikely) modify the |
|
It doesn't execute tests from different assemblies in parallel today, but it may do so in the future. |
|
Actually, the success-case tests do also assume that there isn't some already loaded assembly with the same name. I'll make it RequiresProcessIsolation. Thanks! |
These tests were checking how
StartupHookProviderparses out the startup hook property, handles error cases, and handles the basic valid case of loading by an assembly path or name We don't need the startup hook scenario and process launch for that validation, so they can be moved out of hosting tests:StartupHookTestsunder src/tests/Loader that targetsStartupHookProviderdirectlyHostActivation.TestsRunning locally (Windows):
StartupHookstests went from 1.9min to 9.5s on ReleaseReplaced tests:
The one thing the new tests don't check is that a startup hook failure means an app run failure. We do still have a test on the host side that expects failure - I think that is reasonable enough to not also need the same check for all the other possible failure points.
Resolves #77805
Contributes to #77807