Enable simultaneous requests in testserver.py proxy

testserver.py only supports one simultaneous request in basic auth proxy
mode. This can lead to test timeouts when an unrelated request hogs the
connection. Use the SelectServer.ThreadingMixIn to switch to
thread-per-connection semantics, allowing the server to support any
number of requests up to the limit of filehandles or memory.

This CL only fixes the basic auth proxy mode. The http and https modes
have the same flaw, but are harder to fix because all the handlers have
to be made threadsafe. However, requests in the http and https modes are
expected to be short-lived and there are no known problems caused by the
deficiency.

BUG=822614

Change-Id: Ieb2e91613f15e51a11af93c8da7d639da298b9a6
Reviewed-on: https://chromium-review.googlesource.com/999276
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#548814}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4258b73b0bea431994d884d0751546b647f290c6
1 file changed