Fix rare hang in dev_server_wrapper.py.

Once in a long while, dev_server_wrapper would hang when shutting down the
devserver, which would cause VM tests on the builders to fail.

This CL includes the test script used to reproduce the original problem
(which reproduced on the 435th shutdown), and to verify the fix (which ran
though 23,342 iterations before I killed it).

BUG=chromium:242470
TEST=Ran test script though over 23,000 start/stop iterations without hanging.

Change-Id: I17943701361c3d5ae2f63abf25904d797b46e507
Reviewed-on: https://gerrit.chromium.org/gerrit/56635
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
2 files changed