diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs index 3728b62fdd..35cb880c1a 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs @@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests continue; } - if (location != null && match.Groups["location"].Value != location) + if (location != null && match.Groups["location"].Value.Trim() != location) { continue; } @@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } } - throw new BuildErrorMissingException(result, errorCode); + throw new BuildErrorMissingException(result, errorCode, location); } public static void BuildFailed(MSBuildResult result) @@ -248,15 +248,26 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests private class BuildErrorMissingException : MSBuildXunitException { - public BuildErrorMissingException(MSBuildResult result, string errorCode) + public BuildErrorMissingException(MSBuildResult result, string errorCode, string location) : base(result) { ErrorCode = errorCode; + Location = location; } public string ErrorCode { get; } - protected override string Heading => $"Error code '{ErrorCode}' was not found."; + public string Location { get; } + + protected override string Heading + { + get + { + return + $"Error code '{ErrorCode}' was not found." + Environment.NewLine + + $"Looking for '{Location ?? ".*"}: error {ErrorCode}: .*'"; + } + } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessManager.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessManager.cs index 70b43448e4..fa3e1e11f3 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessManager.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessManager.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests TimeSpan? timeout = null, MSBuildProcessKind msBuildProcessKind = MSBuildProcessKind.Dotnet) { - timeout = timeout ?? TimeSpan.FromSeconds(30); + timeout = timeout ?? TimeSpan.FromSeconds(60); var processStartInfo = new ProcessStartInfo() {