aspnet / ServerTests

[Archived] Tests for Helios, WebListener and Kestrel. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
21 stars 13 forks source link

Flaky test: ResponseCompression_Nginx_NoCompression #113

Closed ryanbrandenburg closed 6 years ago

ryanbrandenburg commented 6 years ago

This test fails occasionally with the following error:

System.Exception : Command exited unexpectedly with exit code: 1
   at Microsoft.AspNetCore.Testing.TaskExtensions.TimeoutAfter[T](Task`1 task, TimeSpan timeout, String filePath, Int32 lineNumber)
   at Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer.StartSelfHostAsync(Uri hintUrl)
   at Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer.DeployAsync()
   at ServerComparison.FunctionalTests.ResponseCompressionTests.ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func`3 scenario, ApplicationType applicationType, Boolean hostCompression, String testName, HostingModel hostingModel, String additionalPublishParameters) in /_/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs:line 241
--- End of stack trace from previous location where exception was thrown ---
------- Stdout: -------
| [2018-04-25T20:08:35] TestLifetime Information: Starting test ResponseCompression_Nginx_NoCompression-Nginx-CoreClr-x64-Portable
| [2018-04-25T20:08:35] TestLifetime Information: Starting test ResponseCompression_Nginx_NoCompression_Nginx_CoreClr_x64_Portable
| [2018-04-25T20:08:35] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: Executing dotnet run --no-restore --framework netcoreapp2.1 /p:VerifyMatchingImplicitPackageVersion=false -- --server.urls http://localhost:38380/  --server Microsoft.AspNetCore.Server.Kestrel
| [2018-04-25T20:08:35] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: SET ASPNETCORE_ENVIRONMENT=ResponseCompression
| [2018-04-25T20:08:35] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: SET ASPNETCORE_DETAILEDERRORS=true
| [2018-04-25T20:08:35] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: Started dotnet. Process Id : 32937
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: dotnet stdout: /mnt/work/33bdfc1cae7b2a38/modules/ServerTests/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj : error : The project was restored using Microsoft.NETCore.App version 2.1.0-rc1-26425-06, but with current settings, version 2.1.0-rc1-26419-02 would be used instead.  To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish.  Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore.
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Warning: dotnet stderr: The build failed. Please fix the build errors and run again.
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: host process ID 32937 shut down
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: Host process shutting down.
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Warning: nginx stop stderr: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Warning: nginx stop stderr: 2018/04/25 20:08:36 [emerg] 32967#32967: no "events" section in configuration
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: nginx stop command issued
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Warning: Host process already exited or never started successfully.
| [2018-04-25T20:08:36] Microsoft.AspNetCore.Server.IntegrationTesting.NginxDeployer Information: [Time]: Total time taken for this test variation '0' seconds
| [2018-04-25T20:08:36] TestLifetime Information: Finished test ResponseCompression_Nginx_NoCompression_Nginx_CoreClr_x64_Portable in 1.1095901s

This is almost certainly caused by aspnet/Hosting#1399.

ryanbrandenburg commented 6 years ago

This persists in 2.1, we should fix it for RTM.

ryanbrandenburg commented 6 years ago

@muratg can we get this for RTM? Our release/2.1 branch tests are failing 100% of the time.

muratg commented 6 years ago

@ryanbrandenburg let's try. @Tratcher test checkins to release/2.1 is approved for this week.