Avoid flakiness in template tests around URL validity checking #59195
+11
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've had several failures in
Templates.Mvc.Test.MvcTemplateTest.MvcTemplate_IndividualAuth
recently with the error:Example build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=880536
This is purely a flaky test issue and not a product bug. That link is actually valid. We just have some issue validating that when running in CI sometimes. I propose to fix this by changing the test logic not to make a real HTTP request to check the link is valid if it's an external (absolute) link.
There's no reason for us to be checking that external links are valid in CI. We just need to check that the template produces the links we expect (which it already does anyway). Any reliance on making requests to external sites during CI are possible sources of flakiness.