Skip to content
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

TestNegotiate depends on side-effect from another test #68

Open
nzbart opened this issue Nov 4, 2013 · 8 comments
Open

TestNegotiate depends on side-effect from another test #68

nzbart opened this issue Nov 4, 2013 · 8 comments
Labels

Comments

@nzbart
Copy link

nzbart commented Nov 4, 2013

The WindowsAuthProviderImplUnitTests.TestNegotiate test does not complete successfully when run by itself.

It does pass if the following line of code is added to the top of the test:

Domain.GetComputerDomain();

Because this line of code is executed in previous tests in the same class, TestNegotiate appears to pass.

Note that my machine is connected to a domain. I am running the following version of Windows:

  • Microsoft Windows 8 Enterprise
  • 6.2.9200 N/A Build 9200
@dblock
Copy link
Collaborator

dblock commented Nov 4, 2013

That's weird. Do you understand why this happens? Obviously that's a bug.

@dblock
Copy link
Collaborator

dblock commented Nov 4, 2013

Btw, nice debugging. I've seen this before and it confused me, but never dug deep enough.

@nzbart
Copy link
Author

nzbart commented Nov 4, 2013

I've had a further look, but still none the wiser what the framework code is doing that we aren't. For now (since I'm not using this code in production), I'm just going to put the Domain.GetComputerDomain() line in the appropriate place. The SSPI API documentation from Microsoft is dismal.

@hazendaz
Copy link
Member

hazendaz commented Jun 3, 2014

Where is this piece of code? Is this still a problem?

@nzbart
Copy link
Author

nzbart commented Jun 3, 2014

Sorry, I can't remember the details. Feel free to close it - if it's still causing problems, someone will report it again.

@dblock
Copy link
Collaborator

dblock commented Jun 3, 2014

@nzbart
Copy link
Author

nzbart commented Jun 3, 2014

I never managed to come up with a satisfactory answer. I found the Domain.GetComputerDomain() workaround by getting an understanding of which test needed to be run before WindowsAuthProviderImplUnitTests.TestNegotiate, and then reverse engineering the .NET BCL code called by that test and copying and pasting bits into the failing test until it started working. That line was the minimum viable change I managed to find. Unfortunately, there's still quite a bit going on inside GetComputerDomain, but the key to this mystery lies within there. Perhaps there is some API initialisation that needs to happen first? As I said, the SSPI API documentation is lacking.

Good luck!

@hazendaz
Copy link
Member

hazendaz commented Oct 5, 2014

This issue appears to be ever more present now. I was unable to build out 1.7 release as long as this test case was in place. I simply deleted it to get through the release. Tried on multiple machines all with same issue. I did not try the solution in this but wanted to point out it seems to be occurring more often now. Machines I tried on where both windows 8.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants