Add flaky test logging for `CacheTagHelper_VaryByCultureComposesWithOtherVaryByOptions`.

#8281
This commit is contained in:
N. Taylor Mullen 2018-08-20 12:01:09 -07:00
parent ea681786bd
commit f624c9aa7b
1 changed files with 11 additions and 0 deletions

View File

@ -6,9 +6,12 @@ using System.Net.Http;
using System.Threading.Tasks;
using AngleSharp.Dom;
using AngleSharp.Dom.Html;
using AngleSharp.Extensions;
using AngleSharp.Html;
using HtmlGenerationWebSite;
using Microsoft.AspNetCore.Hosting;
using Xunit;
using Xunit.Sdk;
namespace Microsoft.AspNetCore.Mvc.FunctionalTests
{
@ -149,6 +152,14 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
// Assert - 3
Assert.Equal("fr-FR", culture);
Assert.Equal("14", correlationId);
if (cachedCorrelationId != "10")
{
// This is logging to investigate potential flakiness in this test tracked by https://github.com/aspnet/Mvc/issues/8281
var documentContent = document.ToHtml(new HtmlMarkupFormatter());
throw new XunitException($"Unexpected correlation Id, reading values from document:{Environment.NewLine}{documentContent}");
}
Assert.Equal("10", cachedCorrelationId);
void ReadValuesFromDocument()