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

Gallery UTs take a long time #3107

Closed
skofman1 opened this issue Jun 29, 2016 · 2 comments
Closed

Gallery UTs take a long time #3107

skofman1 opened this issue Jun 29, 2016 · 2 comments

Comments

@skofman1
Copy link
Contributor

Tests in NuGetGallery.SearchClient.RetryingHttpClientWrapperFacts take minutes to complete. UTs should be fast.

@shishirx34
Copy link
Contributor

shishirx34 commented Jun 30, 2016

LoadBalancesBetweenValidUrisForGetStringAsync and LoadBalancesBetweenValidUrisForGetAsync tests run into infinite loop when the returned RequestUris don't match the validUris. RetryingHttpClientWrapper is returning Request URIs(one with https, I have seen this happen often, not always):

Actual:

{http://www.microsoft.com/}
{https://www.bing.com/?toHttps=1&redig=414F637CC2A1431BACF5E4B0D0F90FF0}

Expected:

{http://www.microsoft.com/}
{http://www.bing.com/}

Apart from the test bug(which causes inifinite loop), the tests are failing due to mismatch of these URIs. I am not yet fully familiar with the code hence not sure if just validating the host for Uris is a sufficient test case fix. I will send out a PR and get feedback on understanding what the correct validation would be here.

PS: I suspect there to be some kind of race condition given that this is an async operation on different worker threads and thereby sometimes when I am debugging the tests pass while sometimes they don't.

@maartenba
Copy link
Contributor

These are more of an integration test, so not sure if they should be part of the UT suite (although they test a critical path in the gallery code base).

Regarding the loop bug, feel free to fix.

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

No branches or pull requests

3 participants