[Archived] Code for hosting and starting up an ASP.NET Core application. Project moved to https://github.com/aspnet/Extensions and https://github.com/aspnet/AspNetCore
Before it would bind to 0, read the port number, close that temporary socket, and then tell nginx to start on that port. For the last few weeks this has become flaky on Ubuntu (and one failure on Mac) where the port we give to nginx is already taken by the time it starts.
Nginx 1.9.1 has a feature called reuseport that allows it to bind to a port that's already open. I've changed the deployer to bind to 0, read the port, and hold that socket open for the remainder of the test. Nginx binds to that port again and runs its test without conflicts.
http://nginx.org/en/docs/http/ngx_http_core_module.html
This doesn't work for Mac because homebrew is stuck on nginx 1.15.2, but we've only ever seen one failure on Mac so I'm less concerned.
This also doesn't work on travis because they're stuck on Ubuntu 14.04 & nginx 1.8. We're already moving off of travis so this isn't a blocker, VSTS uses Ubuntu 16.04 and a current version of nginx.
This is a new approach to mitigate port conflicts for the nginx tests (https://github.com/aspnet/ServerTests/issues/135).
Before it would bind to 0, read the port number, close that temporary socket, and then tell nginx to start on that port. For the last few weeks this has become flaky on Ubuntu (and one failure on Mac) where the port we give to nginx is already taken by the time it starts.
Nginx 1.9.1 has a feature called reuseport that allows it to bind to a port that's already open. I've changed the deployer to bind to 0, read the port, and hold that socket open for the remainder of the test. Nginx binds to that port again and runs its test without conflicts. http://nginx.org/en/docs/http/ngx_http_core_module.html
This doesn't work for Mac because homebrew is stuck on nginx 1.15.2, but we've only ever seen one failure on Mac so I'm less concerned.
This also doesn't work on travis because they're stuck on Ubuntu 14.04 & nginx 1.8. We're already moving off of travis so this isn't a blocker, VSTS uses Ubuntu 16.04 and a current version of nginx.
No changes are required to tests beyond referencing the new testing package version and removing travis. See https://github.com/aspnet/ServerTests/pull/138
cc @ryanbrandenburg