airlift/airlift — pull request #26 by electrum (2012-12-15 08:07:35+00:00)
Title: Fix HTTP tests on machines with many processors

The combination of an NIO connector and an insufficient number of threads results in a server that hangs after accepting connections. Previously, TestingHttpServerModule was configuring a max of 10 threads, which is insufficient for Jetty on machines with 32 processors. This caused the HTTP server to appear to hang after accepting a connection.

In addition to increasing the max thread count for tests based on the available processor count, we also prevent the server from starting if insufficient threads are detected after starting the HTTP server.