-
Notifications
You must be signed in to change notification settings - Fork 325
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
No errors reported for adapters that are not loaded because of 'copied from internet' bit on adapter binary #958
Comments
@pvlakshm @Faizan2304 any updates on when this will be fixed? I just ran into this again when debugging a different Live Unit Testing bug report on VS 15.6 Preview. Discovery was not working on the repro solution and I ended up spending a bunch of time trying to isolate the problem by switching between different xunit versions etc. before remembering about this issue and realizing that the problem was caused because of the same 'copied from internet' flag. It would be great to fix this so that this doesn't trip me (and others) up again six months later when this issue is no longer fresh in my mind 😄 |
Contributions welcome. This is marked up-for-grabs. |
Description
While debugging a Live Unit Testing bug, I ran into a problem where LUT would discover 0 tests in the solution that customer had shared.
After much head scratching about why LUT discovery works fine for simpler local solutions but doesn't work for the customer's solution (using the exact same version of adapter, target framework etc.), it turns out that test platform will not load adapters that have the 'copied from internet' bit set.
However, no errors / messages are reported via
ITestMessageEventHandler.HandleLogMessage
orITestMessageEventHandler.HandleRawMessage
. Also, even though LUT discovery fails, the regular Test Explorer window is successfully able to discover tests for the same solution which leads to further confusion.If I check the below 'Unblock' checkbox on the adapter dll file and click 'OK' then discovery starts working without errors.
Steps to reproduce
I ended up creating a quick standalone tool to test discovery (copied the code that LUT uses for discovery). You could also repro this much easier by copying just the test adapter dll to the internet and then copying it back under the packages folder - running the below tool with the original test adapter dll will work but running it with the one copied from the internet will result in discovering 0 tests with no errors / messages reported via
ITestMessageEventHandler.HandleLogMessage
orITestMessageEventHandler.HandleRawMessage
. Compile the below code and run the tool with 0 args to see usage.Expected behavior
ITestMessageEventHandler.HandleLogMessage
orITestMessageEventHandler.HandleRawMessage
if they are rejecting supplied adapter dlls because those adapters have the 'copied from internet' bit set.Actual behavior
ITestMessageEventHandler.HandleLogMessage
orITestMessageEventHandler.HandleRawMessage
when adapter dll is rejected because it has 'copied from internet' bit set.Environment
The text was updated successfully, but these errors were encountered: