From 1ca6202e7e39b11103f48272c37b91f9ccee5d21 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 1 Mar 2019 10:49:54 -0800 Subject: Add some additional logging to ErrorPageMiddlewareWebSite (#8049) * Add some additional logging to ErrorPageMiddlewareWebSite DeveloperExceptionMiddleware will log an error if rendering the exception page throws. The test failure in https://github.com/aspnet/AspNetCore-Internal/issues/1730 suggests that we encountered an error like so but do not have anything further to go by. This change adds logging to the test so we could identify possible issues --- src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs | 30 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs index 644a4ac067..ec976ac0dc 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs @@ -1,27 +1,44 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; +using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Text.Encodings.Web; using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Razor.Internal; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Xunit; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests { /// /// Functional test to verify the error reporting of Razor compilation by diagnostic middleware. /// - public class ErrorPageTests : IClassFixture> + public class ErrorPageTests : IClassFixture>, IDisposable { private static readonly string PreserveCompilationContextMessage = HtmlEncoder.Default.Encode( "One or more compilation references are missing. Ensure that your project is referencing " + "'Microsoft.NET.Sdk.Web' and the 'PreserveCompilationContext' property is not set to false."); - public ErrorPageTests(MvcTestFixture fixture) + private readonly AssemblyTestLog _assemblyTestLog; + + public ErrorPageTests( + MvcTestFixture fixture, + ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + _assemblyTestLog = AssemblyTestLog.ForAssembly(GetType().Assembly); + + var loggerProvider = _assemblyTestLog.CreateLoggerFactory(testOutputHelper, GetType().Name); + + var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); + Client = factory + .WithWebHostBuilder(builder => builder.ConfigureLogging(l => l.Services.AddSingleton(loggerProvider))) + .CreateDefaultClient(); } public HttpClient Client { get; } @@ -144,5 +161,10 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests Assert.Contains(nullReferenceException, content); Assert.Contains(indexOutOfRangeException, content); } + + public void Dispose() + { + _assemblyTestLog.Dispose(); + } } } -- cgit v1.2.3 From a2e63227210f702b68f74c6dfb26204f908e14c2 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 1 Mar 2019 11:43:03 -0800 Subject: Restore testassets during build to prevent timeouts (#8038) * Restore testassets during build to prevent timeouts Fixes https://github.com/aspnet/AspNetCore-Internal/issues/1695 --- .../Microsoft.AspNetCore.Razor.Design.Test.csproj | 4 ++++ .../RestoreTestProjects/RestoreTestProjects.csproj | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/Razor/Razor.Design/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj diff --git a/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj b/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj index 86bcbf5a9f..c1824cecd6 100644 --- a/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj +++ b/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj @@ -61,4 +61,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests + + + + diff --git a/src/Razor/Razor.Design/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj b/src/Razor/Razor.Design/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj new file mode 100644 index 0000000000..b2f0830594 --- /dev/null +++ b/src/Razor/Razor.Design/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj @@ -0,0 +1,14 @@ + + + netcoreapp2.1 + + + + + + + + + + + -- cgit v1.2.3 From db3795b368242953bd2ea6f1ef67d4fd7fe23293 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 1 Mar 2019 17:52:50 -0800 Subject: Put MVC's functional tests in a separate test group (#8118) Possible fix to https://github.com/aspnet/AspNetCore/issues/7313 One of the characteristics of these failures were that the test took long to run. The build log has warnings for several long running tests. This might be a result of CPU contention since mondo-ification that make MVC's functional tests run with nearly every other test project in the solution --- .../Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj index a2190bb338..00e7e4be5a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj +++ b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj @@ -8,6 +8,7 @@ $(DefineConstants);GENERATE_BASELINES $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES $(DefineConstants);FUNCTIONAL_TESTS + Mvc.FunctionalTests -- cgit v1.2.3 From e497f4101f2a34a71e686a0c06243d3a4a8c9589 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Wed, 6 Mar 2019 19:45:46 -0800 Subject: Update branding to 2.1.10 (#8265) --- build/dependencies.props | 4 ++-- eng/Baseline.Designer.props | 2 +- eng/Baseline.xml | 2 +- eng/PatchConfig.props | 5 +++++ .../Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.9.txt | 6 ++++++ src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.9.txt | 6 ++++++ version.props | 2 +- 7 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.9.txt create mode 100644 src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.9.txt diff --git a/build/dependencies.props b/build/dependencies.props index 03f4300c27..2b335ab806 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,8 +2,8 @@ - 2.1.7 - 2.1.7 + 2.1.9 + 2.1.9 diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 3c053b176e..190af91a42 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,7 +2,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.8 + 2.1.9 diff --git a/eng/Baseline.xml b/eng/Baseline.xml index b7f70b9b93..a15dae40ff 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -4,7 +4,7 @@ This file contains a list of all the packages and their versions which were rele build of ASP.NET Core 2.1.x. Update this list when preparing for a new patch. --> - + diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index 70a6297f74..187efa606a 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -23,4 +23,9 @@ Later on, this will be checked using this condition: + + + + + diff --git a/src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.9.txt b/src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.9.txt new file mode 100644 index 0000000000..6d918a778c --- /dev/null +++ b/src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.9.txt @@ -0,0 +1,6 @@ +microsoft.netcore.targets\1.1.0\.signature.p7s +runtime.native.system.security.cryptography\4.0.0\.signature.p7s +system.composition.convention\1.0.31\.signature.p7s +system.composition.typedparts\1.0.31\.signature.p7s +system.globalization.extensions\4.0.1\.signature.p7s +system.threading.tasks.parallel\4.3.0\.signature.p7s diff --git a/src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.9.txt b/src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.9.txt new file mode 100644 index 0000000000..6d918a778c --- /dev/null +++ b/src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.9.txt @@ -0,0 +1,6 @@ +microsoft.netcore.targets\1.1.0\.signature.p7s +runtime.native.system.security.cryptography\4.0.0\.signature.p7s +system.composition.convention\1.0.31\.signature.p7s +system.composition.typedparts\1.0.31\.signature.p7s +system.globalization.extensions\4.0.1\.signature.p7s +system.threading.tasks.parallel\4.3.0\.signature.p7s diff --git a/version.props b/version.props index c696d687f3..ec99366288 100644 --- a/version.props +++ b/version.props @@ -2,7 +2,7 @@ 2 1 - 9 + 10 servicing Servicing t000 -- cgit v1.2.3 From e7c5e09ad218aaa11b4a22118ce80c822448d021 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Thu, 7 Mar 2019 17:24:40 -0800 Subject: Unpin our System.Net.Http package version - shipped in the past patch --- build/dependencies.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index 2b335ab806..8b90083c0d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,6 +4,8 @@ 2.1.9 2.1.9 + + 4.3.4 @@ -194,7 +196,6 @@ 4.5.0 5.2.0 3.1.1 - 4.3.2 4.5.0 3.1.1 4.3.0 -- cgit v1.2.3